Little Magic (SNES)
This game has a prototype article
Little Magic is a cute puzzle game about the witch-in-training May, who has to push a magic stone through 100 increasingly dangerous stages in order to pass her final exam and graduate from magic school.
It was only released in Japan, though a nearly-complete European demo exists, with all text translated to English and all levels intact.
The game started out as a sequel to Toki; are there any leftovers?
The very first byte of the game's ROM contains a flag which enables a level select, level editor, and level copy function. To use them, set the first byte of the ROM to FF, or use Pro Action Replay (PAR) code 008000FF, then press Select + Start during the game.
(Note that enabling this flag removes the ability to use Select or Start individually to pause the game or restart the level.)
Selecting "Play" activates the level select. Use Up/Down to select a stage, B to play it, or A to return to the debug menu. Pressing Left/Right alternates between moving through levels one at a time or 16 at a time.
The possible stage values go from 00 to 7F. The value 64 is normally reserved for the ending, and leads to an unplayable stage when selected here. The remaining levels (65 to 7F) are mostly unused (see below).
Selecting "Edit" goes to the editor. After selecting a level to edit, you will then be able to select a tile set to use ("jungle", "volcano", "ice land", "pyramid", "chitei", or "last").
When editing, two tiles are displayed on the right side of the screen. The first is the tile which is currently under the cursor, while the second is the tile that is currently selected for placement. Pressing Y and X cycle through the available tiles, and B places it at the cursor's location. L and R cycle through the different sprites which can be placed at the current tile.
Moving the cursor to the right side of the screen lets you select "fill" (which fills the entire level with the currently selected tile), "save" (which saves the level), and "ESC" (which exits the editor). Note that changes to levels cannot actually be saved, since the game attempts to write them directly to the cartridge (which is read-only).
This option supplements the level editor, and lets you copy an entire level directly over another one. Again, however, this doesn't do anything anymore, as the data is still written to the read-only cartridge.
Located at ROM address 0080FA is this small bit of code:
0080FA: LDA #$80 0080FC: CMP #$10 0080FE: BEQ $811F [...] 00811F: LDA $58 008121: INC 008122: AND #$0F 008124: STA $58
When advancing to the next level, this code checks a hardcoded value representing the number of levels available in the level select/editor. If this value equals 10 (or 16 in decimal), the level number is increased, then the upper four bits of the number are removed, limiting the possible values to 00 through 0F.
This causes the game to loop through the first 16 levels of the game endlessly until the player runs out of lives or quits. It's possible that this is a remnant of a prototype of the game even older than the two sample versions known to exist.
This behavior can be restored using the Pro Action Replay (PAR) code 0080FB10.
By using the level select feature described above, a total of 19 unused levels can be played, numbered 65 through 7F, except for:
- 6D, which is a duplicate of 5B
- 6E, which is a duplicate of 5C
- 70, which is a duplicate of 5D
- 72, which is a duplicate of 5E
- 74, which is a duplicate of 60
- 75, which is a duplicate of 61
- 76, which is a duplicate of 62
- 77, which is a duplicate of 63
- 7C, which is a duplicate of 5F
These levels don't have valid passwords, and the map screen is not shown when moving from one level theme to the next. Clearing stage 7F goes to stage 80, which is the demo stage; clearing that one proceeds into invalid levels.