Bill Cosby, left, appears on the set with Gary Gray and Jessica Vaughn during the taping of the last episode of "The Cosby Show" in 1992. (AP)

“The Cosby Show,” starring future convicted sexual predator Bill Cosby, premiered on NBC in September 1984.

By then, as the world now knows, Cosby had allegedly attacked multiple women — drugging, then assaulting them. A dangerous sexual predator, a judge ruled this week.

But on his eponymous show, which became one of the most-watched sitcoms in TV history, Cosby was a wisecracking but wholesome obstetrician named Cliff Huxtable, raising four children with his wife, Clair, a lawyer played by Phylicia Rashad.

In the very first scene, Cliff strolls into the kitchen for breakfast, planting a kiss on his wife's lips.

For eight seasons, “The Cosby Show” was the program by which other comedies were measured. It was lauded for its positive portrayal of a black family at a time when Cosby told interviewers that he was, according to one history of the show, “tired of what he was seeing on television — tired of the car chases, the hookers with the black pimps.”

The show resonated around the world. A Wall Street Journal story from 1986 quoted a black grocer in South Africa saying: “Cosby is a big doctor, he is consulted, he has authority, and he receives full respect due to him. This is the kind of thing we blacks want here in South Africa."

For Cosby, the show was his first mainstream success in more than a decade. Other shows he starred in had failed, including one called “The Bill Cosby Show.” He was mostly getting by doing stand-up comedy. He took his material and tone — that of a guy just trying to get by in a sometimes mysterious world — to television.

In that first episode, Cosby confronts the struggles of family life — a teenage son with a messy room and bad grades, a daughter dating a guy with an earring, and a wife at her wit’s end running the house — with a tired amusement.

When Cliff gets home from work after Clair tried to control a chaotic family dinner, she asks him in an exasperated tone, “Why do we have four children?"

Cliff smiles and says, “Because we did not want five.”

Clair shows Cliff their son’s report card — all Ds. She asks him to take care of it, otherwise she’ll have to kill him. He asks whether he’s supposed to kill their son and, if so, whether he can have dinner first. This is all in good fun, of course. There is audience laughter.

“Cliff,” she says, sounding desperate.

"Yeah,” he replies, “I'll be crueller on an empty stomach."

Cliff then has to contend with his daughter Denise and her date, who is wearing an earring. He asks to speak with her upstairs.

"Listen, I don't know if you know it or not, but your date downstairs is just wearing one earring,” he says.

But then another problem emerges: Cliff discovers that his daughter is wearing makeup on only one side of her face in what appears to be a tiger pattern.

“Uh, Denise,” he says. “Your face.”

“Your face?” she says.

“Only one half of your face is made up,” Cliff says. “Now, are you going some place else to do the other side, or are you planning on walking sideways all night?”

She kisses him and is off on her date.

Finally, bedtime rolls around.

Clair sits at her mirror as Cliff reads a medical book in bed.

"I was a beautiful woman once,” she says, “before the children came."

"I never met a more beautiful woman,” Cliff says, as she slides into bed.

He then kisses her on her cheek and ear as she makes pleasant sounds.

"Let's just remember,” she says, “this is how we got the children in the first place."

"Right,” he says, rolling over and turning off the lights.

But he can't resist, rolling back over to move in for another kiss.

Suddenly, a door knock. It’s their two youngest daughters. They want to sleep in bed with their parents, breaking up the chance for a private moment for the couple.

As the credits roll, the kids get comfortable between them. Cosby appears frustrated. He says, “Goodnight, darling.”

All three say, “Goodnight!”

Read more on Retropolis:

Before Franken and Moore, there was Sen. Bob Packwood — a serial sexual harasser, reelected anyway

She said her boss raped her in a bank vault. Her sexual harassment case would make legal history.

‘I’ll ruin you’: Judy Garland on being groped and harassed by powerful Hollywood men

Brutally killed by Charles Manson’s followers, Sharon Tate became the face of victims’ rights

Charles Manson’s surreal summer with the Beach Boys: Group sex, dumpster diving and rock ‘n roll