Uploaded January 2020 | Updated November 2026, 58 minutes ago
In this video, I use stale reference manipulation and arbitrary code execution to wrong warp into the credits from the very beginning of the game, in Kokiri Forest. This cuts the amount of time needed to beat Ocarina of Time any% lower than it has ever been before.
The reason this is possible is because of "Camera Lock SRM", a new kind of SRM which was originally discovered by Hylian Freddy of the Ocarina of Time 3D community, and researched further by Blini and Fig.
In general, to achieve SRM, we want to move Link one room to another while holding or picking up an actor, so that the actor unloads but Link is still pointing at the part of memory where the actor used to be loaded. The reason that we can't simply pick up a rock and walk over to the Great Deku Tree's room to achieve SRM, is that whenever a holdable actor's main update function runs, it will check whether it's being held or not. If it is being held, the actor sets its own associated room to -1, a value which means that the actor should not unload no matter what room Link is in.
Separately, whenever an actor is far from the camera view, it becomes "culled", meaning its draw and update functions do not run. If we can pick up a rock and immediately cull it, and keep it culled the entire time as we walk over into a differerent room, it will never set its room to -1, and will unload, thereby achieving SRM. Using the Walking While Talking glitch to lock the camera near the crawlspace far from Link, we can achieve exactly that.
Once SRM is achieved, our goal is to leverage that into ACE, and use that to immediately warp into the credits and beat the game. It's worth taking a moment here for a moment to discuss why we're playing on the Chinese iQue version of OoT, the strangest and most obscure release of the game. Essentially, Ocarina of Time has been released on four platforms:
- Nintendo 64: The original builds of the game, running natively.
- iQue: A console unique to the Chinese market, which shares some hardware with the N64 but also has unique characteristic. The builds for this version were created a few years later, but still run natively.
- GameCube: Yet another set of builds of the game, that are only possible to run via a Nintendo-made emulator. This emulator dynamically transforms all N64 code it runs into GC code via Just-In-Time compilation (JIT).
- Virtual Console: Available on Wii and Wii U, this likewise emulates the game via JIT. However it emulates the original N64 builds of the game.
Achieving arbitrary code execution on GC and VC is all but impossible. The reason for this is how the JIT works: rather than only look at the current N64 instruction being executed, it will "look ahead" and try to detect an entire valid function, and compile the whole function at once. If it sees any invalid opcodes before it reaches a return instruction, the game will just crash (thanks KrimtonZ for researching this). Setting up an entire valid function in manipulable memory on the heap is not likely to ever be possible.
The N64 and iQue, on the other hand, look at one opcode at a time and do not have this issue. The difference has to with heap memory allocation. The N64 builds of the game, being the oldest ones made, include certain debug information in the header of each block of memory that gets allocated on the heap, making each block have a header of size 0x30. The iQue and GC builds removed this debug info so that the header size is only 0x10. Because of this, the arrangement of blocks in the heap will follow different patterns on N64 versus iQue/GC, and a heap manip that works with 0x30 headers will not work with 0x10, and vice versa.
At least theoretically, finding heap manips that lead to ACE is equally possible regardless of 0x30 or 0x10. But right now, despite a fair bit of heap manip research by me, Blini, and Tharo, we currently have several viable manips for 0x10 and none for 0x30. So for the time being, the iQue - being the only version of the game with 0x10 headers and no JIT - is the fastest possible way to beat the game. Long live the Chinese cheat box.
Breakdown of the video:
3:35-11:35 The setup section. There are four mandatory prerequisites before we can get into the SRM itself. We need nuts to be able to trigger WWT; Ocarina, which lets us manipulate camera while WWT is active; and slingshot, because it lets us fire a seed at a semi-arbitrary angle that lets us write a custom opcode onto the heap. We also need to move Mido out of the way, which requires sword/shield/rupees. Finally, it's worth mentioning I don't get any of the "one-time" blue rupees in the main room of Kokiri Forest, as that could potentially affect the heap manip later.
(description too long, check pastebin for the full thing: pastebin.com/tc6x2Uhi)
In this video, I use stale reference manipulation and arbitrary code execution to wrong warp into the credits from the very beginning of the game, in Kokiri Forest. This cuts the amount of time needed to beat Ocarina of Time any% lower than it has ever been before.
The reason this is possible is because of "Camera Lock SRM", a new kind of SRM which was originally discovered by Hylian Freddy of the Ocarina of Time 3D community, and researched further by Blini and Fig.
In general, to achieve SRM, we want to move Link one room to another while holding or picking up an actor, so that the actor unloads but Link is still pointing at the part of memory where the actor used to be loaded. The reason that we can't simply pick up a rock and walk over to the Great Deku Tree's room to achieve SRM, is that whenever a holdable actor's main update function runs, it will check whether it's being held or not. If it is being held, the actor sets its own associated room to -1, a value which means that the actor should not unload no matter what room Link is in.
Separately, whenever an actor is far from the camera view, it becomes "culled", meaning its draw and update functions do not run. If we can pick up a rock and immediately cull it, and keep it culled the entire time as we walk over into a differerent room, it will never set its room to -1, and will unload, thereby achieving SRM. Using the Walking While Talking glitch to lock the camera near the crawlspace far from Link, we can achieve exactly that.
Once SRM is achieved, our goal is to leverage that into ACE, and use that to immediately warp into the credits and beat the game. It's worth taking a moment here for a moment to discuss why we're playing on the Chinese iQue version of OoT, the strangest and most obscure release of the game. Essentially, Ocarina of Time has been released on four platforms:
- Nintendo 64: The original builds of the game, running natively.
- iQue: A console unique to the Chinese market, which shares some hardware with the N64 but also has unique characteristic. The builds for this version were created a few years later, but still run natively.
- GameCube: Yet another set of builds of the game, that are only possible to run via a Nintendo-made emulator. This emulator dynamically transforms all N64 code it runs into GC code via Just-In-Time compilation (JIT).
- Virtual Console: Available on Wii and Wii U, this likewise emulates the game via JIT. However it emulates the original N64 builds of the game.
Achieving arbitrary code execution on GC and VC is all but impossible. The reason for this is how the JIT works: rather than only look at the current N64 instruction being executed, it will "look ahead" and try to detect an entire valid function, and compile the whole function at once. If it sees any invalid opcodes before it reaches a return instruction, the game will just crash (thanks KrimtonZ for researching this). Setting up an entire valid function in manipulable memory on the heap is not likely to ever be possible.
The N64 and iQue, on the other hand, look at one opcode at a time and do not have this issue. The difference has to with heap memory allocation. The N64 builds of the game, being the oldest ones made, include certain debug information in the header of each block of memory that gets allocated on the heap, making each block have a header of size 0x30. The iQue and GC builds removed this debug info so that the header size is only 0x10. Because of this, the arrangement of blocks in the heap will follow different patterns on N64 versus iQue/GC, and a heap manip that works with 0x30 headers will not work with 0x10, and vice versa.
At least theoretically, finding heap manips that lead to ACE is equally possible regardless of 0x30 or 0x10. But right now, despite a fair bit of heap manip research by me, Blini, and Tharo, we currently have several viable manips for 0x10 and none for 0x30. So for the time being, the iQue - being the only version of the game with 0x10 headers and no JIT - is the fastest possible way to beat the game. Long live the Chinese cheat box.
Breakdown of the video:
3:35-11:35 The setup section. There are four mandatory prerequisites before we can get into the SRM itself. We need nuts to be able to trigger WWT; Ocarina, which lets us manipulate camera while WWT is active; and slingshot, because it lets us fire a seed at a semi-arbitrary angle that lets us write a custom opcode onto the heap. We also need to move Mido out of the way, which requires sword/shield/rupees. Finally, it's worth mentioning I don't get any of the "one-time" blue rupees in the main room of Kokiri Forest, as that could potentially affect the heap manip later.
(description too long, check pastebin for the full thing: pastebin.com/tc6x2Uhi)




![Achieving ACE-like effects without ACE (Arbitrary Function Calls)
In Ocarina of Time, we can use arbitrary code execution glitches to accomplish literally anything. Even so, there are certain disadvantages to doing so: for one, true ACE isnt possible on VC, because of how the recompiler works.
What is possible on VC, however, and legal in the OoT ruleset as of today, is arbitrary manipulation of function pointers. Currently this is used for obtaining items early (Pot Chest/Butte Chest), but this vastly understates the power of this... There are entire classes of programming (e.g. Return-Oriented Programming) that assume as a given that you have control over the instruction pointer, but not the ability to craft payloads.
In any case, what is shown here is a method to call any loaded function in the game, instead of the limited selection that editing draw pointers gives us. The function to call is specified in the filename - but unlike previous videos, the filename is not code. Instead, we jump into the middle of a pre-existing function in the middle of the sign overlay, in such a way that registers arent set up as the function expects. The game tries to load the data address to jump to next from elsewhere in the overlay (specifically from address 8020ACA4), but instead ends up loading it from the filename (address 8011ACA4). This is enough to let us call any function, although we have no control over what arguments get passed to it. Not quite the level of true ACE payloads, but theres still big things you can do with this.
(The fact that both addresses end with ACA4 is not a coincidence. This technique only works because the lower half of the address the game thinks its reading, and the address we actually want it to read, are the same. But overlay code is relocatable, so we can find a heap manip that places the overlay at exactly the right location in memory so that the lower halves will match. Because of this additional requirement, the heap manip used here is slower than the one in any%.)
The following function effects are shown off in this video (all addresses are NTSC 1.2). All of them are possible to type as filenames on 1.2 except for the last one, but I showed it anyway because some related technique should make it possible also.
8009073C load title screen save
80090610 load empty save
800818C4 edit upgrades
80081760 edit equipment
80073FA0 trade sequence timer
80070130 give [broken?] giants knife
8006FE64 change equips as if travelling through time
Some of these functions take arguments and so the exact effect (e.g. what equipment you get) depends on the exact heap used, as well as on the build of the game. For the time travel effect, the effect changes once youve been adult for the first time, as usual.
Setup:
Play on J 1.2 - not J 1.0 as all my previous videos have been.
In the main Kokiri Forest room, grab none of the one-time rupees except for the two that I backflip for.
The transitions in the hallway need to be done as shown in the video.
Unlike previous setups, we need to cut one particular bush before entering the crawlspace to get WWT.
The rock needs to be dropped with angle 8090. To get this angle, first lock Link and the camera to angle 8000. Then walk towards the camera for a bit without rotating it and then stop. The camera will pan around from 8000 down to 0000. On one of the intermediate frames, the camera angle will be exactly 0090 - press directly down on this frame to set Links angle to 8090, and drop the rock there.
If everything was done correctly, the draw function pointer at of a certain bush will have been corrupted (the value at 8020E034 will be 80208090). Every time you draw the bush, the game will look at the first half of your filename, and jump to whatever function it points to. For most choices of function, you now just have to go near the rock, but in the special cases of functions that overwrite your filename - especially the title screen file - you need to make sure to run the code for only one frame by standing in a certain position and rotating with c-up.
Note: the value that determines what function the game jumps to doesnt necessarily have to be filename, with techniques like this. With this heap manip, it will be, but with a different heap you could (for example) use controller 1 or 3 to point to the function location instead. This would be good because some values cant be typed in the filename - especially if playing on a non-japanese cart - and because you can change the controller inputs to call multiple functions. Achieving ACE-like effects without ACE (Arbitrary Function Calls)](https://i.ytimg.com/vi/e-KrKn5D59w/mqdefault.jpg)





![Bypass Goomba Village yellow block from right (5 methods) [OBSOLETE]
Hammer, Super Boots, Bombette, Parakarry, Laki all work. For use in rando after doing one of these:
https://www.youtube.com/watch?v=iZ1_CBEKUrg
https://www.youtube.com/watch?v=f9vkKj9MMRc
In vanilla, the Bombette method wont make the block disappear until you reload the map - see here: https://twitter.com/MrCheeze_/status/1511910864282173441
Jumping on the block from the left doesnt seem to be possible, so Hammer or Bombette must be used if coming from that direction.
UPDATE: No items/partners are needed, just do this instead: https://www.youtube.com/watch?v=gClrnYAbF0Q Bypass Goomba Village yellow block from right (5 methods) [OBSOLETE]](https://i.ytimg.com/vi/f1jOnrlu4Po/mqdefault.jpg)