Triforce% run in Ocarina of Time

Speedruns come in various different flavours. The most common of which are: Any% (reach the end of the game, regardless of how), 100% (complete all side quests, get all achievements etc) or even Low% (reach the end while obtaining the lowest score (also least items, side quests etc. There is also a separate version of each of these where the run is complete without glitches. However this summer a new one was invented: The Triforce% run.

As an in-game object, the Triforce does appear in cutscenes involving the goddesses, and Ganondorf, Zelda and Link all get a piece after Link pulls out the Master Sword in the Temple of Time. That said, it is impossible to obtain it in-game since people have combed through the code for 23 years and never been able to find anything like it. Until now, that is.

Triforce run setup

In this year’s Summer Games Done Quick (GDQ) had a speed run done by Savestate in which he demonstrated the Triforce% run. The first section has Link walking around Kokiri forest like normal, getting the Kokiri Sword and gathering rupees for the shield. Then once they unlock the path between the village and the Deku Tree, the real meat of the run gets started. Then they do a glitch to lock the camera, pick up a rock and make the camera fly far, far back. The rock is blindly taken to the Deku Tree path which causes it to unload. All that’s left is to get Link to face a very specific direction and then TASbot is allowed to run.

TASbot is a script which presses controller buttons that would normally be used in speed runs to perform a ‘flawless’ run without human error. But in this case it is used to input a very specific set of control inputs after setting up this very distinct glitch. The game has been primed to interpret the controller input from all four ‘players’ as arbitrary assembly code over 20 seconds. Then control is returned back to the player and they can begin the demonstration.

Beta showcase

They first start by demonstrating the Beta features that were unlocked by the arbitrary code execution. These are part of the in-development game that were removed from the final version but still remain somewhere hidden in the code.

These include the inventory editor, an Arwing Easter egg and a sidequest with a Kokiri and a butterfly which grants mask enhancements. This quest unlocks the super bunny hood which lets Link run faster and a Gerudo mask that lets you get into Gerudo Fortress as child Link and learn the full Song of Time from Nabooru.

They also opened up a hole in Zora’s Domain to take you to a beta version of the Great Fairy Fountain called the Unicorn Fountain where you can meet the Beta Great Fairy.

Added features

Interspliced with the beta showcase was some new additions to the game that the developers included to add new functionality and content.

The first one shown is hard to show in images, but when the Full Song of Time is played, it transforms Link from adult to child and vice versa right on the spot without having to go to the Temple of Time.

The famous race with the Running Man always ends with him winning by one second, even if using glitches. The Triforce% version lets you win by glitching the in-game timer by playing the full song of time.

He then offers the giant rupee as a reward but picking it up makes it explodes and starts a boss fight with the running man, after which he rewards you with the Sage’s Charm.

The next part involves Zora’s Domain. When you complete temples as an adult, what usually happens is that the curse around the area is lifted (ie baddies leave Kokiri forest and the Gorons are returned to their home). However, beating the Water Temple fills up Lake Hylia but Zora’s domain is still completely frozen over. So they added a feature that allows Link to use the Beta Fire Medallion (Din’s Fire in the public release) to melt the ice and make it back to the way it was during the Young Link era. This unveils the underwater cave that can now be accessed with the iron boots to reach the Unicorn Fountain.

This takes Link to the Unicorn Fountain that has the Beta Great Fairy that teaches you the Overture of Sages, a famous hoax song from 1999. After that, she tells Link to go and play the song in front of the Master Sword. When he does, he gets prompted to warp to the Sacred Realm.

In the Sacred Realm, link meets all six sages who give him their blessing (even though in this run they’ve only just met).

Link then encounters Sheik, who tells him that he has power, wisdom and courage to proceed to the next area.

Here he enters the sacred vault where the Triforce is located.

After that, link starts to hear the voices of the Goddesses who promise to fulfill a wish of his.

They pick to see the future and then this happens:

Link ends up appearing in the Skyward Sword timeline on a floating Island with Zelda all using the in-game OoT engine. These are new models, animations and voice acting.

To top it all off, they manage to stream Twitch user’s comments live into the scene. The demonstration ends with a credit sequence.

How it was done

If you’re interested in programming and how this was achieved technically, this video by Retro Game Mechanics Explained does a pretty good job:

Basically, they used heap manipulation to confuse the game about what item Link is carrying. The camera is fixed while Link holds a rock, which he takes over to another loading zone (on the path to the Great Deku Tree). This unloads the rock and replaces it with what’s called a “wonder item” (a rupee hidden in the grass). Not only that, but Link’s ‘held’ item is the functionality (aka ‘overlay’) of the wonder item, not the item itself, which is the code that the mystery item executes. This allows the player to call a function by using Link’s rotation value as an offset to a location in memory. If the rotation is set correctly, this memory location can be the controller input, which is how the arbitrary code can be input.


A lot of the people who participated in the Triforce run did multiple roles, so I’m just going to put them here in billing order.

  • Sauraen
  • Savestate
  • Rebeccaetripp
  • Terusthebird
  • DwangoAC
  • CDI-Fails
  • Zel
  • Kim-Sukley
  • Defenesam
  • Ali1234
  • Unesag
  • Rankaisija
  • AeroArtwork
  • Saoirse
  • Zero
  • Yukloj
  • Z64me
  • MNGoldenEagle
  • Glank
  • Themas3212
  • Ownasaurus
  • MrCheeze
  • Swankybox
  • Retro Game Mechanics Explained
  • Hard4Games
  • HMK
  • Tetrabitgaming
  • SiivaGunner
  • Musket012
  • Gravetos
  • MZXRules
  • Tharo
  • Wiseguy
  • Jack Walker
  • Kaze Emanuar
  • Xdaniel
  • Ariana Almandoz


Review and conclusion

Ocarina of Time’s Triforce% run defies categorisation. It’s not really a speed run and it’s not really a hack but rather something somewhere in between so it has to be seen from both perspectives.

As a speed run that takes advantage of glitches, it shows the dedication that people have when it comes to examining each and every nook and cranny that the game has to offer. Not only that, but understanding the source code to the point where they can precisely identify what parts of the code is being manipulated and where in the heap any particular object is being held is quite impressive.

As a hack, the amount of time and creativity put into threading all the beta content together with new content is astounding. Not to mention being able to translate it all into assembly that was compressed into small chunks that could be run by the N64 controller input done by TASbot in just 20 seconds.

If I had to complain about anything, it would be that the idea of finding the Triforce does feel like fan service, but at least it is handled respectfully and with a sense of humour. Also there’s no easy way to reproduce the status of the game after the arbitrary code execution (as far as I’ve seen) like a save file in an emulator, an xDelta patch or a memory dump from which to explore that world yourself. It would be interesting to see how the new elements affect other parts of the game.

Overall, it’s a very impressive modification, and I would recommend anyone interested in Ocarina of Time to at least give the showcase a look. You won’t be disappointed.

Articles across the web

The Triforce% run is a speedrun in Ocarina of Time that is generated by arbitrary code execution to reveal beta content and a new quest.
Article published on N64 Squid


Subscribe to the mailing list

Follow N64 Squid

  • RSS Feed
  • YouTube

Random featured posts

Leave a Reply

Your Name (required)

Your Email (required)


Your Message