WHEN my wife asked me why I'd been out past midnight the other night on skid row, I told her, "I needed to raise my spirits."

The news has been bleak in the newspaper business lately, and my newspaper was no exception. In the last week we ran a lengthy retraction about a story involving an assault on Tupac Shakur that turned out to be based on fabricated FBI documents, and there were stories about our new owner, Sam Zell, that said our company's finances were deteriorating so badly that it faced a real risk of credit default in the next year or so.

Having just read a long list of e-mail goodbyes from staffers who'd taken a recent round of buyouts, I needed cheering up. There, on Winston Street, at the edge of downtown's skid row, was a giant Hollywood film crew, two movie stars and a director whose last film had been an Oscar best picture nominee. They were all working on a film celebrating idealism, moral courage and redemption, whose hero was -- sigh -- a newspaper columnist.

Called "The Soloist" and based on a series of columns that ran in The Times in 2005, the film stars Robert Downey Jr. as Lopez, who discovers a onetime music prodigy living on the streets, playing Beethoven on his violin in the 2nd Street Tunnel. Jamie Foxx plays Nathaniel Ayers, a musician bedeviled by schizophrenia who is slowly putting his life back together, encouraged by a friendship with the newspaper columnist.

Written by Susannah Grant ("Erin Brockovich") and directed by Joe Wright ("Atonement"), the movie wrestles with a number of complex issues, from the treatment of mental health to the dispiriting fact that Los Angeles remains the homeless capital of the nation. But what struck home for me was that at a time when newspapers are under the guillotine, losing readers and influence, Hollywood was using its formidable image-shaping power to celebrate a newspaperman who makes a difference in people's lives.

"After I read the packet of Steve's columns that [DreamWorks chief] Stacey Snider sent me, I just prayed that anyone else that might be up for the job would be busy doing something else," recalls Grant. "Journalists like Steve make a difference, but they're losing the economic support system that allows them to flourish. We're a society with a free press, yet we're throwing it away. I hoped that telling an honest, human story would be a great way to wake people up."

LOPEZ'S columns on Ayers sparked a round of calls from producers wanting to buy the film rights. At first he ignored them. Finally Lopez made a deal with the team of Gary Foster and Russ Krasnoff, in part because they were the only ones to visit skid row and meet Ayers. DreamWorks made a preemptive bid and bought the rights to Lopez's columns and book proposal (the film is co-financed by DreamWorks, Universal and Participant Media).

As Lopez wrote a book about his relationship with Ayers ("The Soloist: A Lost Dream, an Unlikely Friendship and the Redemptive Power of Music," due out Thursday from Putnam), the columnist sent Grant chapters as he finished them. Grant's script helped land Downey, a regular Lopez reader. "It felt smart," Downey explained the other night, sitting in a director's chair, a kit bag full of herbs and energy capsules balanced on his knees. "It wasn't your typical preachy, highbrow drama. In fact, you came to believe it was really a love story between these two guys."

Downey is the kind of actor who wants to get all of the specs and stats on his subject. "I e-mailed Steve and said, 'Would it be weird if I went through your closet -- your actual closet?' " he recalls with a laugh. "I didn't want to be too creepy, but you want to know what kind of inner life he had."

Lopez took Downey, Foxx and Ayers to a Disney Hall concert, where Foxx recorded everything Ayers said. Downey and Lopez also went out for dinner one night, ending up "blowing cigars," as Downey put it, at a Beverly Hills cigar club. Later, in rehearsals, Downey felt he needed to slip further into character. "He came in one day and said, 'I need a piece of Lopez. I want his nose!' " recalls Foster. "So Steve graciously allowed us to get a prosthetic mold of his nose."

Eventually, Downey dropped the idea. When Lopez visited the set the other night, he joked, "I told Robert, 'I don't think my nose would fit on your face.' "

For Lopez, who says "the only thing I know about movies is how to get to the theater," being the subject of a film has been a complicated experience -- sometimes enjoyable, sometimes disconcerting. The night I visited the set, Lopez spent part of his time giving interviews to people like me, then whipping out his note pad and quizzing an area resident who was in danger of being tossed into jail on a parole violation.

Lopez acknowledges being concerned about the public exposure, especially for Ayers, of having actors play Nathaniel and himself in the film. At one point, he even debated having the film change their names. "I was nervous, but everyone persuaded me that Nathaniel on some level really appreciated the attention, that it might boost his confidence and help with his recovery," he says. "But I did have a fear of what Nathaniel would think when he saw a bus go by him playing in the 2nd Street Tunnel with a picture of Jamie Foxx as him on the side."

Lopez also had to make his peace with the fact that "The Soloist's" young British director doesn't envision a newspaper columnist as the kind of guy who wears a baseball cap and jeans, with a reporter's notebook in his pocket, as Lopez does most days. In the scene I watched, Downey wore corduroys, an English trilby hat, and when he did an interview, he whipped out a Dictaphone.

"The Dictaphone gave us a visual prop," says Foster. "But Steve did say to me, 'Did you guys ever shoot a scene of Downey with a notebook in his pocket?' "

Lopez was less sanguine about the fact that, while happily married with a young child in real life, he is portrayed in the film as a divorced loner -- with an ex-wife as his editor.

"The divorced part was tough for me, because in so many ways, they're suggesting that this is the real deal, and they're using my real name, yet they're saying I'm divorced," he says. "Joe reminded me that one of the very first things I'd told him was, 'You have the license to make changes.'

"And I said, 'Yeah, but my wife's gonna see the movie!' "

Lopez shrugs. "For a while, whenever they'd call to ask about details, I'd say, 'What the hell do you care about the details if I'm divorced?' But I ended up saying: 'I gotta let go of these things. If they're true to the essential themes and we get some measure of redemption for Nathaniel, I should get out of the way.' "

THE movie, due out Nov. 21, also offers a measure of redemption for today's embattled journalists. Lopez says recent staff cutbacks have hit hard. "It's like we all have post-traumatic stress disorder. It's like being on a battlefield where there are bodies all around you. We're just in survival mode."

He acknowledges that during a particularly dark time he considered leaving the paper, believing he might do more good on the outside. "I still can't say I'm optimistic," he admits. "This is my seventh newspaper, and the reason I keep moving is the newspapers keep falling apart behind me. But one of the gifts I got from Nathaniel is learning that I have a passion too. Seeing how blissful he is listening to a great concerto made me realize that I felt the same way when I found a story that moved somebody or made someone think."

A movie that honors Lopez's work honors our newspaper too. Lopez is the conscience of our paper as much as he is of our city, whether he's chiding our feckless mayor, exposing the sorry state of our public schools or shining a light on our neglect of the homeless. I don't say this out of friendship -- I'd never met Lopez before we converged on the movie set. I'm simply a loyal reader.

It's telling that "The Soloist's" tale of two men helping each other in ways they could never have imagined began as a newspaper story, because the best newspaper stories are the ones that open our eyes to the world around us.

It'll take more than one film to stop journalism's downhill slide. But who would've imagined that a Hollywood movie would remind us how much newspapers still matter.