Maggie Gyllenhaal is set to star opposite James Franco in David Simon’s HBO drama pilot The Deuce. Gyllenhaal also will produce the project, a narrative set in the Times Square demimonde of the 1970s and ’80s.

The Deuce follows the story of the legalization and subsequent rise of the porn industry in New York, exploring the rough-and-tumble world that existed in midtown Manhattan until the rise of HIV, the violence of the cocaine epidemic and the renewed real estate market ended the bawdy turbulence. Gyllenhaal will play Eileen Merrell, street name “Candy,” a Times Square hooker and veteran with an entrepreneurial bent who is drawn into the fledgling industry.

The Deuce is written and executive produced by Simon and George Pelecanos, and directed by Michelle MacLaren (Breaking Bad), who also exec produces with Nina K. Noble and Richard Price. Marc Henry Johnson (A Huey P. Newton Story), who was instrumental in documenting the story, is a producer.