“I really admire Scott Cooper, and Johnny Depp is terrific,” Mr. Berlinger said recently. “And I understand that more people will see ‘Black Mass’ on its opening weekend than will see my movie in its entire lifetime.” But he insisted that the difference between his film and Mr. Cooper’s was not trivial. “If our institutions of government aren’t being truthful,” he said, referring to the prosecution’s eagerness to embrace the informant theory and the judge’s refusal to consider the immunity argument, “that’s not a small point. The victims deserve better.”

Partly because there were so many victims, Bostonians have taken a proprietary interest in the Bulger story. Joel Edgerton, the Australian actor who plays Mr. Connolly, said he became aware of this as soon as he flew to the United States to begin filming. The customs agent who interviewed him was from South Boston, it turned out, and when he learned the nature of Mr. Edgerton’s employment, he warned him, “Don’t mess it up” — only in language less polite.

From the beginning, Mr. Cooper said, he was aware that the Bulger story was sensitive, and he took pains with all the details — the locations, the extras, the local accent, which many fussy Bostonians are convinced that the movies never get right. “The Bostonian intonation, especially Southie, pretty much takes the cake with regards to accents,” Mr. Depp said. “Right up there with Scots!”

Mr. Depp, who is gifted at accents to begin with, is no stranger to Boston speech. (In the 2001 movie “Blow,” he played George Jung, a Bostonian who in the ’70s and ’80s was to cocaine trafficking in the United States what Jeff Bezos is to books, a near monopolist.) Mr. Edgerton had to learn on the spot, though, and rather than try to master a generic Boston accent, he said, he studied footage and recordings of John Connolly, and in the process came to understand the character better. “He was on a lot of talk shows, where he was sort of deliberately playing a part,” he said, “but then in court he let his emotions run away with him.” The actor added: “He had this swagger, sort of like a pigeon, a big-chested person swanning around. He reminded me so much of an actor on a set posing for pictures.”

The movie’s releases caused Mr. Edgerton to think about his own character, John Connolly, and others in Bulger’s circle, like the former Bulger hit man, Kevin Weeks. Mr. Weeks has confessed to taking part in five murders, and his testimony helped bring down Mr. Connolly. He shows up in Mr. Berlinger’s movie, looking and sounding neither like a bad guy nor a movie star but rather someone frighteningly ordinary.

“I had this weird protective feeling about my guy,” Mr. Edgerton said, referring to Mr. Connolly and the fact that he is serving a 40-year sentence while Mr. Weeks, guilty of far greater crimes, became a government informant and got out after a little more than five. “No doubt he went over the line,” he said of Mr. Connolly. “But still. I kept thinking, Shouldn’t we all be punished?”