from wikipedia
On the original release of the Master System, a hidden game known as Snail Maze is built in the console, which was a number of labyrinth puzzles with a time limit. This game can be accessed from the system BIOS by starting the system without a game cartridge inserted and holding Up the buttons 1 and 2 simultaneously.[31]
Astro Warrior is integrated into one version of the console (the Sega Base System, which was slightly less expensive and lacked the Light Phaser). Hang-On and Safari Hunt are also integrated into another version of the console. Additionally, the original North American release of the console (which included the built-in Snail Maze) came bundled with a cartridge containing both Hang On and Safari Hunt. Some versions only had Hang-On built in. Alex Kidd in Miracle World is integrated into Master System II consoles in North America, Australia and Europe. Sonic the Hedgehog is integrated into newer PAL Master System II consoles. It was later ported to the Sega Game Gear.