LADX RAM addresses

From ZeldaHacking Wiki
Jump to navigation Jump to search

LADX v1.0 (JP)

RAM Bank 0 (C000-CFFF)

General Variables

Address Purpose
c10a Link's collision flag (false - will not interact with environment; true - will interact with environment)

Normally flipped to false when hopping ledges, and true when landing from any aerial condition (such as jumping with the Roc's Feather.)

c11a-c11b Link's sub-X and sub-Y positions (for some reason, the developers decided to never use the second bit of each byte)
c11c Link's swimming flag.
c11d-c11e Seem to be used to flip Link's graphics horizontally.
c11f The condition of the ground Link is standing on? (0x00 - dry ground; 0x01 - steps (only when moving); 0x03 - wet or grassy; 07 - pit.)
c122 Spin-Slash charge meter (0x28 - fully charged).
c13d RNG variable.

Advanced whenever an object calls for its use, or when Link swings his sword.

c146 Link's aerial flag.
c14b Pegasus Boots charge meter (0x1F - fully charged)
c14d Link's active projectiles.

If ≥0x02, Link cannot shoot any more projectiles.

c14e Link's active bombs.

If ≥0x01, Link cannot drop any more bombs (without the use of U+D/L+R).

c159 Counter used in the inventory menu to flash the cursor (every 16 frames).
c17f Debug Movement Mode flag.
c191 Ledge Jump meter (0x0A - Link hops the ledge)

Increments by 2 each frame. Activates when Link is both facing the same direction as the ledge and colliding with it.

c1c0 Bomb-Arrow cooldown.

Gets set to 6 whenever Link uses the bow or drops a bomb and then decrements by 1 each frame.

There are 16 object slots. For the following variables, each address listed extends for 16 bytes, with one byte for each object.

Object Variables

Address Purpose
c200 X positions
c210 Y positions
c240 X velocities
c250 Y velocities
c290 State variables?
c2e0 Timer variables
c380 Direction variables (0x00 - east; 0x01 - west; 0x02 - north; 0x03 - south.)
c350 Despawn cooldown variables?
c460 The index of the object loaded? (the first object on the screen is "0", the second is "1", etc)

RAM Bank 1 (D000-DFFF)

General Variables

Address Purpose
d401-d405 Warp 0 data (for more info, see Wrong Warp)

d401 Map Category (0x00 - Overworld map; 0x01 - Underworld or Dungeon map; 0x02 - Side-scrolling map.) d402 Sub-Map d403 Room in Sub-Map d404-d405 Post-Warp X and Y positions (respectively.)

d406-d40a Warp 1 data
d40b-d40f Warp 2 data
d410-d414 Warp 3 data
d415 Piece of Power kill counter
d416-d419 The positions of each warp/door on the screen. Format: YX, where Y and X are 4 bits each. (d416 corresponds to "warp 0 data")
d471 Guardian Acorn kill counter
d47c Piece of Power state. 0x01 means you have PoP active.
d6fb Toggle block state. Values of 0x00 and 0x02 are used for on/off.
d800-d8ff 0x01-0x02, 0x08, 0x40 - These values haven't been observed;

0x80 - This bit is set to 1 if the room has been visited. If unset, the room will be grayed out on the map, but it can be examined if any other bit is set;

0x20 - This bit is set to 1 if an NPC cutscene has completed. This includes walrus, owl, and mermaid;

0x10 - This bit is set to 1 when other cutscenes or events occur. This includes opening dungeons, collecting the sword or seashells, or destroying shrubs which block stairs;

0x04 - This bit is set to 1 when destroying anything bombable (walls, or the skull-shaped object between D2 and D3).

db00 B button item
db01 A button item
db02-db0b Link's inventory

Can contain the following values in any order:

0x01 - Sword

0x02 - Bombs

0x03 - Power Bracelet

0x04 - Shield

0x05 - Bow

0x06 - Hookshot

0x07 - Magic Rod

0x08 - Pegasus Boots

0x09 - Ocarina

0x0A - Roc's Feather

0x0B - Shovel

0x0C - Magic Powder

0x0D - Boomerang

db0c Flippers flag
db0d Magic Potion flag
db0e Trading sequence item

Corresponds to the following items:

0x00 - No item

0x01 - Yoshi doll

0x02 - Ribbon (may appear as red Yoshi doll for one menu after editing memory)

0x03 - Can of dog food

0x04 - Bananas

0x05 - Stick

0x06 - Honeycomb

0x07 - Pineapple

0x08 - Flower

0x09 - Letter

0x0A - Broom

0x0B - Fishing hook

0x0C - Mermaid's bra

0x0D - Mermaid's scale

0x0E - Magnifying glass

db0f Seashell count (BCD)
db11 Tail Key flag
db12 Angel Key flag
db13 Face Key flag
db14 Eagle Key flag
db15 Golden Leaf count (becomes Slime Key at 6 or more)
db80-db8e File names

Each file name occupies 5 bytes. db80-db84 for file 1, db85-db89 for file 2, and db8a-db8e for file 3.

dbcc Dungeon Map flag
dbcd Compass flag
dbce Owl Beak flag
dbcf Nightmare Key flag
dbd0 Small Key count
db43 Bracelet level
db44 Shield level
db45 Arrow count (BCD)
db49 Ocarina song bitset

The lower 3 bits (lowest to highest) are Frog song, Manbo's song, and Ballad of the Wind Fish

db4a Current Ocarina song

0x00 - Ballad of the Wind Fish

0x01 - Manbo's Mambo

0x02 - Frog's Song of Soul

db4b Mushroom flag (if not 0, Magic Powder becomes Mushroom)
db4c Magic Powder count (BCD)
db4d Bomb count (BCD)
db4e Sword level (increases damage beyond level 2, but laser is only at level 2)
db5a Link's health
db5d-db5e Rupee count (BCD)
dbb5 Unknown kill counter
dc0c-dc0d Bitset of pictures obtained
dc0f Tunic color

High RAM (FF80-FFFE)

Address Meaning
ff98 Link's X position
ff99 Link's Y position
ff9e Link's facing direction
ffe7 Global frame counter