Invulnerability
At the title screen, when "PUSH START BUTTON" appears, press B, A, Right, Left, Right, Left, Down, Up, B, A, Right, Left, Right, Left, Down, Up, B, A, Right, Left, Right, Left, Down, Up, B, A, Right, Left, Right, Left, Down, Up. You'll hear a sound, confirming you did this correctly. You'll now be invulnerable to most things (spikes or energy beams can still kill you).
Stage Select
During gameplay, pause it with the Start Button, then press A, B, Right, Down, Left, Up, Right, B, A, B, Right, Down, Left, Up, Right, B, A, B, Right, Down, Left, Up, Right, B, A, B, Right, Down, Left, Up, Right, B. You'll hear a sound, confirming you did this correctly. You'll then be able to press Up or Down to select one of the levels in the game, and then can press Start to begin.