As a longtime breeder and keeper of thoroughbreds, Jim Ryan is hardened to the unfortunate events that befall his animals: stillbirths, disease, crippling injuries. But on a simple tour of living quarters on the Laurel Race Course backstretch, he saw things he couldn't accept.

Doors opened to a single-story, 34-unit cinderblock dormitory that houses grooms, exercise riders and hotwalkers, and Ryan cringed. He saw plastic, lime-filled buckets containing human excrement, piles of trash within arm's length of a mattress, broken glass on the floor.

"I have never seen a homeless shelter as dirty or unsanitary as these rooms," said Ryan, the founder of Ryland Homes.

Wretched living conditions are only one of the problems gripping racetrack backstretches nationwide. Drug or alcohol addiction is said to run very high, according to John Mayton, former director of a California rehabilitation program, and widespread sex has some fearing an AIDS epidemic. Gambling abuse is prevalent, illiteracy rampant.

For years, industry leaders paid little notice to the backstretch until Ryan helped clear the line of vision. Last year, he established a foundation to benefit drug and alcohol counseling programs for backstretch workers throughout the country, provided racetracks and their supporting organizations matched the funds. He contributed $1 million in 1989 and has renewed the program this year, receiving strong support in Maryland.

Now he wants to do something about housing, and is discussing with Laurel officials the possibility of building three dormitories on the track's Howard County side near Route. 1. A spokesman for the Enterprise Foundation -- a national organization that coordinates the development of low-income housing -- said the project is "at the conceptual stage."

Some novel concepts have been discussed, such as requiring residents to pay a nominal monthly fee (on-track housing has always been free) in an effort to promote responsible occupancy. An independent resident manager might be assigned to each dorm, and much-needed laundry services provided. Ryan also is interested in supporting a day-care center "if there's an emphasis on learning."

Jerry Gilpin, a hotwalker who has done a little of everything in 30 years of track employment, admires the initiative, but questions how the largely apathetic 1,200-member backstretch (about one-third of the workers live at the track) would regard such an undertaking.

"I can see in a way how it's hard to get anything done around here because they {backstretch workers} don't take care of themselves," he said. "It has to start with them."

Gilpin makes the most of Laurel's living quarters. Flower baskets hang outside his door, begonias fill a window box. His room is small but tidy.

"They can come in and inspect my room anytime," he said. "I don't leave there without making the bed."

Gilpin is a recovering alcoholic. The drinking problem that began when he was 13 has led him through 15 rehabilitation programs, he said, and left him scarred.

"I learned to drink when I came on the racetrack," he said. "That's how you were accepted as one of the boys."

On any given day, among the early-morning sights on the backstretch likely will be a few stablehands drinking beer. That's how Gilpin began many of his workdays, although sometimes it was merely a continuation of the night before. "I drank constantly," he said, "but I functioned."

Although all stablehands must be licensed by the Maryland Racing Commission, they technically are the responsibility of the trainer who employs them. They are subject to security checks, and track enforcement officers say technology has made it increasingly difficult for problem workers to move between states unnoticed.

Gina Chamberlin, an assistant general manager for Howard Johnson Hotels who has doubled as a hotwalker the past seven years, said: "You have your share of old-timer alcoholics -- where else would they go? They've got a place to stay. . . . The lifestyle's conducive to has-beens and washed-ups. You've got them all here."

Gilpin said he's been sober the past seven months, but believes he and other alcoholics would be better served were there an Alcoholics Anonymous program on the Laurel backstretch. (There is such a program at Pimlico.)

Maryland does have a drug and alcohol counseling program, to which the tracks, the Maryland Thoroughbred Horsemen's Association and the horsemen's assistance fund have committed $40,000 each this year in matching Ryan's donations. Proud of the Record

"Show me any racing organization throughout the world that gives $120,000 solely to be used for drug and alcohol counseling," said Wayne W. Wright, executive secretary of the MTHA. "I'm proud of the MTHA's record as far as what it's done to improve the quality of life on the backstretch."

The MTHA also employs a full-time recreation director in an attempt to give backstretch workers alternatives to drugs and alcohol, organizing softball, football and basketball leagues, pool and horseshoe tournaments, bowling, volleyball and movies.

Willie Coleman, director of security at Laurel and Pimlico, said the most common antisocial problem on the backside is "people stealing from each other and fighting."

He added: "I don't think the drug and alcohol problem on the backstretch {at Pimlico} is any worse than over on Park Heights Avenue {in Baltimore, near the track} on a Friday afternoon. There's no way possible you could ever get rid of it. But I think, as a whole, we do a darn good job of controlling it. In my opinion, {the problems} are exaggerated."

Joe De Francis, president and chief executive officer of Maryland's major racetracks, acknowledged that backstretch improvements are needed. He said some problems have been aggravated by the evolution of year-round racing, in which housing designed as temporary has become permanent.

"That's what has caused us to want to take a fresh look at things," he said, such as alternative housing.

Indiscretions abound on the backstretch. Jaime Williams, who became a groom nine years ago and lives at Laurel, said he has seen residents there urinate outdoors rather than walk to the nearest lavatory. Harry Woo, an exercise rider the past 15 years, made a similar observation.

Overcrowding in dorms is not uncommon. Five persons have shared a room that wouldn't sleep two comfortably, according to Williams. With no laundry services, dorm occupants must use an off-track laundromat or wash clothes in a basin, as many choose to do.

"From what I've seen, they {the problems} are not overplayed at all," Woo said. "People who live on the backside, all they have to do is gamble. A lot of 'em have no sense of direction at all. I did that myself for the first five years, with no respect to money. Once you get a little older, you realize there's nothing in the future for you at the rate you're going. If you have a dream, you start losing pieces of the dream along the way." Hazards of the Job

Woo, 31, received a fractured skull, broken ribs and a five-inch gash in his liver when an unruly horse slammed him into a rail in July 1985. He was hospitalized four months and had three liver operations. Medical bills totaled $16,000 -- nearly a year's pay for Woo at the time -- but were fully covered by worker's compensation. Woo also received about two-thirds of his average salary during his hospital stay.

Maryland now requires all trainers to carry worker's compensation. Any backstretch employee hurt on the job is fully covered.

Williams would like to see additional benefits, such as group health and dental plans, but the MTHA lacks the necessary resources. It has instituted a pension plan for workers 65 and older, however, and periodically conducts free health exams and screenings.

"Essentially what we're doing is recognizing our responsibility," Wright said. "We felt that to improve the quality of employment we had to improve the quality of life for these people. There's nothing that someone could suggest that, if there's an interest in, we wouldn't try."

In any case, Ryan keeps his checkbook open and continues his crusade.

"We're not trying to change the world," he said. "All you can do is make it somewhat better. You're not going to change someone who steals overnight, or someone who {does} drugs overnight. But you can light a candle."