Specifically the Legend of Zelda cartoon. That was the only thing it contributed to anything, ever, is that one line. And we all hate it.
"I'm sorry, boys... yeh princess is in another castle" was more likely a reference to the first game, where the Toad you rescue always says that at the end of Bowser's fake castles, "Thank you, Mario! But our princess is in another castle!"
Also: "What's with the masks? You guys shy?" A reference to Shy Guys.
"TOSS ME SOME SHELLS!" I'll let you riddle that out.
"Enough to buy
ten thousand new lives." A reference to 100 coins getting you an extra life, and how many you'd get for a million coins.
"NOW yeh playin' wit' POWAH." Referencing Nintendo Power, the gaming magazine at the time.
Mario's constant jumping.
Bullet Bill's a sniper, Lakitu's an attack chopper, Hammer Bros are sadists (and rather stupid ones).
I also think the Molotov was supposed to represent the Fire Flower.
And he was whistling SMB 2's theme, actually. The "Its'a me" line didn't come along until the N64 game, or at least that's when it became popular.
Why yes, I
am a massive nerd, thanks for asking.