Sega Master System / Mark III / Game Gear
Hold down + while powering on the system.
Using controller 2 throughout, hold down + as the title screen appears (the screen with the gun), then press any button to access and use the sound test.
This also activates a stage select (press / on the round screen), stage skip (press on controller 2 in-game) and extra lives (press on controller 2 to increase lives and on controller 2 to decrease lives).
See the main page for Line of Fire