A Link to the Past

Ancilla Mechanics

This page provides an overview of basic ancilla mechanics that are relevant across multiple techniques in ALttP speedrunning.

Definition

An ancilla (plural ancillae) is a self-acting entity whose routines and existence are established and controlled from the 10 item array at memory address $0C4A. Or for a less technical definition, they are (broadly speaking) the entities that are spawned by Link's actions. When you place a bomb, the bomb object that spawns in is an ancilla. Arrows, the boomerang, fire and ice rod shots, the dust Link kicks up when dashing, the Z's above sleeping Link's head in the opening cutscene—these are all ancillae.

It's important to distinguish ancillae from sprites, which are things like enemies, NPCs, crystal switches, carried pots and bushes, etc. Sprites have different behavior, are controlled by different routines in the game's code, and store information at different locations in the game's memory.

Terminology

Quota

Many ancillae have a "quota", or the maximum number of that ancilla that the game will allow at once. If the player tries to load an ancilla when the quota for that ancilla-type has already been met, the game will refuse to spawn that ancilla.

As an example, fire rod shots have a quota of 2. If you try to use the fire rod while 2 fire rod shots are already on screen, you'll see that Link does the fire rod animation but a new fire rod shot is not spawned in.

Slots

There are 10 positions in the game's memory for ancillae, and we call these "slots." For practical reasons, we name/number them slots 0-9. Slots 0-4 are what we call the front slots, and slots 5-9 are called the back slots.

Ancillae don't choose arbitrary slots to occupy. Many ancillae favor spawning in the front slots and are expected to never appear in the back slots. We can call these front slot ancillae. Front slot ancillae are generally significant objects in gameplay and includes things like bombs, arrows, somaria blocks, sword beams, dash dust, etc. When the game wants to spawn one of these, it will usually (there are exceptions!) begin looking for an open slot starting with slot 4 and scanning down to slot 0.

Back slot ancillae are less significant to gameplay, often being objects that add a touch of visual flare. They include things like the sparkles that appear on Link's sword when he's charging a spin attack or the sparkles that appear on a shot from the ice rod. When the game wants to spawn one of these, it will begin looking for an open slot starting with slot 9 and scanning down to slot 0.

Irregular ancillae

Usually front slot ancillae search for a free slot from slot 4 down to 0, and back slot ancillae search from slot 9 down to 0. There are several ancillae with unique initialization routines that don't neatly conform to this behavior though.

  • Bombs, explosions, and debris from explosions only use slots 1 and 0. Spawning them outside of those slots requires misslotting.
  • Medallions: these are unusable if any ancillae are in slots 0, 1, or 2. Practically this means you can't misslot them and can't use them in an overload setup.
  • Link's blanket: this always uses slot 0.

Particle ancillae

Arrows that are stuck in a wall (ancilla ID 0x0A), the sparkles that appear with an Ice Rod shot (ancilla ID 0x13), and the sparkles that appear with a Silver Arrow, the Red Boomerang, or when Link is charging his sword (ancilla ID 0x3C) are all what we call particle ancillae. A key attribute of particles that differentiates them from other ancillae is that they can be replaced as part of a secondary search that occurs when the game can't find a free slot to place an incoming ancilla. This is an important factor in many ancilla glitches.

Particle search and the search index

If the game can't find an open slot to place an incoming ancilla, it will attempt a second search called the particle search. The game tries to look for a particle ancilla. If it finds one, it will despawn the particle to free up it's slot for the new ancilla. If it doesn't find one, the new ancilla will fail to spawn.

The search index is a name the community gives to the memory address $03C4. The value at this address determines where the particle search will begin at. For example, if the search index is set to 5, the game will start a particle search at slot 4 and scan down to slot 0. If the search index is set to 0x0A (10 in decimal), the game will start a particle search at slot 9 and scan down to 0, and crucially, this happens even if the ancilla the game is trying to spawn is a front slot ancilla.

Ancilla Initialization

When the player performs an action that spawns an ancilla, the following process usually happens:

  1. If the new ancilla spawns, would it exceed the quota for the ancilla of that type? If yes, we end here. The "item-use" animation will happen for Link if the item has one, but no new ancilla will spawn. If the quota would not be exceeded, the process continues to the next step.
  2. Search for a free slot to spawn the ancilla in starting from slot 4 (if it's a front slot ancilla) or slot 9 (if it's a back slot ancilla) and working down to slot 0. If a free slot is found, load the new ancilla into the free slot and exit. If a free slot isn't found, move to the next step.
  3. If we're here, a free front slot wasn't found. The game uses one last technique to try spawning the ancilla: it begins a particle search. This search begins from the value stored at the search index minus 1. If it finds a particle, it'll remove the particle ancilla and load the new ancilla in. If it doesn't find one, the ancilla won't spawn.

Setting index

For glitches that seek to control ancillae spawns, it's often critical that the player sets the search index to a value that enables whatever they're trying to do. By far the most common way to do this is to place a lamp flame ancilla in slot 2. This can be easily done by quickly using the lamp 3 times. The exact value this will store for the Search Index depends on which direction Link is facing when the slot 2 lamp flame is spawned:

DirectionIndex value
Up0x0D
Down0x0A
Left0x10
Right0x07

There are only a few things that can alter the search index, and its value is preserved through save and quit. This can allow players to set it well in advance of where they'll actually be doing an ancilla trick. Other actions besides slot 2 lamp that can modify the search index:

  • Using the Magic Powder (whether normally or through Fake Powder) in slot 2
  • A fairy revive (including fairy revives from a Death Hole)
  • Spawning a wall arrow ancilla when 3 wall arrows already exist. Note that a wall arrow is a different ancilla from a flight arrow.
  • Using an ancilla overload or an ancilla misslot

Ancilla Memory Layout

For a spawned ancilla, its slot number is extremely important for determining what memory it will take ownership of. For example, let's say a somaria block is spawned in slot 4. The following things will be true:

  • There's an array located at $0C04 in the game's memory which holds X-axis coordinate information for ancilla. The somaria block in slot 4 will read/write its X position data at the 4th index at $0C04.
  • There's an array located at $0C22 in the game's memory which holds Y-axis velocity information for ancilla. The somaria block in slot 4 will read/write its Y velocity data at the 4th index at $0C22.
  • There's an array located at $0C7C in the game's memory which holds the layer information for ancilla. The somaria block in slot 4 will read/write its layer data at the 4th index at $0C7C

And so on. If the somaria block were in slot 3, it would instead use the 3rd index in all of these arrays. For the purposes of ancilla glitches, this is an important model to understand. Many ancillae glitches involve the player leveraging some control over this process to get an ancilla to use "incorrect" information.

Ancilla Glitches

There are a few prominent glitches that players can use that are centered around ancillae and their mechanics.

These are ancilla glitches that the community considers minor:

  • Ancilla Overload
  • Spooky Action at a Distance

Ancilla glitches that the community considers major:

  • Ancilla Misslotting

Last updated September 20, 2026 by joshRTA