A Link to the Past
Underworld Map
The underworld map, also sometimes called the EG map, is a map displaying the true arrangement of all the game's indoor rooms. In normal gameplay, the game hides this from the player in a few different ways. However, the organization and mechanics of the overall map can be important to understand, especially for runs that allow major glitches.
Fully annotated map
A fully annotated version of the map can be found below. Click the image to view it in full size.
This map has a wealth of information to help with understanding rooms' relationships to each other as well as how data is organized in rooms. Here is a key:
- Red borders: supertile boundaries
- Cyan borders: quadrant boundaries
- Hex number in top left corner: room ID
- Hex number next to falling Link sprite: warp destination (the room ID of the supertile Link will be taken to if he falls in a pit or steps on a telepad)
- Supertiles with green borders: supertiles that set strong EG
- Supertiles with orange borders: supertiles that set weak EG
- Supertiles with yellow borders: supertiles that kick Link in-bounds
- Numbers on doors and chests: reveal the organization of this data with a supertile. This is relevant for transition corruption glitches, especially data spoofing.
- Red doors: shutter doors that are inaccessible to Link—in other words, a one-way door.
- Orange doors: auto doors, or shutter doors and cracked walls that Link can access and use.
- Blue doors: locked doors
- Yellow doors: normal doors
Terminology
Supertiles & subtiles
Two adjacent supertiles on the underworld map. The right supertile is one large room, and the left one is divided into four subtile rooms.
The underworld is made up of a grid of 256 (16x16) "supertiles". Supertiles can be organized in a few different ways. They can be an entire room to themselves, or they can be divided into smaller rooms called "subtiles". There can be up to four subtiles within a supertile.
One of the main reasons the distinction between a supertile and a subtile is important is because the game undergoes a very different process for a transition between supertiles compared to a transition between subtiles. For example, moving from one subtile to another won't reset the sprites in the room Link moved out of. If the player immediately returns to the subtile they left, they'll find any enemies, rupee drops, etc. (sprites) in the same place they were left in. But on a supertile load, the game will forget about the previous room's sprite states as it loads in the sprite data for the new supertile.
These subtle differences are sometimes meaningful in NMG gameplay, but they're incredibly meaningful for a lot of major glitch speedruns. For example, transition corruption glitches will function differently depending on the type of transition that Link is using.
Quadrants
Two adjacent supertiles on the underworld map. The right supertile is a single large room made up of four quadrants. The left supertile has three subtiles—two small rooms occupying one quadrant each and a long room made up of two quadrants.
Quadrants are invisible boundaries that divide supertiles. The game tracks which quadrant Link is in within a supertile and uses this data when Link transitions between rooms. Through transition corruption glitches, the game may regard Link as being in a different quadrant that where he actually is, which can make transitions behave in unusual ways or may even make quadrant boundaries behave as supertile transitions.
Wrapping
If the player crosses a supertile boundary at the edge of the map, they will "wrap" to the other side. For north/south wrapping, Link will be placed at the opposite end of the map on the same column as the supertile he transitioned from. For east/west wrapping, he will be placed on the opposite side one row above (for west transitions) or one row below (for east transitions). Transitioning east in the supertile with id 0xFF will place Link in supertile 0x00. And vice versa for transitioning west in supertile 0x00. Transitioning north in supertile 0x00 leads to the Triforce cutscene and credits rather than wrapping the player down to supertile 0xF0 like normal.
Wrapping the map has a major consequence of "displacing" all sprites in the underworld. This includes things like enemies and crystal switches. They'll technically be loaded, but the game interprets their positions as being very distant from Link. And sprites that are far away from Link are in an inactive state.
This can work to the player's advantage (removing obstacles that would otherwise need to be dealt with) or disadvantage (removing enemies they wish to defeat).
EG strength
EG strength refers to an address in the game's memory, $044A, that identifies how a room should handle layer interactions. The annotated map's border highlights show how different supertiles influence EG strength. Supertiles will do one of the following:
- Set EG strength to 1. This is known as strong EG.
- Set EG strength to 2. This is known as weak EG.
- Leave the value alone entirely
For the purposes of entering EG, EG strength must be strong. For more information, see: Exploration Glitch
Warp destinations
The warp destination is a value that tells the game where to take Link if he falls in a pit transition or steps on a warp tile. Every supertile has a warp destination, whether it has an intended warp or not. The map shows what the warp destination is for each room, and this is useful for understanding and researching wrong warp applications.
Death room
The upper right quadrant of the supertile with room ID 0x2D is known as the "death room". This is because visiting this room at all will crash the game.
For obvious reasons, it's important to avoid this room in most speedruns, and runs that use EG will be sure to route around it if the room is ever nearby. There's an extension leaderboard category called Death Room RTA where the end goal is to reach the Death Room as quickly as possible.
Secondary Map
Looking at the map linked above, you may have noticed that it's missing quite a few rooms in the game. Where's Link's house? Where's hype cave?
This is because that's the primary underworld map, which includes every room in every dungeon as well as every room in the caves and houses that contain multiple exits to the overworld. The caves and houses with single exits to the overworld though (like Link's house and hype cave) are on a secondary map, also sometimes known as the EG2 map.
This map is smaller and has a few mechanical differences compared to the primary map.
Fully annotated secondary underworld map
A fully annotated version of the secondary map can be found below. Click the image to view it in full size.
Differences with exiting to and entering from the overworld
The game's routine for entering and exiting the secondary map from/to the overworld functions differently compared to the process used for the primary map. When Link enters a room on the secondary map from the overworld, the game stores Link's coordinates and reuses them when he exits to determine where to place him. This means if the player enters Room A from the overworld, uses a glitch to reach Room B, then uses the overworld exit in Room B, Link will still be placed at the entrance to Room A back out on the overworld. This is completely different from how the primary map functions, where when Link exits to the overworld, he will be placed directly at the overworld entrance that corresponds to that exit. This mechanic has advantages and disadvantages. Players can't use the secondary map to travel around to different parts of the overworld, but they can glitch around a few rooms and get back to where they were without needing to visit the room they originally entered the underworld from.
Related to the point above: when a player is on the overworld with a broken camera or transitions, this can be fixed by using an entrance to the primary underworld map and then exiting back to the overworld. This isn't true for the secondary map though. If the player enters the secondary map while the overworld is in a broken state, it will still be in that broken state when they exit.
Differences with wrapping
There are more limitations on wrapping the secondary map than on the primary map. These maps are really abstractions that help us as humans visually organize the information. The game itself has no such "map". When Link uses a south transition, the game takes his room ID and adds 0x10 (or 16 in decimal) to figure out what room he should go to. The primary map has room data for 256 rooms, and with the room ID having 8 bits of precision, there's no transition Link can take where the math doesn't work out. Transitions on the north and south edges of the map will wrap around due to integer overflow. The secondary map only has 40 rooms though. If Link transitions south where the room ID is 0x22, the game will add 0x10 and get 0x32. But there isn't a supertile with that ID on the secondary map, and the game has no way to fetch that room's data or resolve the transition. This will result in a crash. There are still wraps that can be done at the left and right edges of the secondary map—players just need to make sure that whatever room they're transitioning to actually exists.


