Ocarina of Time
Dynawarp
Dynawarp is short for Dynamic Polygon Overflow Wrong Warping. It is a special method of wrong warping distinct from the standard methods used in most speedruns. The results of Dynawarping vary by game version, but the most dramatic outcome is on the Master Quest and Collector's edition discs for the Gamecube. On these versions, Dynawarping is capable of repeatedly sending you to any scene in the entire game, where the destination is fully controllable in real time. Unfortunately the overhead involved in setting it up leads to it being very unwieldy to work into most speedrunning routes, and as of writing this article, the technique is only commonly used as the fastest way to Defeat Ganon without SRM.
The explanation for this glitch is a bit long and complicated, so if you prefer visual aides, this video may be preferable to you than this article:
Discovery of Dynapoly Overflow
In 2019, this video was posted which documented the disappearance of scene collision in Dodongo's Cavern, after duplicating rooms in the dungeon.
Ultimately it was discovered that this was caused by the duplication of dynapoly actors, and their collision polygons. These are actors with "hard" collision which behaves similarly to static scene collision. The main room of Dodongo's Cavern has an unusually high number of these actors, and an especially high number of associated collision polygons due to the intricacy of the giant dodongo head's lower jaw model. After blowing up the one entrance wall to get into the room proper, 252 dynapolies remain spread among 4 more such mud walls, 2 switches, 2 chests, the jaw, and the 3 moving platforms.
When duplicating the room, all actors in the room are duplicated, and therefore these collision polygons are as well. OoT has space only for 512 dynapolies at once, and this room comes the closest to reaching that limit naturally. After only two duplications, we are already over the limit, however. And the data for these excess polygons begins to overwrite the regions of memory that immediately follow, including linked lists that allow the game to keep track of scene collision polygons. By overwriting and corrupting these lists, the game could no longer keep track of some of the scene collision, and so Link was unable to interact with it. This leads to the intangible environment effects shown in the above video.
At the very end of that video however, the game crashed. So far, nothing we've gone over explains how that might be possible. So what happened?
Warping
This crash was actually an unintentional instance of dynawarping, just with improper warp parameters. To explain it, we first need some background on how loading zones work.
Loading Zones
Loading Zones are scene collision polygons flagged to load a new scene when Link is directly over them. The part of a polygon's data structure which flags it as a loading zone is 5 bits, giving room to hold a decimal number from 0 to 31. When the number is 0, the polygon is not a loading zone. When it is positive though, the number is treated as an index into the scene's exit table.
An exit table is a list of exits out of the scene, with each list entry having both an index (pointed to by a loading zone, as mentioned), and a value which is itself an index into the game's master entrance table, containing all entrances in the game. As an example, here is Dodongo's Cavern's exit table.
| Index | Entrance Table Index |
|---|---|
| 1 | 0x242 |
| 2 | 0x40B |
There are only 2 rows because DC has only 2 exits: to Death Mountain Trail, and to King Dodongo. The loading zone out to the trail is flagged with exit index 1. So if we step over it, the game will look up exit index 1, see the value 0x242, look up entry 0x242 in the master entrance table for the whole game, and what it finds there will be the information that sends you to the trail. Similarly, the loading zone to the boss room is flagged with exit index 2. When we step on it, the game will look up row 2 in the exit table, find value 0x40B, look up row 0x40B in the master entrance table, and there find the information that sends us to King Dodongo.
Corrupting Loading Zones
What happens if the loading zone's exit index value, which can hold any number from 0-31, specifies a number larger than the size of the scene's exit table. The game will simply read from the memory that far beyond the end of the table and interpret the information there as if it were part of the table. If we changed a loading zone in Dodongo's Cavern to have exit index 5, for example, the game would erroneously look for the 5th entry in the scene's exit table, which only has 2 entries. In the space in memory beyond the end of the table, where the 5th entry WOULD be, is unrelated data. The value here is 0x6733. The game interprets this as an index into the master entrance table, which itself has only 0x613 entries. So again we read beyond the table's bounds to interpret unrelated data as the information which selects our destination scene for the loading zone. On the NTSC 1.2 version of the game, for example, the data at entrance table 0x6733 is 0xF0000000. When interpreted as a warp destination, this would send you to the redead bridge at the end of the tower collapse sequence before Ganon! In summary, all that needs to be done to achieve such a warp is change one of the Dodongo's Cavern polygons to have a 5 in its exit index instead of the natural 0, 1 or 2 you would find there.
Putting it Together
Unfortunately we have no method of making such a small surgical change to an existing polygon.
