A Link to the Past
Stairwell Glitch
Stairwell glitch is a glitch where Link may be forced back down a stairwell transition. This is always undesirable, and the player will want to avoid it whenever they can.
Technical explanation
There are two addresses in the game that track Link's layer: $EE and $0476. The first is more important and is the game's source of truth for most layer mechanics, but the second is also used in some routines, including when using spiral stairs. Usually, the value at both addresses will be in agreement, but sometimes they can become desynced. The stairwell glitch can occur when Link is going up a stairwell and $0476 is set to 1 while $EE is set to 0. It does not occur if the stairwell is taking Link down a floor, even if the desync in layers is present.
Stairwell glitches can be fixed by doing an on grid dash into the stairwell.
Examples
There are only a few examples that can potentially occur in speedruns.
PoD stairwell to Big Key
This stairwell is the only one that can realistically be glitched while following the standard Any% NMG route. If it occurs, it will waste around 10 seconds. There are a couple of things that need to happen for the glitch to be armed:
- You have to jump into the turtle small key room from the junction/hub room.
- Just falling won't arm the glitch. It must be done from a ledge hop.
- After mirroring from getting the turtle key, don't take any damage while going to big key.
- You bonk anywhere in the room with the stairwell.
With the above conditions fulfilled, if you just walk into the spiral stairs as normal, Link will go to the next room and automatically go right back down the stairs. Notably, the above criteria are usually fulfilled in the typical NMG route through Palace of Darkness.
If you know that you've accidentally armed this glitch, there is a way to stop it from actually happening.
- Dash into the stairwell while Link is on grid. This is generally done by lining Link up with the rail below the stairwell and doing a full charge dash turn into the stairwell.
- When you reach the top of the stairwell in the next room, your first movement needs to either be left or right.
- After seeing Link turn left or right, it'll be safe to move downward without being forced back down the stairs.
Stairwell to Agah2
This is the stairwell from the final hellway room to the room just before the Agahnim2 fight. It can be glitched by skipping the auto-stairs in Moldorm2's room. This is the main reason it's inadvisable to take a route that skips the auto-stairs via hover rail clip as that doesn't save enough time to overcome the ~10 seconds lost to stairwell glitch.
Additionally, this stairwell glitch is difficult to fix once it's armed. The tiles in front of the stairwell are all ice, so a standard grid dash won't do the trick.
