A Link to the Past
Game Mode
The game mode is, in simplest terms, what the gameis currently doing as its set of routines. For the context of this article, we will consider the game mode as the exact combination of two addresses in memory: $10 and $11, which are the main module and submodule respectively. An in-depth understanding of these addresses is unnecessary for NMG categories, but understanding them at a basic level is helpful for routing and executing any transition-corrupting glitch.
Submodule
The submodule is where most of the magic of corruption happens. Fundamentally, changes to the submodule via super- and subtile transitions are incrementations instead of direct setting. Taking the underworld as an example, the main module at address $10 will have the value of 0x07. The default submodule where the player is in control and the game is "running" (sprites moving around and so on) will have the value 0x00. A subtile transition will change the submodule to 0x01, but it just does this by adding 1 to the current submodule value instead of directly setting it to 1. Usually this is fine, but if we can find some other way to change the submodule at the same time we activate a subtile door, this "just add 1 to reach the subtile transition routine" model that the game uses is subject to fail. And that's exactly what happens with most transition corruptions.
Underworld
On the underworld, the main module at address $10 will be set to 0x07. The table below shows the different submodule values and their corruptability.
| Submode Value | Submode Process | Corruptable? | Corrupted from | Notes |
|---|---|---|---|---|
0x00 | Default state; player in control | No | ||
0x01 | Subtile transition | Yes | ||
0x02 | Supertile transition | Yes | West subtile STCs | |
0x03 | Star Tile hit | Yes | non-West STCs | |
0x04 | Unlocking key door | Yes | West supertile STCs | |
0x05 | Shutter doors opening/closing | No | Not corruptable, but see non-incrementing corruptions | |
0x06 | Fat interroom stairs | No | ||
0x07 | Pit transition | No | ||
0x08 | Auto stairs that go up south to north | No | ||
0x09 | Cracked wall opening | No | ||
0x0A | Torch-induced brightening | No | ||
0x0B | Water drain | No | ||
0x0C | Water flood | No | ||
0x0D | Flood gates | No | ||
0x0E | Spiral staircase transition | No | ||
0x0F | Entrance transition | No | ||
0x10 | Auto stairs that go up north to south | No | ||
0x11 | ??? | No | ||
0x12 | Up straight stairwell | No | ||
0x13 | Down straight stairwell | No | ||
0x14 | Void scroll | No | ||
0x15 | Telepad | Partially* | ||
0x16 | Crystal switch | No | ||
0x17 | Pressure plate | No | ||
0x18 | Crystal fanfare | No | ||
0x19 | Mirror transition | Yes | ||
0x1A | Triforce door | No | Subtile mirror door |
* Telepads can be corrupted only with a YBA, but doing so results in a game crash.
Overworld
On the overworld, the main module at address $09 will be set to 0x09. The table below shows different submodule values and their corruptability.
| Submode Value | Submode Process | Corruptable? | Corrupted from | Notes |
|---|---|---|---|---|
0x00 | Default state; player in control | No | ||
0x01 | Graphics load | |||
0x02 | Trigger tilemap update | |||
0x03 | Map32 to Map16/8 conversion | |||
0x04 | Load new sprites | |||
0x05 | Start overworld scroll transition | |||
0x06 | Run overworld scroll transition | |||
0x07 | Ease off scroll transition | |||
0x08 | Finalize entry onto screen | |||
0x09 | Open big door from exiting | |||
0x0A | Exiting while facing down | |||
0x0B | Exiting while facing up | |||
0x0C | Open big door | |||
0x0D | Start overworld mosaic transition | |||
0x0E | Load subscreen and silence SFX1 | |||
0x0F | Load aux graphics | |||
0x10 | Trigger tilemap update | |||
0x11 | Map32 to Map16/8 conversion | |||
0x12 | Load new sprites | |||
0x13 | Start overworld scroll transition | |||
0x14 | Run overworld scroll transition | |||
0x15 | Ease off scroll transition | |||
0x16 | Fade back in from mosaic | |||
0x17 | Start overworld mosaic transition | |||
0x18 | ||||
0x19 | ||||
0x1A | Load aux graphics | |||
0x1B | Trigger tilemap update | |||
0x1C | ||||
0x1D | ||||
0x1E | ||||
0x1F | ||||
0x20 | Reload subscreen overlay | |||
0x21 | ||||
0x22 | ||||
0x23 | Mirror warp | |||
0x24 | Start overworld mosaic transition | |||
0x25 | ||||
0x26 | Load aux graphics | |||
0x27 | Trigger tilemap update | |||
0x28 | Load and build overworld screen | |||
0x29 | Fade back in from mosaic | |||
0x2A | Recover from drowning | |||
0x2B | ||||
0x2C | Mirror bonk | |||
0x2D | Flute activation | |||
0x2E | Whirlpool | |||
0x2F | Whirlpool |
Non-incrementing corruptions
LSD Blind
By pressing , drinking a potion, or opening the map as Blind enters the light in her room, the game may enter submode 0x05 of main module 0x0E. This will create one or both of the iris wipe effects used by the Desert prayer along with a mesh of vibrant colors replacing most of the game's palettes. The latter only appears to occur on certain frames with the save-and-quit menu, and it's where the name of this glitch comes from. Using the mirror will begin the mosaic effect, leaving the screen in that filter when it's interrupted. This is caused by the door of the room attempting to close, which sets the submodule directly to 0x05. Since the main/submodule combination of 0x0705 never occurs, the shutter door at the bottom of Blind's room will remain open.
Jingle glitch
Main article: Jingle glitch
When stairs are used at the same time that shutter doors open or close, the submodule takes on its value of 0x05 directly. The actual execution of most scripts behaves as normal here, but this change does interrupt some data transfer and coordinate functions, leading to the sprite offset and some data spoofing.
