Actor Unloading

Note: This glitch is being investigated as you are reading this.

Figured out and explained by dragonbane0

It is possible to unload actors in the Wind Waker by fragmenting the dynamic memory. This is the most complex glitch in the Wind Waker.


Explanation

The game has 2 memory spaces for actor data which are dubbed the ACTor space (big; used for file data; internally referenced as ArchiveHeap; size: 0xA3F000 = 10743808 bytes or 10743.8 KB) and DYNamic space (small; for dynamic actors such as rupee spawns; stores instances of loaded actors with their runtime variables; can be used as backup space in case the ACT space runs out; internally referenced as ZeldaHeap; size: 0x63D580 = 6542720 bytes or 6542,72 KB)

  • Space gets filled up like a double linked list from top-bottom
  • Each entry points to the prior and next one. Free space has a size parameter so the game knows immediately how much can fit there
  • A separate list of loaded actors (by name) keeps track of the amount of times actors exist in the game. If the game attempts to construct an actor the counter gets increased by 1, if it gets destroyed the counter is reduced by 1. An actor gets destroyed either when you kill an enemy for example, hit a loading zone or leave the room (the actor gets destroyed after the door closes which occurs AFTER the next room loaded)
  • Once 0 instances of an actor remain in the game the memory space associated with it is declared as free (the game notes how big the space is) and the entry is wiped from the loaded actors list
  • Once you open the next door the memory manager will attempt to merge the free space with other adjacent free memory blocks which only works if there is no used memory block in-between. This process happens shortly after the next room was loaded and is intended to keep as many big memory blocks as possible and avoid a lot of smaller ones. So if you have actors loaded from room 1, the space gets declared as free in room 2 if the actor is not used in that room as well. Finally in room 3 the space will be merged as best as possible. If you kill all instances of an actor (in this case an enemy) in room 1, the space will already be declared free while you are still in room 1. Thus the memory will be merged in room 2 instead
  • Going through many rooms will naturally cause some fragmentation of this list leaving many smaller blocks in-between that can't be merged until you hit a loading zone in which case everything gets cleared
  • When a new actor needs to be loaded, the game loops through the list from top to bottom and tries to find a big enough slot to fit the data in. If an actor is too big to fit into any of them including the remaining memory at the very bottom of the list (which can only realistically happen with fragmentation and many actors loaded at the same time), the game throws an allocation error. A failsave kicks in and the game attempts to reserve space in the DYN space instead (this space doesnt get touched by file data otherwise)
  • If the DYN space is already filled as well the game throws a second allocation error and finally an archive mount error. All space is filled up or there is not a big enough slot to fit the data in, the actor can not be loaded
  • Due a programming oversight the instance counter will still be increased, but since no actor was actually spawned, no destroy process will occur if you leave the room or hit a loading zone. Thus the instance counter can only rise and will never hit 0. This creates a dead actor that will never be cleared from the loaded actor list and has no data associated with it. Thus when the game attempts to spawn an instance of that actor in the future it will already find the entry in the list and assume the actor was loaded, but since there is no pointer to any memory space the spawn process will always fail. Even if plenty of memory space is available later, the game won't attempt to load the actor object again. This can only be fixed by either overflowing the instance counter to set it back to 0 or reboot your console
  • Furthermore, the game only has 64 total slots to store loaded actor names. If you happen to fill up this list to the max by creating a bunch of dead actors, no actor can be loaded anymore period.

Filling up DYN/GAME Space

In order to start corrupting actors, you first need to lower either DYN or GAME to critical levels. This is usually done using a duping method listed below.

Arrow Duping

Discovered by R3D

When in mid-air, if you press the bow button and hold it, then press b for one frame and then switch over to the bow again, an arrow will be stuck in Link's hand. This works with any kind of arrow and this works indefinitely. Using this glitch you can fill up DYN space anywhere.

Item over Head

You can also fill up DYN by getting items stucks above Link's head. To do this, pull out an item above Link's head after playing the Wind's Requiem from a Wind Waker dive with text storage, and cancel the action of pulling it by chosing a wind direction (this is called Wind's Requiem Storage). This works with everything Link can hold above his head. This includes all trade items, the sail, letters, and spoils.

Note: Doing this with the sail also gives you Text Cancel.

A more complicated version of this also exists for NPCs rewards instead of items you can pull out. Get Text Cancel and Wind's Requiem Storage at the same time. That way, if you interact with a NPC that has a reward you will go straight to it, skipping the dialogue beforehand. Then cancel putting the item above your head with the wind prompt. In most cases the item won't be considered obtained, so repeat the process to get as many items over your head as wanted.

Forest Firefly Duping

By using the Item Swap glitch, you can dupe forest fireflies. Forest fireflies are on a timer so contrarely to the other methods listed above you can only use this technique to fill up DYN for a limited amount of time, and is limited to 200 kb max if done perfectly. As such this technique should be used to complement another.

OoB Bait Throws

Discovered by TrogWW

If you throw bait OoB, the game won't clear it properly. Every small ball of bait takes up a slot in memory. If the piece of bait that takes the right most spot in memory gets cleared then you can throw bait again. This way and combined with the fact that you can item swap bait to use them without losing any, you can throw bait indefinitely to lower DYN/GAME, but it is RNG.

Trade Item Duping at a Pedestal

If you place down a flower (or any trade item) onto a pedestal as you are falling, a flower will be stuck in mid-air. That flower is fake but still takes a slot in DYN. After doing this, pick up the real flower and do this again to dupe it.

Pot Duping

Discovered by TrogWW

Using Door Storage, you can duplicate pots in Stonewatcher. Store the Wind Emblem text where the chest with the Triforce Chart is, and store the door leading to the hub room. Store the text again then store the door leading to the bokoblin room. Pick up the pots then put them in the hub room. Open the (already opened) door leading to the hub room from the bokoblin room. Repeat this process to duplicate pots.

This ONLY works because when Link carries things above his head then the game can change the room association of the object. As such, this technique also works with frozen enemies and anything that can be carried above your head. This also works with Morths which attach to Link, and is the reason why Morth duping works.

Morths Duping

On both Outset and Forbidden Woods you have access to Morths. If you get morths to attach to Link, leave the quadrant/room and then come back you can get more morths to spawn and attach to Link. This way you can dupe morths to fill up DYN/GAME. In Forbidden Woods, simply going in and out of the room isn't enough, for some reasons you need to do this multiple times (usually around 10 times) in order for Link to get his full speed back. Only then can more Morths attach onto Link.

Enemy Sword Duping using Wizzrobes

In rooms with Wizzrobes that can spawn enemies with swords, such as Bokoblins, Moblins, Darknuts or Stalfos, kill the enemy and wait for the wizzrobe to spawn another. This duplicates the enemy sword and can be used to lower DYN.

Hyxost's Invisible Bombs

Discovered by Hyxost

A glitch known as Invisible Bombs will cause DYN space to fill up. To perform the glitch, you must pull out a bomb on the overworld before the island fully loads. This results in Link pulling out an invisible bombs that will not unload properly. By pulling many invisible bombs you can usually fill up DYN space enough to cause many of the following glitches.

Notes:

  • Picking up such an invisible bomb that is on the ground will crash your game.
  • The invisible bombs are corrupted actors and so they can also be used to go straight to corrupting and skip the filling up process. This is however very slow.

Corrupted Actors

Explanation on Corrupted Actors

  • When GAME space is extremely low, actors can fail to load. This is the case with every actor that uses up GAME, but GAME will need to be higher or lower depending on what actor it is.
  • Corrupted actors will take up a slot in DYN memory space that will not clear properly. On the japanese version the corruption will even stay through loading zones, allowing more skips than in the other versions.
  • Once you've corrupted a single actor, the game will always perform a hard reset to clear all corrupted memory when you attempt to soft reset. If you want to savewarp with corrupted actors, perform a deathwarp instead.

When the game tries to load an actor, it first loads some initialization data. That data takes up 52 bytes in memory. When you corrupt an item with high enough DYN for it, you will corrupt whatever DYN the actor you load needs. If you have low DYN, you will only corrupt the initialization data.

Corrupted Actors Documentation

Work in Progress

This section aims at documenting the requirements to corrupt each meaningful actor. Link's items are especially useful because they can be pulled out as many times as wanted to corrupt until satisfied. Otherwise, anything that can be spawned indefinitely is good.

ActorGAME max alloc needed for full corruptionDYN corrupted / DYN max alloc needed for initialization data corruption
Grappling Hook [Himo2] <37 kb 10 kb
Arrows [Arrow] <4.9 kb 1.8 kb
Bombs [Bomb] <2.4 kb 2 kb
Bomb Flowers [Bomb2] <2.4 kb 2 kb
Boomerang [Boom] <2 kb 4.5 kb
Any trade item on a pedestal [Fobj00] <1.8 kb 1.8 kb
Item drops [item] <1.6 kb 1.7 kb
All-purpose Bait [Esa] <1.4 kb 800 bytes one piece of bait, 15.2 kb a full throw (if bait is corrupted you will only corrupt what would be one piece of bait)
Hookshot none 1.4 kb

Please note again that if you try to corrupt more DYN than what your DYN max alloc is, you will only corrupt the initialization data (=52 bytes).

It is possible to corrupt a forest firefly, however only for a single frame: the game considers the firefly vanished so it clears the slot. The same thing happens with items over Link's head (actor [Ditem]).

This task is enormous since any actor in the game can be corrupted. If you want to help with anything please join our discord serveur.


Uses

Work in Progress

Forsaken Fortress 1 Cutscene Skips

DYN Fragmenting

more info to come

Deku Tree Cutscene Skip

DYN Fragmenting

To unload the Deku Tree Cutscene, you need to unload the Deku Tree actor. Once the cutsene unloads, maneuver (blind) to the potion shop loading zone and go back out. You can now obtain the leaf without watching the cutscene.

Tower of the Gods Skip

DYN Fragmenting

Discovered by TrogWW

By fragmenting DYN space using corrupted actors, you can prevent the cutscene of Tower of Gods raising from playing. This allows you to have control of Link on the cutscene map (the ADMumi map). On this map, savewarping will put you at the bell at the end of TotG, skipping all of the temple. Note that you still need to enter the temple later to get the Command Melody. This specific method is only possible on the JP version.

ACT Fragmenting

Discovered by dragonbane0

By fragmenting ACT space in a specific way, you can prevent the cutscene of Tower of Gods raising from playing by unloading the tower of the gods arc file. This allows you to have control of Link on the cutscene map (the ADMumi map). On this map, savewarping will put you at the bell at the end of TotG, skipping all of the temple. Note that you still need to enter the temple later to get the Command Melody.

Down to Hyrule 1 Cutscene Skip

DYN Fragmenting

more info to come

Helmaroc Cutscene Skip

DYN Fragmenting
Discovered by TrogWW

With a precise DYN memory setup, it is possible to skip the Helmaroc cutscene while still setting all the flags necessary to progress the game (animation set 2 and the flags for breaking the barrier later).

Courtyard Cutscene Skip

DYN Fragmenting

more info to come

Tetra to Zelda Cutscene Skip

DYN Fragmenting

more info to come

Barrier Skip

DYN Fragmenting

more info to come

Leafless Trials Skip

DYN Fragmenting (NTSC/PAL possible)

By fragmenting DYN in a very specific way and then opening the door leading to the main Trial area, the Trial door can fail to load. This also works on NTSC/PAL by filling up DYN in the first room of Ganon's Tower (using arrow dupes) and then opening the door.

Light Arrows Skip

DYN Fragmenting (NTSC/PAL possible)

It is possible to unload the wall in the Phantom Ganon's room in Ganon's tower with DYN fragmentation

Grand Staircase Skip

DYN Fragmenting

If you unload all the enemies in the Grand Staircase, the door will unlock immediately. This saves a lot of time when you are skipping the light arrows. Alternatively, you can also unload the door at the top which also skips the door opening cutscene.

Puppet Ganon Cutscene Skip

DYN Fragmenting

more info to come

Ganondorf Cutscene Skip

DYN Fragmenting

more info to come

Song Stone Unloading

ACT Fragmenting

Video showing the glitch happening:

  • ACT space fills up (and gets fragmented) if you go through the entire temple and reach the room before the song stone (even without anything stored)
  • Due to too much fragmentation/actors loaded the game can't allocate enough space anywhere for the Bokoblin actor data inside the room before the song stone. An allocation error is thrown. Game switches to the DYN space and finds enough space to store the actor data there
  • After the room before the song stone loaded, the unloading/merging process of unused actors/memory space from previous rooms frees up enough space again for the song stone actor (if you dont store a chest)
  • Storing a chest fragments the memory even more since in this case the butterfly pendant model has to be loaded and can't be cleared. This is due the instance counter remaining at 1 until you savewarp/hit a loading zone which destroys it. So that piece of memory can't be cleared and merged with other adjacent free memory while you are moving inside the dungeon. It just so happens that having this setup puts the pendant roughly in the middle of the remaining memory which results in the merging process not being able to do much since it is in the way. Thus none of the remaining slots are big enough to fit the song stone actor
  • Now the ACT space is filled up/fragmented and the reserve in the DYN space is used as a failsave for the Bokoblin actor
  • While attempting to load the song stone in this situation the game throws an allocation error for the ACT space, tries the DYN space and throws a second allocation error. The game now gives up and finally throws an archive mount error

This will permanenly unload all Song Stones in the game until you perform a hard reset.

Wizzrobe/Moblin/Stalfos Unloading

ACT Fragmenting

It is possible to fragment ACT inside dungeon by using door storage a lot to load many rooms at once. If done in specific ways it is possible to unload other actors than just the Song Stone. This works with Wizzrobes, Moblins and Stalfoses for exemple.

Wizzrobes
Moblins
Stalfoses

Early Quiver

more info to come


General Stuffs

  • Savewarping/hitting a loading zone will clear most space and fix potential problems/fragmentation. So this glitch will only work well in dungeons/overworld. To unload things past a loading zone you need to be on the japanese version and corrupt actors.
  • Door storage inside dungeons can also help to reduce available memory space
  • Most of this applies to Twilight Princess as well and could be the cause of the Devil/Ben cutscene glitch
Last updated 08/17/2019 – azer67