(CNN) -- Voters will determine if America is ready for a black president come November, but Hollywood, often ahead of the national curve, made up its mind about the issue ages ago.

Dennis Haysbert played the accomplished President David Palmer in "24."

On television and in film, black actors as acclaimed as James Earl Jones and as obscure as Tommy Lister have played commanders-in-chief.

Sammy Davis Jr. was only 9 when he assumed the top office in the 1933 satire "Rufus Jones for President." The film was as short as its adorable star.

But those 21 minutes were all too long on racial stereotypes. Chicken, watermelon, dice playing -- funny back then to many. Now, not so much.

Fast forward a few decades and the notion of a black man in the Oval Office provides ample joke fodder for comics such as Richard Pryor and Chris Rock.

On one episode of "The Richard Pryor Show," the comedian's short-lived '70s variety hour, he played a president hosting a press conference. During the sketch, he tells a corps of reporters that he'd seriously consider Black Panther Huey Newton for the job of FBI director -- and nearly decks one journalist who inadvertently insults his momma. And when he's asked about his fetish for white women, he jokes, "They don't call it the White House for nothing."

In the 2003 film "Head of State," Chris Rock's president, Mays Gilliam, is an even more exaggerated caricature. His populist talk is glazed with hip-hop slang. Gilliam, a community organizer, is also partial to baggy jeans and Kangol caps and looks less like the leader of the free world than the latest signing of Def Jam Records. His running mate, played by Bernie Mac, thinks NATO is a person and not an acronym.

Gilliam is catapulted onto the public stage after the sitting president dies in a plane crash. It is not the first time a black man on screen has risen to power amidst calamity. Watch how Hollywood has been featuring minority presidents for decades »

In "The Man," James Earl Jones receives the big gig after the entire cabinet perishes in a series of freak accidents. In "Deep Impact," Morgan Freeman has to calm the nation as he contends with wayward comets threatening to destroy the planet. And in "The Fifth Element," set in 2263, Tommy Lister's President Lindberg has to battle asteroids and an enemy appropriately named The Great Evil.

It's not until the hit series "24" that things start looking up for the black president. Dennis Haysbert's character, David Palmer -- in the first season a senator running for the presidency -- is handsome, composed and ready to lead on Day One. His race is a non-issue as he grapples with modern-day threats such as terrorism, bomb scares and a social-climbing wife.

Yes, he's eventually assassinated, but only after he leaves office. And Palmer's equally self-possessed younger brother, Wayne, takes the reins shortly thereafter.

Will these depictions make any difference to Barack Obama's candidacy? Who knows? But what was once the stuff of joke and fantasy could be months away from being the real thing.

All About Barack Obama