Pernell Walker, James Franco, Maggie Gyllenhaal in 'The Deuce'
CNN  — 

In “The Deuce,” producer David Simon tries to do for the sex trade and 1970s evolution of pornography what “The Wire” did for drugs. After a slow start, this engrossing, characteristically nuanced HBO drama mostly serves up aces.

Oddly, the show’s two most marketable elements – James Franco, and porn, albeit wrapped up in a classy drama – represent relative weak spots. Indeed, during the opening installment it’s easy to think that Simon’s last project, “Show Me a Hero,” had more sizzle, and the topic there was public housing.

Stick with it, though, and the pieces begin falling into place, adding layers and dimension as the sprawling cast of characters gradually intersects. That yields plenty of knockout performances, even if Franco’s isn’t among them.

As for the subject matter, “The Deuce” makes clear early on that it won’t glamorize or sanitize this world of not so long ago. Yes, there’s plenty of sex, both stark and graphic, but also the shadow of brutality that the women regularly endure.

The series begins in 1971, the year before “Deep Throat” had audiences lining up outside X-rated theaters. Drawing its title from a nickname for New York’s 42nd Street in the grimy old days, the show assiduously introduces its roster of prostitutes, pimps, mobsters and police, whose enforcement efforts, or lack thereof, funnel sex off street corners and into new avenues of exploitation.

If that sounds like “The Wire,” it should, and “The Deuce” is almost equally bleak. Yet the writing also contains moments of sly humor, such as when a prostitute turns up in a peep-show film, prompting the store’s owner to call after her, “Can I get your autograph, Miss Monroe?”

Double roles are usually showy, but Franco is actually hampered by playing twin brothers, who initially suffer from vague delineation. Maggie Gyllenhaal, by contrast, proves a real standout as Candy, a hooker who instantly sees the possibilities and potential for escape in channeling the bottomless appetite for sleaze into shooting films, not turning tricks.

The straight arrow of Franco’s brothers, Vincent, is a divorced dad trying to get by, whose financial need puts him in business with some shady characters. When he expresses misgivings about managing massage parlors, he’s told that since people will always buy and sell sex (the terminology is more colorful), “You’re just landing a cut, man.”

Gyllenhaal, meanwhile, teams up with a cut-rate filmmaker (David Krumholtz), whose blasé attitude toward his illicit business could practically be a separate sitcom unto itself.

Not surprisingly, “The Deuce” is populated by an assortment of “The Wire” alums, including Chris Bauer as Vincent’s brother in law, Lawrence Gilliard Jr. as a weary beat cop and Gbenga Akinnagbe as one of the pimps, who are uneasy about how revised enforcement and porn will affect their livelihoods. Michael Rispoli (“The Sopranos”) also portrays another memorable mobster, and Dominique Fishback shines as one of the working girls.

The show is fastidious in its period details, from movies on the marquee to the TV shows in the background to President Nixon and the names of NBA players on the radio.

It’s practically a given that “The Deuce” won’t generate much of an audience – certainly relative to HBO’s summer of Sundays with “Game of Thrones.” Still, it screams prestige, and by the time this eight-episode run is over, there’s a strong sense that Simon and his “Treme” collaborator George Pellecanos have barely scratched the surface.

Given the ready availability of modern pornography, examining its sort-of origins surely possesses present-day relevance. But “The Deuce” works equally well as a snapshot of its time – or really a series of snapshots that, strung together, bring the show’s ugly reality into illuminating focus.

“The Deuce” premieres Sept. 10 at 9 p.m. on HBO.