A Link to the Past
Water Walk
Water walk is a minor glitch that allows Link to walk on water as if it were dry land.
Execution
Water walk is done in two ways:
- Store a nonzero "pit state" at address
$5Band then jump southwards onto a body of deep water. - Fake flippers into the waterfall of wishing, and exit while possessing the moon pearl.
Pit state
Pit state is indicated by the value stored at address $5B in the game. When this is a nonzero value, it generally means that Link is near a pit, and the game uses this to alter Link's physics/movement. However, there are ways to leave a pit with a value that still indicates that Link is next to one.
In the practice hack, you can use the pit state indicator to help with understanding your current pit state.
Arming
The following methods can be used to arm pit state to a nonzero value:
- Dashing next to a pit and transitioning
- In the underworld, only a vertical dash will work. Specific caves are required to bring the state to the overworld.
- Dashing next to a pit and bonking
- Walking towards or across a pit and turning around during a dash (dash buffer or dash turn both work)
- Walking north towards a pit does not work.
Disarming
The following actions zero the pit state, thus disarming water walk:
- Walking near a pit
- Jumping into water and being splashed out
- Jumping southwards on the overworld
- Moving left or right in the underworld (door alignment does not count)
- Traveling with the flute
- Using the mirror
- Saving and quitting
Disabling
The following actions break an activated water walk:
- Walking onto dry land
- Taking damage
- Bonking
- Obtaining an item
- Using the flute
- Using the mirror
Explanation
Pit method
The pit method works because jumping south on the overworld is the only direction that can land on a pit that leads to the underworld. At the end of the jump, the pit variable is checked, and, if it's nonzero, it is transferred to Link's general state handler stored at address $5D. When jumping onto dry land, this effectively does nothing, as the 1 frame behavior difference isn't meaningful. When jumping onto deep water though, this state transfer overrides the swimming state. In both cases, the lack of pit is detected on the next frame, and both the pit state and Link's state handler addresses are cleared.
Water walk is disarmed in the underworld when moving horizontally but not vertically simply because those axes of movement are handled differently.
Waterfall method
The waterfall method works because possessing the moon pearl prompts Link's general state handler to be reset when exiting the underworld.
