Difference between revisions of "RAM: Bank 0x7E: Page 0x03"
From TLoZ: ALTTP Hacking Resources
(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...") |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
− | * {{$|0300 | + | * {{address|$|0300||01}} = Link's state changes? Happens when using boomerang. |
− | * {{$|0301 | + | * {{address|$|0301||01}} = When non zero, Link has something in his hand, poised to strike. It's intended that only one bit in this flag be set at any time, though. |
− | + | ** bmuaethr | |
− | + | *** b - Boomerang | |
− | * {{$|0303 | + | *** m - Magic Powder |
− | the cape transformation is complete. | + | *** u - Unused |
− | 0x01 - Bombs | + | *** a - Bow and Arrow |
− | 0x02 - Boomerang | + | *** e - Tested for, but doesn't seem to correspond to any actual item or action. Possibly could indicate an item that was cut from the game during development. It is, in fact, tested for simultaneously with the hammer in many locations. Perhaps this suggests another hammer-like item was in the works. |
− | 0x03 - Arrows | + | *** t - Tested for exclusively with the 'r' bit, but no code seems to set this particular bit. Perhaps at one point the bits for the two rods were separate at some point? |
− | 0x04 - Hammer | + | *** h - Hammer |
− | 0x05 - Fire Rod | + | *** r - Ice Rod or Fire Rod |
− | 0x06 - Ice Rod | + | * {{address|$|0302||01}} = ???? |
− | 0x07 - Bug catching net | + | * {{address|$|0303||01}} = In conjunction with the above variable when set to {{0x|13}}, matching the above variable, the cape transformation is complete. |
− | 0x08 - Flute | + | ** 0x01 - Bombs |
− | 0x09 - Torch | + | ** 0x02 - Boomerang |
− | 0x0A - Magic Powder | + | ** 0x03 - Arrows |
− | 0x0B - Bottle | + | ** 0x04 - Hammer |
− | 0x0C - Book of Mudora | + | ** 0x05 - Fire Rod |
− | 0x0D - Cane of Byrna | + | ** 0x06 - Ice Rod |
− | 0x0E - Hookshot | + | ** 0x07 - Bug catching net |
− | 0x0F - Bombos Medallion | + | ** 0x08 - Flute |
− | 0x10 - Ether Medallion | + | ** 0x09 - Torch |
− | 0x12 - Quake Medallion | + | ** 0x0A - Magic Powder |
− | 0x13 - Cape | + | ** 0x0B - Bottle |
− | 0x14 - Magic Mirror | + | ** 0x0C - Book of Mudora |
− | * {{$|0304 | + | ** 0x0D - Cane of Byrna |
− | * {{$|0305 | + | ** 0x0E - Hookshot |
− | If not equal to | + | ** 0x0F - Bombos Medallion |
− | * {{$|0308 | + | ** 0x10 - Ether Medallion |
− | Bit 1 set when Link is praying? | + | ** 0x12 - Quake Medallion |
− | * {{$|0309 | + | ** 0x13 - Cape |
− | 1: picking up something. | + | ** 0x14 - Magic Mirror |
− | 2: throwing something or halfway done picking up something | + | * {{address|$|0304||01}} = related to the magic cape transformation (a flag probably) |
− | * {{$|030A | + | * {{address|$|0305||01}} = (Potentially) Debug variable only seen in Bank 07. If not equal to {{0x|01}}, it will cause {{$|1E}} and {{$|1F}} to not be zeroed out every frame |
− | * {{$|030B | + | * {{address|$|0308||01}} = Bit 7 is set when Link is carrying something. Bit 1 set when Link is praying? |
− | * {{$|030C | + | * {{address|$|0309||01}} = |
− | * {{$|0310 | + | ** 0: nothing. |
− | * {{$|0312 | + | ** 1: picking up something. |
− | * {{$|0314 | + | ** 2: throwing something or halfway done picking up something |
− | * {{$|0315 | + | * {{address|$|030A||01}} = Step counter used with {{$|030B}}. Also, {{$|030A-B}} seem to be used for the opening of the desert palace |
− | However it doesn't seem to get reset to zero. | + | * {{address|$|030B||01}} = Animation timer for throwing and picking up items like rocks or signs |
− | * {{$|0316 | + | * {{address|$|030C||01}} = ??? free ram? |
− | + | * {{address|$|0310||02}} = The Y velocity of a moving floor (Mothula's room) | |
− | * {{$|031A | + | * {{address|$|0312||02}} = The X velocity of a moving floor (Mothula's room) |
− | * {{$|031C | + | * {{address|$|0314||01}} = The index (the X in {{$|0DD0}} for example) of the sprite that Link is "touching" |
− | * {{$|031D | + | * {{address|$|0315||01}} = 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. |
− | * {{$|031E | + | * {{address|$|0316||02}} = ???? bunny stuffs? |
− | depending on which direction Link is facing when he begins to spin. This makes sense, given that he | + | * {{address|$|0318||02}} = related to moving floor |
− | always spins the same direction, and allows for reusability between the different directions, each one | + | * {{address|$|031A||02}} = related to moving floor |
− | being a sub set of the full sequence. | + | * {{address|$|031C||01}} = tells us the actual graphic/state to use on the given step of a spin attack |
− | * {{$|031F | + | * {{address|$|031D||01}} = step counter for the spin attack |
− | * {{$|0320 | + | * {{address|$|031E||01}} = 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. |
− | uuuuuuuu uuuummmm | + | * {{address|$|031F||01}} = Countdown timer that when it's set causes Link's sprite to blink, i.e. flash on and off |
− | m - Moving floor | + | * {{address|$|0320||02}} = Bitfield for interaction with moving floor tiles |
− | u - free ram | + | ** uuuuuuuu uuuummmm |
− | * {{$|0322 | + | *** m - Moving floor |
− | * {{$|0323 | + | *** u - free ram |
− | Only used in the rendering of Link's OAM data in Bank | + | * {{address|$|0322||01}} = ???? |
− | * {{$|0324 | + | * {{address|$|0323||01}} = 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 {{0x|0D}} |
+ | * {{address|$|0324||01}} = 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. | If set to 1, the effect will wait until it is set to 0 to activate. | ||
− | * {{$|0325 | + | * {{address|$|0325||01}} = free ram, with the caveat that it is cleared in a few locations in Bank {{0x|08}} |
− | * {{$|0326 | + | * {{address|$|0326||02}} = ???? collision related? |
− | * {{$|0328}} | + | * {{address|$|0328||02}} = ???? collision related? |
− | * {{$|032A | + | * {{address|$|032A||01}} = seems to be nonzero when you hit a button to swim faster. zero otherwise |
− | * {{$|032B | + | * {{address|$|032B||02}} = ???? collision related? |
− | * {{$|032D}} | + | * {{address|$|032D||02}} = ???? collision related? |
− | * {{$|032F | + | * {{address|$|032F||02}} = ???? collision related? |
− | * {{$|0331 | + | * {{address|$|0331||02}} = ???? collision related? |
− | * {{$|0333}} | + | * {{address|$|0333||01}} = Stores the tile type that the lantern fire or fire rod shot is currently interacting with. |
− | * {{$|0334 | + | * {{address|$|0334||02}} = ???? collision related? |
− | * {{$|0336 | + | * {{address|$|0336||02}} = ???? collision related? |
− | * {{$|0338}} | + | * {{address|$|0338||02}} = ???? collision related? |
− | * {{$|033A | + | * {{address|$|033A||02}} = ???? collision related? |
− | * {{$|033C | + | * {{address|$|033C||02}} = ???? collision related? |
− | * {{$|033E}} | + | * {{address|$|033E||02}} = ???? collision related? |
− | + | * {{address|$|0340||01}} = ???? | |
− | * {{$|0341 | + | * {{address|$|0341||02}} = Bitfield for interaction with deep water and ??? tiles |
− | uuuuuuuu ffffwwww | + | ** uuuuuuuu ffffwwww |
− | f - ??? (waterfall maybe?) | + | *** f - ??? (waterfall maybe?) |
− | u - free ram | + | *** u - free ram |
− | w - deep water | + | *** w - deep water |
− | * {{$|0343 | + | * {{address|$|0343||02}} = Bitfield for interaction with normal tiles |
− | uuuuuuuu uuuunnnn | + | ** uuuuuuuu uuuunnnn |
− | n - normal tile | + | *** n - normal tile |
− | u - free ram | + | *** u - free ram |
− | * {{$|0345 | + | * {{address|$|0345||01}} = 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. |
− | This means we are submerged. | + | * {{address|$|0346||02}} = Exclusively used in Bank {{0x|0D}} 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: {{0x|000E}}, or {{0x|0000}}. |
− | * {{$|0346 | + | ** {{0x|000E}} indicates that palette 7 is being used, and |
− | to supply the palette bits of Link's sprite. It's only intended to take on one of two values: | + | ** {{0x|0000}} 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. | |
− | + | * {{address|$|0348||02}} = Bitfield for interaction with icy floor tiles | |
− | + | ** uuuuuuuu jjjjiiii | |
− | Sometimes Link's palette swaps so that Link won't turn translucent when color addition is active. | + | *** i - icy tile 1 |
− | An example of this would be in the Flute Boy's meadow when he disappears. See $0ABD for more info. | + | *** j - icy tile 2 (distinction is not quite understood right now) |
− | * {{$|0348 | + | *** u - free ram |
− | uuuuuuuu jjjjiiii | + | * {{address|$|034A||01}} = Flag indicating whether Link is moving or not. (I think) |
− | i - icy tile 1 | + | * {{address|$|034B||01}} = Debug variable, as it is never read, and only written to in the equipment screen code |
− | j - icy tile 2 (distinction is not quite understood right now) | + | * {{address|$|034C||02}} = Bitfield for the top of water staircase tile interactions |
− | u - free ram | + | ** uuuuuuuu uuuussss |
− | * {{$|034A | + | *** s - water staircase |
− | * {{$|034B | + | *** u - free ram |
− | * {{$|034C | + | * {{address|$|034E||01}} = Definitely related to Cane of Somaria and how Link is displayed when on a Somaria platform |
− | uuuuuuuu uuuussss | + | * {{address|$|034F||01}} = 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. |
− | s - water staircase | + | * {{address|$|0350||01}} = 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 |
− | u - free ram | + | * {{address|$|0351||01}} = 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. |
− | * {{$|034E | + | * {{address|$|0352||02}} = Used exclusively during writing Link's OAM data (Bank {{0x|0D}}) as an offset into the OAM buffer ({{$|0800}}) |
− | + | * {{address|$|0354||01}} = Used exclusively during writing Link's OAM data for currently unknown purposes | |
− | buttons while swimming, but ends shortly. It has no bearing on his swimming speed, though. | + | * {{address|$|0355||01}} = Secondary water grass timer. Increments when {{$|0356}} reaches 9. Starts at 0 and reaches 3. |
− | * {{$|0350}} | + | * {{address|$|0356||01}} = Primary water/grass timer. Starts at zero and resets at 9. |
− | as it's currently used in several places as an apparent debug variable | + | * {{address|$|0357||02}} = Bitfield for interaction with thick Grass / warp tiles |
− | + | ** uuuuuuuu wwwwgggg | |
− | * {{$|0351 | + | *** g - bits are for thick grass tiles |
− | The drawing, of course, uses sprites. | + | *** w - bits are for warp tiles (blue on OW, orange in dungeons) |
− | If the value is 2, then a patch of tall grass is drawn around Link instead. | + | *** u - free ram |
− | Any value other than 2 (besides 0) produces the water effect. | + | * {{address|$|0359||02}} = Bitfield for interaction with shallow water tiles |
− | * {{$|0352 | + | ** uuuuuuuu uuuuwwww |
− | the OAM buffer ($0800) | + | *** w - water tiles |
− | * {{$|0354 | + | *** u - free ram |
− | * {{$|0355 | + | * {{address|$|035B||02}} = Bitfield for interaction with destruction aftermath tiles (bushes, rockpiles, etc) |
− | * {{$|0356 | + | ** uuuuuuuu uuuuaaaa |
− | * {{$|0357 | + | *** a - aftermath tiles |
− | uuuuuuuu wwwwgggg | + | *** b - free ram |
− | g - bits are for thick grass tiles | + | * {{address|$|035D||02}} = Used exclusively during writing Link's OAM data (bank {{0x|0D}}). Bitwise ORed in for some of the OAM data. |
− | w - bits are for warp tiles (blue on OW, orange in dungeons) | + | * {{address|$|035F||01}} = 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? |
− | u - free ram | + | * {{address|$|0360||01}} = A flag that when nonzero causes Link to be electrocuted when touching an enemy. |
− | * {{$|0359 | ||
− | uuuuuuuu uuuuwwww | ||
− | w - water tiles | ||
− | u - free ram | ||
− | * {{$|035B | ||
− | uuuuuuuu uuuuaaaa | ||
− | a - aftermath tiles | ||
− | b - free ram | ||
− | * {{$|035D | ||
− | of the OAM data. | ||
− | * {{$|035F | ||
− | Not even sure why it needs this flag... maybe hackish coding by Nintendo? | ||
− | |||
This seems counterintuitive to me, but whatever. | This seems counterintuitive to me, but whatever. | ||
− | * {{$|0361 | + | * {{address|$|0361||01}} = free ram |
− | * {{$|0362 | + | * {{address|$|0362||01}} = ???? |
− | * {{$| | + | * {{address|$|0363||01}} = ???? |
− | + | * {{address|$|0364||02}} = ???? (relates to Link's sprites's object priority somehow?) Hard to say if {{$|0365}} is coupled or separate from this variable at this point. | |
− | Used with telepath tiles (dungeon), and signs (overworld) | + | * {{address|$|0366||02}} = Flag stating that Link is about to read something (assuming he's facing north) Used with telepath tiles (dungeon), and signs (overworld) |
− | * {{$|0368 | + | * {{address|$|0368||01}} = The value of {{$|036A}} shifted right once (divided by two). Used in the context of lifting tiles like bushes, rocks, etc. |
− | + | ** {{0x|00}} - sign | |
− | * {{ | + | ** {{0x|01}} - small light rock |
− | + | ** {{0x|02}} - green bush | |
− | + | ** {{0x|03}} - off-color bush | |
− | + | ** {{0x|04}} - small heavy rock | |
− | + | ** {{0x|05}} - large light rock | |
− | + | ** {{0x|06}} - large heavy rock | |
− | + | * {{address|$|0369||01}} = The value of {{$|036A}} shifted left once (multiplied by two). While this variable may at first glance appear to be used, its value is never meaningfully inspected or put to good use. Thus we'll categorize it as "free ram" with the caveat that the modder would have to remove the current (useless) references to the variable, which number all of 2 times. | |
− | + | * {{address|$|036A||01}} = When interacting with liftable tiles, this is an index that which type. Note: This value is always even, for whatever reason. | |
− | + | ** {{0x|00}} - sign | |
− | + | ** {{0x|02}} - small light rock | |
− | + | ** {{0x|04}} - green bush | |
− | + | ** {{0x|06}} - off-color bush | |
− | + | ** {{0x|08}} - small heavy rock | |
− | + | ** {{0x|0A}} - large light rock | |
− | + | ** {{0x|0C}} - large heavy rock | |
− | - | + | * {{address|$|036B||01}} = ???? |
− | + | * {{address|$|036C||01}} = Action index when interacting with tiles, like pots, rocks, or chests. | |
− | * {{ | + | ** {{0x|00}} - ??? |
− | + | ** {{0x|01}} - Picks up a pot or bush. | |
− | - | + | ** {{0x|02}} - Starts dashing |
− | - | + | ** {{0x|03}} - Grabs a wall |
− | * {{ | + | ** {{0x|04}} - Reads a sign. |
− | + | ** {{0x|05}} - Opens a chest. | |
− | + | ** {{0x|06}} - ??? | |
− | + | ** {{0x|07}} - ??? | |
− | * {{$| | + | * {{address|$|036D||01}} = Detection bitfield for vertical ledge tiles |
− | + | ** dddduuuu | |
− | + | ** d bits are for ledge tiles facing down | |
− | + | ** u bits are for ledge tiles facing up | |
− | * {{ | + | * {{address|$|036E||01}} = 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 |
− | + | * {{address|$|036F||01}} = Detection bitfield for down + horizontal ledge tiles | |
− | * {{$| | + | ** uuuudddd |
− | * | + | *** d bits are for ledge tiles facing down + left or down + right |
− | * {{ | + | *** free ram |
− | * | + | * {{address|$|0370||01}} = Bitfield for interaction with unknown tile types |
− | * {{$| | + | ** bbbbaaaa |
− | * {{ | + | *** a - type {{0x|4C}} and {{0x|4D}} tiles (Overworld only) |
− | * {{ | + | *** b - type {{0x|4E}} and {{0x|4F}} tiles (Overworld only) |
− | * {{$| | + | * {{address|$|0371||01}} = 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. |
− | + | * {{address|$|0372||01}} = Flag indicating whether Link will bounce off if he touches a wall. | |
− | * {{$| | + | * {{address|$|0373||01}} = Putting a non-zero value here indicates how much life to subtract from Link. |
− | * {{$| | + | (quick reference: {{0x|08}} = one heart) |
− | * {{$| | + | * {{address|$|0374||01}} = Countdown timer for when Link is about to dash. When it reaches 0 he starts dashing. starts as {{0x|1D}} |
− | + | * {{address|$|0375||01}} = 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 ({{0x|13}}) frames, though I don't believe it decrements every frame. | |
− | + | * {{address|$|0376||01}} = bit 0: Link is grabbing a wall. | |
− | * {{$| | + | * {{address|$|0377||01}} = Related to the Master Sword ceremony somehow. Maybe other uses. |
− | * {{$| | + | * {{address|$|0378||01}} = Apparently a countdown timer of some sort. Only seen in Bank {{0x|07}}. Two domains of usage seem to be climbing staircases and pushing walls. |
− | * {{$| | + | * {{address|$|0379||01}} = Flag that, if set, A button isn't read. |
− | + | * {{address|$|037A||01}} = Puts Link in various positions, 1 - shovel, 2 - praying, etc... cane of somaria. May also have something to do with bombs? | |
− | * {{$| | + | * {{address|$|037B||01}} = If nonzero, disables Link's ability to receive hits from sprites. (But not pits) |
− | + | * {{address|$|037C||01}} = Determines the player's behavior during "player behavior" mode {{0x|16}} (see variable {{$|5D}}). Somewhat parallels {{$|037D}} as it only is intended to have 3 states (0 through 2, inclusive). | |
− | (not | + | * {{address|$|037D||01}} = Used to determine the player sprite's pose during the opening sequence. It only takes on 3 values: |
− | + | ** {{0x|00}} - Player is in bed with eyes shut. | |
− | + | ** {{0x|01}} - Player is in bed with eyes open. | |
− | * {{ | + | ** {{0x|02}} - Player is jumping out of bed. |
− | * | + | ** This value also affects the player's bedspread (unfurls the covers once hitting state 1). |
− | * {{$| | + | * {{address|$|037E||01}} - |
− | * {{ | + | ** Bit 0 - Hookshot is dragging Link somewhere. |
− | + | ** Bit 1 - ???? seems like it gets toggled every 3 frames, or something like that. | |
− | * {{$| | + | * {{address|$|037F||01}} = Walk through walls and anytime warping in outdoors. Apparently if nonzero, all tile attributes are {{$|00}} (nothing / passable) |
− | * {{$| | + | * {{address|$|0380||02}} = (Possibly of size 5 instead) |
− | * {{$| | + | * {{address|$|0385||0A}} = special effect ??? |
− | + | * {{address|$|038F||05}} = special effect ??? | |
− | * {{$| | + | * {{address|$|0394||05}} = special effect ??? |
− | * {{$| | + | * {{address|$|0399||02}} = Used as a temporary copy of the boomerang's y coordinate when calculating where to place the wall hit object that results from the boomerang hitting a wall. No other uses. |
− | * {{$| | + | * {{address|$|039B||02}} = ???? |
− | * {{$| | + | * {{address|$|039D||01}} = ???? |
− | * {{$| | + | * {{address|$|039E||01}} = free ram |
− | * {{$| | + | * {{address|$|039F||0A}} = Special Effect Timers |
− | + | * {{address|$|03A4||0?}} = Referenced in receive item initializer | |
− | * {{$| | + | * {{address|$|03A9||05}} = Special effect ??? |
− | * {{$| | + | * {{address|$|03AE||03}} = free ram (Though I am not sure of this entirely) |
− | * {{$| | + | * {{address|$|03B1||05}} = countdown timer for special objects (note that there are only 5 of these whereas there's usually 10 slots for special objects) |
− | * {{$| | + | * {{address|$|03B6||04}} = 16-bit values relating to bomb doors |
− | + | * {{address|$|03BA||04}} = 16-bit values relating to bomb doors | |
− | + | * {{address|$|03BE||02}} = 8-bit values relating to bomb doors | |
− | + | * {{address|$|03C0||02}} = Reserved for rock debris special object ({{0x|08}}) | |
− | + | * {{address|$|03C2||02}} = Reserved for rock debris special object ({{0x|08}}) | |
− | + | * {{address|$|03C4||01}} = Reserved for rock debris special object ({{0x|08}}) and maybe bombs too. | |
− | * {{$| | + | * {{address|$|03C5||05}} = Special Object ram. |
− | * {{$| | + | * {{address|$|03CA||05}} = Special Object ram. |
− | * {{$| | + | * {{address|$|03CF||03}} = Special Object ram. |
− | + | * {{address|$|03D2||03}} = Special Object ram. | |
− | + | * {{address|$|03D5||06}} = Special Object ram. | |
− | * {{ | + | * {{address|$|03DB||06}} = Special Object ram. |
− | + | * {{address|$|03E1||03}} = Special Object ram. | |
+ | * {{address|$|03E4||02}} = tiles that bombs are touching on the floor | ||
+ | * {{address|$|03E9||01}} = Flag that seems to set when moving gravestones are in play and puzzle sound is playing. | ||
+ | * {{address|$|03EA||0A}} = special effect ??? | ||
+ | * {{address|$|03EF||01}} = Normally zero. If set to nonzero, it forces Link to the pose where he is holding his sword up. One example of where this is used is right after Ganon is defeated. | ||
+ | * {{address|$|03F0||01}} = ???? | ||
+ | * {{address|$|03F3||01}} = ???? | ||
+ | * {{address|$|03F4||01}} = Seems related to Cane of Somaria somehow | ||
+ | * {{address|$|03F5||02}} = The timer for Link's tempbunny state. When it counts down he returns to his normal state. When Link is hit it always falls to zero. Is always set to {{0x|100}} when a yellow hunter (transformer) hits him. If Link is not in normal mode, however, it will have no effect on him. The value is given in frames, so if the value written is {{0x|80}}, you will be a bunny for 128 frames | ||
+ | * {{address|$|03F7||01}} = Flag indicating whether the "poof" needs to occur for Link to transform into the tempbunny. | ||
+ | * {{address|$|03F8||0?}} = Flag set if you are near a "pull for rupees" sprite | ||
+ | * {{address|$|03FA||02}} = Relates to Link's OAM routine in Bank {{0x|0D}} somehow. Appears to be the 9th bit of the X coordinate of some sprite(s). | ||
+ | * {{address|$|03FC||01}} = ???? | ||
+ | * {{address|$|03FD||01}} = ???? related to bombs seemingly | ||
+ | * {{address|$|03FE||02}} = free ram. |
Latest revision as of 04:19, 29 December 2016
- $0300 (01) = Link's state changes? Happens when using boomerang.
- $0301 (01) = When non zero, Link has something in his hand, poised to strike. It's intended that only one bit in this flag be set at any time, though.
- bmuaethr
- b - Boomerang
- m - Magic Powder
- u - Unused
- a - Bow and Arrow
- e - Tested for, but doesn't seem to correspond to any actual item or action. Possibly could indicate an item that was cut from the game during development. It is, in fact, tested for simultaneously with the hammer in many locations. Perhaps this suggests another hammer-like item was in the works.
- t - Tested for exclusively with the 'r' bit, but no code seems to set this particular bit. Perhaps at one point the bits for the two rods were separate at some point?
- h - Hammer
- r - Ice Rod or Fire Rod
- bmuaethr
- $0302 (01) = ????
- $0303 (01) = 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 (01) = related to the magic cape transformation (a flag probably)
- $0305 (01) = (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 (01) = Bit 7 is set when Link is carrying something. Bit 1 set when Link is praying?
- $0309 (01) =
- 0: nothing.
- 1: picking up something.
- 2: throwing something or halfway done picking up something
- $030A (01) = Step counter used with $030B. Also, $030A-B seem to be used for the opening of the desert palace
- $030B (01) = Animation timer for throwing and picking up items like rocks or signs
- $030C (01) = ??? free ram?
- $0310 (02) = The Y velocity of a moving floor (Mothula's room)
- $0312 (02) = The X velocity of a moving floor (Mothula's room)
- $0314 (01) = The index (the X in $0DD0 for example) of the sprite that Link is "touching"
- $0315 (01) = 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 (02) = ???? bunny stuffs?
- $0318 (02) = related to moving floor
- $031A (02) = related to moving floor
- $031C (01) = tells us the actual graphic/state to use on the given step of a spin attack
- $031D (01) = step counter for the spin attack
- $031E (01) = 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 (01) = Countdown timer that when it's set causes Link's sprite to blink, i.e. flash on and off
- $0320 (02) = Bitfield for interaction with moving floor tiles
- uuuuuuuu uuuummmm
- m - Moving floor
- u - free ram
- uuuuuuuu uuuummmm
- $0322 (01) = ????
- $0323 (01) = 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 (01) = 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 (01) = free ram, with the caveat that it is cleared in a few locations in Bank 0x08
- $0326 (02) = ???? collision related?
- $0328 (02) = ???? collision related?
- $032A (01) = seems to be nonzero when you hit a button to swim faster. zero otherwise
- $032B (02) = ???? collision related?
- $032D (02) = ???? collision related?
- $032F (02) = ???? collision related?
- $0331 (02) = ???? collision related?
- $0333 (01) = Stores the tile type that the lantern fire or fire rod shot is currently interacting with.
- $0334 (02) = ???? collision related?
- $0336 (02) = ???? collision related?
- $0338 (02) = ???? collision related?
- $033A (02) = ???? collision related?
- $033C (02) = ???? collision related?
- $033E (02) = ???? collision related?
- $0340 (01) = ????
- $0341 (02) = Bitfield for interaction with deep water and ??? tiles
- uuuuuuuu ffffwwww
- f - ??? (waterfall maybe?)
- u - free ram
- w - deep water
- uuuuuuuu ffffwwww
- $0343 (02) = Bitfield for interaction with normal tiles
- uuuuuuuu uuuunnnn
- n - normal tile
- u - free ram
- uuuuuuuu uuuunnnn
- $0345 (01) = 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 (02) = 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.
- 0x000E 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 (02) = 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
- uuuuuuuu jjjjiiii
- $034A (01) = Flag indicating whether Link is moving or not. (I think)
- $034B (01) = Debug variable, as it is never read, and only written to in the equipment screen code
- $034C (02) = Bitfield for the top of water staircase tile interactions
- uuuuuuuu uuuussss
- s - water staircase
- u - free ram
- uuuuuuuu uuuussss
- $034E (01) = Definitely related to Cane of Somaria and how Link is displayed when on a Somaria platform
- $034F (01) = 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 (01) = 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
- $0351 (01) = 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 (02) = Used exclusively during writing Link's OAM data (Bank 0x0D) as an offset into the OAM buffer ($0800)
- $0354 (01) = Used exclusively during writing Link's OAM data for currently unknown purposes
- $0355 (01) = Secondary water grass timer. Increments when $0356 reaches 9. Starts at 0 and reaches 3.
- $0356 (01) = Primary water/grass timer. Starts at zero and resets at 9.
- $0357 (02) = 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
- uuuuuuuu wwwwgggg
- $0359 (02) = Bitfield for interaction with shallow water tiles
- uuuuuuuu uuuuwwww
- w - water tiles
- u - free ram
- uuuuuuuu uuuuwwww
- $035B (02) = Bitfield for interaction with destruction aftermath tiles (bushes, rockpiles, etc)
- uuuuuuuu uuuuaaaa
- a - aftermath tiles
- b - free ram
- uuuuuuuu uuuuaaaa
- $035D (02) = Used exclusively during writing Link's OAM data (bank 0x0D). Bitwise ORed in for some of the OAM data.
- $035F (01) = 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?
- $0360 (01) = A flag that when nonzero causes Link to be electrocuted when touching an enemy.
This seems counterintuitive to me, but whatever.
- $0361 (01) = free ram
- $0362 (01) = ????
- $0363 (01) = ????
- $0364 (02) = ???? (relates to Link's sprites's object priority somehow?) Hard to say if $0365 is coupled or separate from this variable at this point.
- $0366 (02) = Flag stating that Link is about to read something (assuming he's facing north) Used with telepath tiles (dungeon), and signs (overworld)
- $0368 (01) = The value of $036A shifted right once (divided by two). Used in the context of lifting tiles like bushes, rocks, etc.
- 0x00 - sign
- 0x01 - small light rock
- 0x02 - green bush
- 0x03 - off-color bush
- 0x04 - small heavy rock
- 0x05 - large light rock
- 0x06 - large heavy rock
- $0369 (01) = The value of $036A shifted left once (multiplied by two). While this variable may at first glance appear to be used, its value is never meaningfully inspected or put to good use. Thus we'll categorize it as "free ram" with the caveat that the modder would have to remove the current (useless) references to the variable, which number all of 2 times.
- $036A (01) = When interacting with liftable tiles, this is an index that which type. Note: This value is always even, for whatever reason.
- 0x00 - sign
- 0x02 - small light rock
- 0x04 - green bush
- 0x06 - off-color bush
- 0x08 - small heavy rock
- 0x0A - large light rock
- 0x0C - large heavy rock
- $036B (01) = ????
- $036C (01) = Action index when interacting with tiles, like pots, rocks, or chests.
- 0x00 - ???
- 0x01 - Picks up a pot or bush.
- 0x02 - Starts dashing
- 0x03 - Grabs a wall
- 0x04 - Reads a sign.
- 0x05 - Opens a chest.
- 0x06 - ???
- 0x07 - ???
- $036D (01) = Detection bitfield for vertical ledge tiles
- dddduuuu
- d bits are for ledge tiles facing down
- u bits are for ledge tiles facing up
- $036E (01) = 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
- ddddhhhh
- $036F (01) = Detection bitfield for down + horizontal ledge tiles
- uuuudddd
- d bits are for ledge tiles facing down + left or down + right
- free ram
- uuuudddd
- $0370 (01) = Bitfield for interaction with unknown tile types
- bbbbaaaa
- a - type 0x4C and 0x4D tiles (Overworld only)
- b - type 0x4E and 0x4F tiles (Overworld only)
- bbbbaaaa
- $0371 (01) = 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 (01) = Flag indicating whether Link will bounce off if he touches a wall.
- $0373 (01) = Putting a non-zero value here indicates how much life to subtract from Link.
(quick reference: 0x08 = one heart)
- $0374 (01) = Countdown timer for when Link is about to dash. When it reaches 0 he starts dashing. starts as 0x1D
- $0375 (01) = 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 (01) = bit 0: Link is grabbing a wall.
- $0377 (01) = Related to the Master Sword ceremony somehow. Maybe other uses.
- $0378 (01) = Apparently a countdown timer of some sort. Only seen in Bank 0x07. Two domains of usage seem to be climbing staircases and pushing walls.
- $0379 (01) = Flag that, if set, A button isn't read.
- $037A (01) = Puts Link in various positions, 1 - shovel, 2 - praying, etc... cane of somaria. May also have something to do with bombs?
- $037B (01) = If nonzero, disables Link's ability to receive hits from sprites. (But not pits)
- $037C (01) = Determines the player's behavior during "player behavior" mode 0x16 (see variable $5D). Somewhat parallels $037D as it only is intended to have 3 states (0 through 2, inclusive).
- $037D (01) = Used to determine the player sprite's pose during the opening sequence. It only takes on 3 values:
- 0x00 - Player is in bed with eyes shut.
- 0x01 - Player is in bed with eyes open.
- 0x02 - Player is jumping out of bed.
- This value also affects the player's bedspread (unfurls the covers once hitting state 1).
- $037E (01) -
- Bit 0 - Hookshot is dragging Link somewhere.
- Bit 1 - ???? seems like it gets toggled every 3 frames, or something like that.
- $037F (01) = Walk through walls and anytime warping in outdoors. Apparently if nonzero, all tile attributes are $00 (nothing / passable)
- $0380 (02) = (Possibly of size 5 instead)
- $0385 (0A) = special effect ???
- $038F (05) = special effect ???
- $0394 (05) = special effect ???
- $0399 (02) = Used as a temporary copy of the boomerang's y coordinate when calculating where to place the wall hit object that results from the boomerang hitting a wall. No other uses.
- $039B (02) = ????
- $039D (01) = ????
- $039E (01) = free ram
- $039F (0A) = Special Effect Timers
- $03A4 (0?) = Referenced in receive item initializer
- $03A9 (05) = Special effect ???
- $03AE (03) = free ram (Though I am not sure of this entirely)
- $03B1 (05) = countdown timer for special objects (note that there are only 5 of these whereas there's usually 10 slots for special objects)
- $03B6 (04) = 16-bit values relating to bomb doors
- $03BA (04) = 16-bit values relating to bomb doors
- $03BE (02) = 8-bit values relating to bomb doors
- $03C0 (02) = Reserved for rock debris special object (0x08)
- $03C2 (02) = Reserved for rock debris special object (0x08)
- $03C4 (01) = Reserved for rock debris special object (0x08) and maybe bombs too.
- $03C5 (05) = Special Object ram.
- $03CA (05) = Special Object ram.
- $03CF (03) = Special Object ram.
- $03D2 (03) = Special Object ram.
- $03D5 (06) = Special Object ram.
- $03DB (06) = Special Object ram.
- $03E1 (03) = Special Object ram.
- $03E4 (02) = tiles that bombs are touching on the floor
- $03E9 (01) = Flag that seems to set when moving gravestones are in play and puzzle sound is playing.
- $03EA (0A) = special effect ???
- $03EF (01) = Normally zero. If set to nonzero, it forces Link to the pose where he is holding his sword up. One example of where this is used is right after Ganon is defeated.
- $03F0 (01) = ????
- $03F3 (01) = ????
- $03F4 (01) = Seems related to Cane of Somaria somehow
- $03F5 (02) = The timer for Link's tempbunny state. When it counts down he returns to his normal state. When Link is hit it always falls to zero. Is always set to 0x100 when a yellow hunter (transformer) hits him. If Link is not in normal mode, however, it will have no effect on him. The value is given in frames, so if the value written is 0x80, you will be a bunny for 128 frames
- $03F7 (01) = Flag indicating whether the "poof" needs to occur for Link to transform into the tempbunny.
- $03F8 (0?) = Flag set if you are near a "pull for rupees" sprite
- $03FA (02) = Relates to Link's OAM routine in Bank 0x0D somehow. Appears to be the 9th bit of the X coordinate of some sprite(s).
- $03FC (01) = ????
- $03FD (01) = ???? related to bombs seemingly
- $03FE (02) = free ram.