Sega Master System / Mark III / Game Gear
Hold ++ on controller 2 and then hold ++ on controller 1 until the Mode Select screen appears. You can select the starting round, number of lives, "Ninjyutu mode" (infinite magic), invincibility and a sound test.
Wait until you've collected 999
N points before using any ninja magic.
See the main page for Ninja Gaiden (忍者外伝)