“42” is several movies in one. It’s a valuable history lesson, an intelligent drama that hits all the right emotional buttons, and an inspiring portrait of a true American hero. It is also, at times, a prime example of Hollywood schmaltz, stuffed with more processed cheese than a gas-station danish. Overall? It’s great, the sort of all-embracing sports movie that lifts an audience to its feet applauding.

The story of Jackie Robinson and Brooklyn Dodgers General Manager Branch Rickey, the trailblazers who broke professional baseball’s color barrier, gets its dramatic balance right.

With a legend such as Harrison Ford playing Rickey and the far lesser-known Chadwick Boseman as Robinson, this might have become another patronizing movie in which blacks become supporting players in their own stories. Instead they and writer/director Brian Helgeland (Oscar-winning screenwriter of “L.A. Confidential” and many more) create multidimensional, emotionally complex men. Like the Hall of Famer he plays, Boseman enters this game a promising rookie and leaves the field a champ.

Robinson was signed in 1947 by the notoriously tightfisted Rickey to draw Brooklyn’s black baseball fans to Ebbets Field. “Money isn’t black or white. It’s green,” Rickey tells his dumbstruck underlings when he proposes the unthinkable move.

The film argues that his motives were not so shallow. Baseball at the time was decidedly not “America’s game,” since Americans who were not white could not play professionally. A pious Methodist, Rickey aims to fix that injustice. He sees in Robinson a man with biblical strength of character, who can maintain stoic dignity in the face of racist taunting and death threats from fans. Years earlier, as a college baseball coach, Rickey had failed to do all he could to protect a black player from humiliation; through Robinson he hopes to atone for past sins.

Robinson, an individualist and a team player, wants to prove he’s any man’s equal, if not better, on the field. A veteran of World War II, he sees bigotry as a scourge like fascism, and integrating the national pastime as a blow against continued injustice. And he wants to provide for his wife (charmingly played by Nicole Beharie) and newborn son.

Boseman is engaging and convincingly athletic, swinging with authority, diving headlong across the plate and nabbing speeding balls like frogs eat flies. He’s also up to the demands of a big role, giving us flares of rage and dark moments of despair, frustration, confusion. This is not the deified Jackie Robinson of popular imagination but a man of uncommon courage who struggled to maintain his composure and shrug off vitriol while outplaying everybody else.

The film captures the look of vintage ballparks and the zeitgeist of America years before the civil rights movement. Whites Only accommodations, racist violence and vile slurs are commonplace.

Alan Tudyk sheds his usual comic charm to play Ben Chapman, the Philadelphia Phillies manager whose verbal harassment of Robinson makes for “42’s” most painful scenes. When he’s forced by the league to have a photo taken with Jackie to signify that African-American players would be accepted in Philly, his expression of discomfort provides one of the film’s biggest laughs. For pure comedy, though, nothing can top Hamish Linklater as Robinson’s teammate Ralph Branca, whose well-intentioned invitation for Jackie to relax and share the showers with him comes out all wrong.

“42” is hokey at times, and inspirational nonetheless. It re-creates an era that should not fade into memory and demonstrates how small daily acts of courage can be revolutionary, not just in baseball but in life.