Little Magic (SNES)

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 English PAL demo exists, with all text translated and all levels intact.

Debug Mode
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, or use Pro Action Replay code , 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.)

Level Select
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 to. The value is normally reserved for the ending, and leads to an unplayable stage when selected here. The remaining levels ( to ) are mostly unused (see below).

Level Editor
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).

Level Copier
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.

Loop Mode
Located at ROM address 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 (or 16 in decimal), the level number is increased, then the upper four bits of the number are removed, limiting the possible values to  through.

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 code.

Unused Levels
By using the level select feature described above, a total of 21 unused levels can be played, numbered through, except for:
 * , which is a duplicate of
 * , which is a duplicate of
 * , which is a duplicate of
 * , which is a duplicate of
 * , which is a duplicate of
 * , which is a duplicate of
 * , which is a duplicate of

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 goes to stage, which is the demo stage; clearing that one proceeds into invalid levels.