Uploaded June 2020 | Updated November 2026, 2 days ago
In Ocarina of Time, there are two age-related memory addresses - "Save Context Age", which represents your actual current age, and "Global Context Age", which represents the age you will be given next time you walk through a loading zone.
Previously, we demonstrated that you can use SRM function calls to transform Link into adult. This works by changing the save context age from 1 (Child) to 0 (Adult). However the global context age keeps its old value of 1.
Every time you change scenes (such as by taking a loading zone) the game checks whether the two age addresses are equal. If not, it runs the code that swaps your buttons and equipment whenever you time travel. Then, it changes your save context age to match your global context age.
In short, what this means that when you SRM age change yourself to adult, and then walk through a loading zone, the game considers you to be traveling back in time from adult to child. The game backs up your current B and C buttons to the backup adult buttons, and then restores the backup child buttons to your current buttons. (If you've never traveled forwards through time, there are no backup child buttons, so the last step is skipped.)
If we do the age change and walk through the lz with Bottle on B, then our backup adult B button will therefore be a bottle. This is exactly the prerequisite for the Bottle Adventure glitch (youtu.be/a2rDwV9EwVo), which lets you to get any item on the B button, by traveling forward in time when the backup adult B button is a bottle. So at this point, we could pull the master sword and become adult with any B item.
This is already pretty good, but what would be even better would be if we could get FW on B while remaining child. The only way this could be possible is if we could somehow trick the game into running the "traveling in time from child to adult" code, without actually changing your age to adult.
Surprisingly, we can actually do this! By doing the age change SRM one more time, but with a different actor from usual, instead of changing our save context age to 0, we change it to the glitched value BF800000. Then the next time we load a new scene, the game will see that the two age addresses don't match, and run the code to swap your buttons. This time, the time travel code treats you as traveling from child to adult, because your save context age is BF800000, which isn't 0 (adult). Then as usual your global context age is copied back over the save context age, making it 1 (child) again.
There's just one problem left with this plan. If your age is a glitched value like BF800000, the game crashes instantly. But it turns out this crash happens in Link's draw function. If we can make Link invisible, and then only trigger the SRM afterwards, the game won't crash. And it turns out warp songs are perfect for this! They null out Link's draw function, and then pan the camera wildly, which allows you to easily start drawing the SRM-edited actor as you warp away.
Putting it all together, here are the key points of this glitch:
0:00 Begin with bottle on B.
1:04 SRM age change to adult in the normal way.
1:15 Walk through a loading zone, the game considers you to be traveling from adult to child. The bottle on B is copied to backup adult B.
1:23 Start setting up another SRM age change, the fish drop is the same as usual.
1:45 The heap manip diverges here. This is because we want to modify a gossip stone's draw pointer to jump into fish code, not a bush's draw pointer's like usual. This is so that the age value written will be BF800000 instead of 0.
2:51 Angle setup for 9108 is the same as usual, just done in a different place.
3:04 By entering the room and dropping the bush, we have SRMed the gossip stone's draw pointer. This is also a good opportunity to position ourselves in a certain general area. We need to be far enough away from the gossip stone that it doesn't draw, not even from the camera rotation from taking out our ocarina; but that it DOES draw from the camera movement of a warp song.
3:10 With Bottle Adventure, in order to manipulate the item that ends up on B to be Farore's Wind. The easiest way to do this by far is to put Fish on C-Right and have 13 deku nuts.
3:19 Play any warp song. The order of events will be this: First, the song nulls out Link's draw function. Then, the camera changes angle, causing the Gossip Stone to start running its draw function, which changes your age to BF800000. Then the scene unloads, the game Gets Confused™ and determines that you're travelling from child to adult, and copies the bottle from backup adult B to current B button. BA triggers and changes the bottle into Farore's Wind. Then the rest of the backup adult equips are also restored. Then global context age is copied over save context age, and you become child again. Finally, you spawn wherever you warped with bottle on B.
(For reference, the time travel button swap code: git.io/JfM59)
In Ocarina of Time, there are two age-related memory addresses - "Save Context Age", which represents your actual current age, and "Global Context Age", which represents the age you will be given next time you walk through a loading zone.
Previously, we demonstrated that you can use SRM function calls to transform Link into adult. This works by changing the save context age from 1 (Child) to 0 (Adult). However the global context age keeps its old value of 1.
Every time you change scenes (such as by taking a loading zone) the game checks whether the two age addresses are equal. If not, it runs the code that swaps your buttons and equipment whenever you time travel. Then, it changes your save context age to match your global context age.
In short, what this means that when you SRM age change yourself to adult, and then walk through a loading zone, the game considers you to be traveling back in time from adult to child. The game backs up your current B and C buttons to the backup adult buttons, and then restores the backup child buttons to your current buttons. (If you've never traveled forwards through time, there are no backup child buttons, so the last step is skipped.)
If we do the age change and walk through the lz with Bottle on B, then our backup adult B button will therefore be a bottle. This is exactly the prerequisite for the Bottle Adventure glitch (youtu.be/a2rDwV9EwVo), which lets you to get any item on the B button, by traveling forward in time when the backup adult B button is a bottle. So at this point, we could pull the master sword and become adult with any B item.
This is already pretty good, but what would be even better would be if we could get FW on B while remaining child. The only way this could be possible is if we could somehow trick the game into running the "traveling in time from child to adult" code, without actually changing your age to adult.
Surprisingly, we can actually do this! By doing the age change SRM one more time, but with a different actor from usual, instead of changing our save context age to 0, we change it to the glitched value BF800000. Then the next time we load a new scene, the game will see that the two age addresses don't match, and run the code to swap your buttons. This time, the time travel code treats you as traveling from child to adult, because your save context age is BF800000, which isn't 0 (adult). Then as usual your global context age is copied back over the save context age, making it 1 (child) again.
There's just one problem left with this plan. If your age is a glitched value like BF800000, the game crashes instantly. But it turns out this crash happens in Link's draw function. If we can make Link invisible, and then only trigger the SRM afterwards, the game won't crash. And it turns out warp songs are perfect for this! They null out Link's draw function, and then pan the camera wildly, which allows you to easily start drawing the SRM-edited actor as you warp away.
Putting it all together, here are the key points of this glitch:
0:00 Begin with bottle on B.
1:04 SRM age change to adult in the normal way.
1:15 Walk through a loading zone, the game considers you to be traveling from adult to child. The bottle on B is copied to backup adult B.
1:23 Start setting up another SRM age change, the fish drop is the same as usual.
1:45 The heap manip diverges here. This is because we want to modify a gossip stone's draw pointer to jump into fish code, not a bush's draw pointer's like usual. This is so that the age value written will be BF800000 instead of 0.
2:51 Angle setup for 9108 is the same as usual, just done in a different place.
3:04 By entering the room and dropping the bush, we have SRMed the gossip stone's draw pointer. This is also a good opportunity to position ourselves in a certain general area. We need to be far enough away from the gossip stone that it doesn't draw, not even from the camera rotation from taking out our ocarina; but that it DOES draw from the camera movement of a warp song.
3:10 With Bottle Adventure, in order to manipulate the item that ends up on B to be Farore's Wind. The easiest way to do this by far is to put Fish on C-Right and have 13 deku nuts.
3:19 Play any warp song. The order of events will be this: First, the song nulls out Link's draw function. Then, the camera changes angle, causing the Gossip Stone to start running its draw function, which changes your age to BF800000. Then the scene unloads, the game Gets Confused™ and determines that you're travelling from child to adult, and copies the bottle from backup adult B to current B button. BA triggers and changes the bottle into Farore's Wind. Then the rest of the backup adult equips are also restored. Then global context age is copied over save context age, and you become child again. Finally, you spawn wherever you warped with bottle on B.
(For reference, the time travel button swap code: git.io/JfM59)










