RAM: Bank 0x7E: Page 0x03

From TLoZ: ALTTP Hacking Resources
Revision as of 08:15, 20 December 2016 by Tatters (talk | contribs) (Created page with "* {{$|0300}}[{{0x|01}}] = Link's state changes? Happens when using boomerang. * {{$|0301}}[{{0x|01}}] = When non zero, Link has something in his hand, poised to strike. (Ice R...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
  • $0300[0x01] = Link's state changes? Happens when using boomerang.
  • $0301[0x01] = When non zero, Link has something in his hand, poised to strike. (Ice Rod, Hammer)

Bit 6 being set indicates that magic powder is being sprinkled 551$0302}}[0x01] = ????

  • $0303[0x01] = In conjunction with the above variable when set to 0x13, matching the above variable,

the cape transformation is complete. 0x01 - Bombs 0x02 - Boomerang 0x03 - Arrows 0x04 - Hammer 0x05 - Fire Rod 0x06 - Ice Rod 0x07 - Bug catching net 0x08 - Flute 0x09 - Torch 0x0A - Magic Powder 0x0B - Bottle 0x0C - Book of Mudora 0x0D - Cane of Byrna 0x0E - Hookshot 0x0F - Bombos Medallion 0x10 - Ether Medallion 0x12 - Quake Medallion 0x13 - Cape 0x14 - Magic Mirror

  • $0304[0x01] = related to the magic cape transformation (a flag probably)
  • $0305[0x01] = (Potentially) Debug variable only seen in Bank 07.

If not equal to 0x01, it will cause $1E and $1F to not be zeroed out every frame

  • $0308[0x01] = Bit 7 is set when Link is carrying something.

Bit 1 set when Link is praying?

  • $0309[0x01] = 0: nothing.

1: picking up something. 2: throwing something or halfway done picking up something

  • $030A[0x01] = Step counter used with $030B. Also, $030A-B seem to be used for the opening of the desert palace
  • $030B[0x01] = Animation timer for throwing and picking up items like rocks or signs
  • $030C[0x01] = ??? free ram?
  • $0310[0x02] = The Y velocity of a moving floor (Mothula's room)
  • $0312[0x02] = The X velocity of a moving floor (Mothula's room)
  • $0314[0x01] = The index (the X in $0DD0 for example) of the sprite that Link is "touching"
  • $0315[0x01] = Seems to be a flag that is set to 0 if Link is not moving, and 1 if he is moving.

However it doesn't seem to get reset to zero.

  • $0316[0x02] = ???? bunny stuffs?

552$0318}}[0x02] = related to moving floor

  • $031A[0x02] = related to moving floor
  • $031C[0x01] = tells us the actual graphic/state to use on the given step of a spin attack
  • $031D[0x01] = step counter for the spin attack
  • $031E[0x01] = used as an offset for a table to retrieve values for $031C. The offset comes in increments of four,

depending on which direction Link is facing when he begins to spin. This makes sense, given that he always spins the same direction, and allows for reusability between the different directions, each one being a sub set of the full sequence.

  • $031F[0x01] = Countdown timer that when it's set causes Link's sprite to blink, i.e. flash on and off
  • $0320[0x02] = Bitfield for interaction with moving floor tiles

uuuuuuuu uuuummmm m - Moving floor u - free ram

  • $0322[0x01] = ????
  • $0323[0x01] = Mirror of $2F, which is an indicator for which direction you are facing.

Only used in the rendering of Link's OAM data in Bank 0x0D

  • $0324[0x01] = A flag telling a medallion spell it's okay to proceed with the effect.

If set to 1, the effect will wait until it is set to 0 to activate.

  • $0325[0x01] = free ram, with the caveat that it is cleared in a few locations in Bank 0x08
  • $0326[0x02] = ???? collision related?
  • $0328[0x02] = ???? collision related?
  • $032A[0x01] = seems to be nonzero when you hit a button to swim faster. zero otherwise
  • $032B[0x02] = ???? collision related?
  • $032D[0x02] = ???? collision related?
  • $032F[0x02] = ???? collision related?
  • $0331[0x02] = ???? collision related?
  • $0333[0x01] = Stores the tile type that the lantern fire or fire rod shot is currently interacting with.
  • $0334[0x02] = ???? collision related?
  • $0336[0x02] = ???? collision related?
  • $0338[0x02] = ???? collision related?
  • $033A[0x02] = ???? collision related?
  • $033C[0x02] = ???? collision related?
  • $033E[0x02] = ???? collision related?

553$0340}}[0x01] = ????

  • $0341[0x02] = Bitfield for interaction with deep water and ??? tiles

uuuuuuuu ffffwwww f - ??? (waterfall maybe?) u - free ram w - deep water

  • $0343[0x02] = Bitfield for interaction with normal tiles

uuuuuuuu uuuunnnn n - normal tile u - free ram

  • $0345[0x01] = Set to 1 when we are in water. 0 otherwise. Note this does not mean we are in shallow water.

This means we are submerged.

  • $0346[0x02] = Exclusively used in Bank 0x0D for the purposes of drawing Link. This value gets bitwise ORed in

to supply the palette bits of Link's sprite. It's only intended to take on one of two values: 0x000E, or 0x0000. 0x0E00 indicates that palette 7 is being used, and 0x0000 indicates that palette 0 is being used. Sometimes Link's palette swaps so that Link won't turn translucent when color addition is active. An example of this would be in the Flute Boy's meadow when he disappears. See $0ABD for more info.

  • $0348[0x02] = Bitfield for interaction with icy floor tiles

uuuuuuuu jjjjiiii i - icy tile 1 j - icy tile 2 (distinction is not quite understood right now) u - free ram

  • $034A[0x01] = Flag indicating whether Link is moving or not. (I think)
  • $034B[0x01] = Debug variable, as it is never read, and only written to in the equipment screen code
  • $034C[0x02] = Bitfield for the top of water staircase tile interactions

uuuuuuuu uuuussss s - water staircase u - free ram

  • $034E[0x01] = Definitely related to Cane of Somaria and how Link is displayed when on a Somaria platform

554$034F}}[0x01] = If nonzero, Link does the harder stroke while swimming. This is triggered by pressing the A, B, or Y buttons while swimming, but ends shortly. It has no bearing on his swimming speed, though.

  • $0350[0x01] = free ram, though it would need to be reclaimed from the game engine

as it's currently used in several places as an apparent debug variable Water/Grass drawing variables:

  • $0351[0x01] = Value that if set to 1, draws the water ripples around Link's body while standing in water.

The drawing, of course, uses sprites. If the value is 2, then a patch of tall grass is drawn around Link instead. Any value other than 2 (besides 0) produces the water effect.

  • $0352[0x02] = Used exclusively during writing Link's OAM data (Bank 0x0D) as an offset into

the OAM buffer ($0800)

  • $0354[0x01] = Used exclusively during writing Link's OAM data for currently unknown purposes
  • $0355[0x01] = Secondary water grass timer. Increments when $0356 reaches 9. Starts at 0 and reaches 3.
  • $0356[0x01] = Primary water/grass timer. Starts at zero and resets at 9.
  • $0357[0x02] = Bitfield for interaction with thick Grass / warp tiles

uuuuuuuu wwwwgggg g - bits are for thick grass tiles w - bits are for warp tiles (blue on OW, orange in dungeons) u - free ram

  • $0359[0x02] = Bitfield for interaction with shallow water tiles

uuuuuuuu uuuuwwww w - water tiles u - free ram

  • $035B[0x02] = Bitfield for interaction with destruction aftermath tiles (bushes, rockpiles, etc)

uuuuuuuu uuuuaaaa a - aftermath tiles b - free ram

  • $035D[0x02] = Used exclusively during writing Link's OAM data (bank 0x0D). Bitwise ORed in for some

of the OAM data.

  • $035F[0x01] = Seems to be a flag indicating that the boomerang is in play. It shows up in many places so far

Not even sure why it needs this flag... maybe hackish coding by Nintendo? 555$0360}}[0x01] = A flag that when nonzero causes Link to be electrocuted when touching an enemy. This seems counterintuitive to me, but whatever.

  • $0361[0x01] = free ram
  • $0362[0x01] = ????
  • $0364[0x0?] = ???? (relates to Link's sprites's object priority somehow?)
  • $0366[0x02] = Flag stating that Link is about to read something (assuming he's facing north)

Used with telepath tiles (dungeon), and signs (overworld)

  • $0368[0x0?] = ????
  • $036A[0x01] = ????
  • $036C[0x01] = Action index when interacting with tiles, like pots, rocks, or chests.

0 - ??? 1 - Picks up a pot or bush. 2 - Starts dashing 3 - Grabs a wall 4 - Reads a sign. 5 - Opens a chest. 6 - ??? 7 - ???

  • $036D[0x01] = Detection bitfield for vertical ledge tiles

dddduuuu - d bits are for ledge tiles facing down - u bits are for ledge tiles facing up

  • $036E[0x01] = Detection bitfield for horizontal ledge tiles and up + horizontal ledge tiles

ddddhhhh - h bits are for ledge tiles facing left or right - d bits are for ledge tiles facing up + left or up + right

  • $036F[0x01] = Detection bitfield for down + horizontal ledge tiles

uuuudddd - d bits are for ledge tiles facing down + left or down + right - free ram

  • $0370[0x01] = Bitfield for interaction with unknown tile types

bbbbaaaa 556a - type 0x4C and 0x4D tiles (Overworld only) b - type 0x4E and 0x4F tiles (Overworld only)

  • $0371[0x01] = Countdown timer for frames it will take Link to become tired pushing against something solid.

Once counted down, his appearance will look flushed and like he's dragging ass. Resets once you stop pushing or moving.

  • $0372[0x01] = Flag indicating whether Link will bounce off if he touches a wall.
  • $0373[0x01] = Putting a non-zero value here indicates how much life to subtract from Link.

(quick reference: 0x08 = one heart)

  • $0374[0x01] = Countdown timer for when Link is about to dash. When it reaches 0 he starts dashing. starts as 0x1D
  • $0375[0x01] = This is the timer that is used to count down how long it takes before Link can jump off a ledge.

It is typically set to 19 (0x13) frames, though I don't believe it decrements every frame.

  • $0376[0x01] = bit 0: Link is grabbing a wall.
  • $0377[0x01] = ????
  • $0379[0x01] = ???
  • $037A[0x01] = ??? related to picking up bombs (see Bank 07)
  • $037B[0x01] = ???? related to cape transformation
  • $037D[0x01] = ???? related to link's bedspread
  • $037F[0x01] = Walk through walls and anytime warping in outdoors.
  • {{$|036C - Indicates which type action Link is engaging in via the A button. Opening chest..., pulling, dashing, etc.
  • ${{{1}}}[0x01] = ????
  • $03FD[0x01] = ???? related to bombs seemingly
  • $03FE[0x02] = free ram.