Long before they became late-night TV stars with Jimmy Fallon or were enshrined in the Philadelphia Music Walk of Fame - which happened Thursday - the Roots tasted mainstream success with "You Got Me," a 1999 hit whose chorus was sung by a then-hugely popular neo-soul singer named Erykah Badu.

On Saturday night at the ninth annual Roots Picnic at a sold-out Festival Pier, the Philly hip-hop heroes - who were introduced by Mayor Nutter - were reunited with Texas soul woman Badu, who jointly headlined the all-day event. Other marquee acts included New York rapper A$AP Rocky, Canadian R&B singer the Weeknd, and indie-pop duo Phantogram.

Before launching into the title cut of their 2006 album Game Theory, which proudly celebrates the band's roots in "downtown Philly where it's realer than a heart attack," rapper Tariq "Black Thought" Trotter proclaimed that "anyone who knows anything about us knows there's one thing we're passionate about, and that is excellence."

In that pursuit, the Roots were assisted by Badu, who joined the band anchored by drummer Ahmir "Questlove" Thompson (and augmented by beat-boxer Jeremy Ellis), not so much as marquee special guest but more as an extended member of the Philadelphia hip-hop collective's extended family.

With a shaggy Afro and dressed in a long, flowing robe, Badu came on about 15 minutes into the headlining set, and her songs, such as "On & On," wove seamlessly in and out of jazzy Roots grooves like "Proceed" and "Mellow My Man."

More impressive still, Badu's "Love of My Life (An Ode to Hip-Hop)" sexlessly blended into Roots-ized versions of classics like Grandmaster Flash's "The Message" and Kanye West's "Gold Digger," along with a surprise performance by Philadelphia rapper Freeway and New York rap crew the Lox.

The festival kicked off at lunchtime, with Questlove's singing sister Donn T and Los Angeles songwriter Moses Sumney taking turns warming up the early crowd.

By midafternoon, the Festival Pier grounds - expanded this year to feature three stages, with the blacktop surface mostly covered with sand and wooden walkways - were packed.

On the main stage, Jamaican singer Jamar McNaughton - the reggae artist known as Chronixx - followed a set in the Oasis tent by Philadelphia DJ King Britt by conjuring a mellow, dance-hall flavored mood on the pier.

That in turn set up one of the can't-miss young talents on the Picnic undercard: 18-year-old Atlanta rock-rap singer/songwriter and bandleader Raury, a still-under-the-radar phenom who has signed with Columbia records.

He led his sharp six-piece band confidently through his share of party jams, but also pulled out an acoustic guitar and let it be known he's got serious business on his mind: "I want to write songs that are actually about things, if that makes any sense," the shirtless singer said. "Because times are too serious to be making music about nothing."

This year, the Picnic was not as strong on main-stage rock acts as in previous years, when the likes of the War On Drugs and St. Vincent have played on Penn's Landing. The job of making the rock fans among the diverse millennial crowd happy was largely left to Phantogram, the indie electronic duo from Upstate New York of Sarah Barthel and Josh Carter. They did their duty with a main-stage set pulled from their 2014 album Voices, keyboard-driven and hypnotic, that held the crowd's attention while they patiently waited for the hip-hop headliners.

Next door, Arcade Fire leader Win Butler kept bodies moving on the Oasis stage tarmac in the guise of his mix-master alter ego DJ Windows 98. Butler did an effective job mixing in Marvin Gaye and Kanye West with South African pop and Haitian rhythms, but what really made his set work were his two accompanying percussionists, who gave his mix an organic kick.

Last time A$AP Rocky appeared at a major festival in Philadelphia was at Made in America in 2013, when he showed up 20 minutes late, turned in a ragged performance, and was later sued for allegedly slapping a female fan.

The matinee-idol emcee fared much better on Saturday, focusing mainly on his terrific new album, At. Long. Last. A$AP, while paying tribute to former producer A$AP Yams (who died last year) and energetically working the stage while spitting rhymes from such deft A.L.L.A. cuts as "Electric Body" and "Lord Pretty Flaco Jodye 2."

The cheery rapper was performing the songs from A.L.L.A., which was rushed-released last week on its way to the top of the charts, for the first time live. And he didn't even mind if the stoked crowd wasn't familiar with his new material yet. "Just smoke some weed, relax, let it marinade," he advised. "Get drunk, but get home safe. I love all you [term of endearment]."

The job of setting up the hometown headliners on a cool and breezy Saturday evening was in the able hands of Abel Tesfaye, the Toronto alt-R&B singer who goes by the stage name the Weeknd. The sweet-voiced postmodern soul man is part of an underground avant-garde, including Frank Ocean and Miguel, who emerged from the underground at the turn of the decade and have all gone on to commercial success. The high-haired and even higher-voiced crooner put on a pillow-talking hit-filled show whose erotic whisperings seemed mildly inappropriate when the sun hadn't even gone down yet.