RAM: Bank 0x7E: Page 0x00
From TLoZ: ALTTP Hacking Resources
This is a subpage of RAM
Note that these addresses are only one byte and you can assume that they are $7E00XX where XX are the byte addresses you see below.
- $00 (10) = Mainly used as work registers. Storage of addresses and values.
- $10 (01) = Main Module index
- 0x00 = Triforce / Zelda startup screens
- 0x01 = Game Select screen
- 0x02 = Copy Player Mode
- 0x03 = Erase Player Mode
- 0x04 = Name Player Mode
- 0x05 = Loading Game Mode
- 0x06 = Pre Dungeon Mode
- 0x07 = Dungeon Mode
- 0x08 = Pre Overworld Mode
- 0x09 = Overworld Mode
- 0x0A = Pre Overworld Mode (special overworld)
- 0x0B = Overworld Mode (special overworld)
- 0x0C = ???? I think we can declare this one unused, almost with complete certainty.
- 0x0D = Blank Screen
- 0x0E = Text Mode/Item Screen/Map
- 0x0F = Closing Spotlight
- 0x10 = Opening Spotlight
- 0x11 = Happens when you fall into a hole from the OW.
- 0x12 = Death Mode
- 0x13 = Boss Victory Mode (refills stats)
- 0x14 = History Mode
- 0x15 = Module for Magic Mirror
- 0x16 = Module for refilling stats after boss.
- 0x17 = Restart mode (save and quit)
- 0x18 = Ganon exits from Agahnim's body. Chase Mode.
- 0x19 = Triforce Room scene
- 0x1A = End sequence
- 0x1B = Screen to select where to start from (House, sanctuary, etc.)
- $11 (01) = Submodule Index (See $B0)
- $12 (01) = NMI Boolean.
- If set to zero, the game will wait at a certain loop until NMI executes. The NMI interrupt generally sets it to one after it's done so that the game can continue doing things other than updating the screen.
- $13 (01) = Screen settings
- $14 (01) = Graphics Flag
- Value based flag, that if nonzero, causes the tile map to update
- $15 (01) = Graphics Flag
- update CGRAM (0x200 bytes)
- $16 (01) = Graphics Flag
- update HUD portion of BG3 tile map from $7EC700 (0x14A bytes)
- $17 (01) = Graphics Flag
- $18 (01) = Graphics Flag
- $19 (01) = Graphics flag.
- When nonzero, will trigger a transfer from $7FXXXX to vram address $YY00
- XXXX is specified by variable $0118
- YY is specified by this variable
- $1A (01) = Frame Counter
- $1B (01) = Flag is set to 1 if you are in a building. Set to 0 otherwise (credit: Euclid)
- $1C (01) = Main Screen Designation ($212C): xxxsabcd
- s = Sprite layer enabled
- a = BG3 enabled
- b = BG2 enabled
- c = BG1 enabled
- d = BG0 enabled
- $1D (01) = Sub Screen Designation ($212D)
- $1E (01) = Window Mask Activation ($212E)
- $1F (01) = Subscreen Window Mask Activation ($212F)
- $20 (02) = Link’s Y-Coordinate (mirrored at $0FC4)
- $22 (02) = Link’s X-Coordinate (mirrored at $0FC2)
- $22 (01) = (alternate) Used as a step counter for the attract mode.
- $24 (02) = 0xFFFF usually, but if Link is elevated off the ground it is considered to be his Z coordinate i.e. it's his height off of the ground
- $26 (01) = Link’s push state (These of course can be combined):
- right = 0x01
- left = 0x02
- down = 0x04
- up = 0x08
- nothing = 0x00
- $26 (01) = (alternate) Indicates the current 2bpp graphic to display in attract mode.
- $27 (01) = Link's Recoil for vertical collisions
- $27 (01) = (alternate) Flag indicating whether to display a new 2bpp graphic in attract mode.
- $28 (01) = Link's Recoil for horizontal collisions
- $28 (01) = (alternate) Aghanim’s base X coordinate relative to the screen. (history mode)
- $29 (01) = vertical resistance
- $29 (01) = (alternate) Aghanim’s base Y coordinate relative to the screen. (history mode)
- $2A (01) = horizontal resistance
- $2B (02) = ????
- $2D (01) = ????
- $2E (01) = animation steps.. seems to cycle from 0 to 5 then repeats
- $2F (01) = The direction Link is facing:
- 0 = up,
- 2 = down,
- 4 = left,
- 6 = right.
- $30 (01) = When Link is moving down or up, this is the signed number of pixels that his Y coordinate will change by
- $31 (01) = Same as $30 except it's for X coordinates
- $32 (02) = seems to be used in some subsection of Bank 0x07, not sure which one though
- $34 (04) = ???? These seem to be free ram
- $38 (02) = seems to be set some of the time when going up diagonal walls. It's a bit field for tiles type 0x10 through 0x13
- $3A (01)] = Bitfield for the B and Y buttons: hymuunub
- b = B button was pressed this frame, and not held down during the previous frame.
- m = Checked in one place, but not sure if it's ever set.
- n = Possible to be set, but not sure what it does
- h = The B button has been held down for one or more frames.
- u = Unused.
- y = The Y button has been held down for one or more frames.
- $3B (01)] = Bitfield for the A button: auuduuuu
- a = The A button is down.
- u = Unused.
- d = Debug flag. Checked in one place, but never set.
- $3C (01) =
- Lower Nibble: How many frames the B button has been held, approximately.
- Upper nibble set to 9 on spin attack release.
- $3D (01) = A delay timer for the spin attack. Used between shifts to make the animation flow with the flash effect. Also used for delays between different graphics when swinging your sword.
- $40 (01) = Y coordinate related variable
- $41 (01) = X coordinate related variable
- $42 (01) = set to 0x0F during preoverworld
- $43 (01) = "
- $44 (01) = set to 0x80 during preoverworld
- $45 (01) = "
- $46 (01) = A countdown timer that incapacitates Link when damaged or in recoil state. If nonzero, no movement input is recorded for Link.
- $47 (01) = Set when damaging enemies, unsure of exact usage yet.
- $48 (01) = If set, when you push A Link will grab at the air.
- $49 (01) = This address is written to make Link move in any given direction. Indoors it is cleared every frame. Outdoors it is not cleared every frame so watch out.
- $4B (01) = Link's visibility status. If set to 0x0C, Link will disappear.
- $4C (01) = Counter that decreases every frame when the Cape is in used. Starts at 4 and counts down to 0. When it reaches 0, your magic meter is decremented based on whether you have full or 1/2 magic. There's a table in Bank 0x07 that determines this
- $4D (01) = An Auxiliary Link handler. As far as I know:
- 0x00 = ground state (normal)
- 0x01 = the recoil status
- 0x02 = jumping in and out of water?
- 0x04 = swimming state.
- $4E (01) = ????
- $4F (01) = Index for creating the dashing sound effect. If frozen to a single value, no sound occurs.
- $50 (01) = A flag indicating whether a change of the direction Link is facing is possible.For example, when the B button is held down with a sword.
- 0 = can change,
- Non zero = can't change.
- $51 (01) = ????
- $53 (01) = ????
- $55 (01) = Cape flag, when set, makes you invisible and invincible. You can also go through objects such as bungies.
- $56 (01) = Link's graphic status:
- 1 = bunny link,
- 0 = real link.
- $57 (01) = Modifier for Link's movement speed.
- 0x00 to 0x-- = normal
- 0x01 to 0x0F = slow
- 0x10 to 0xFF = fast
Negative values actually reverse your direction!
- $58 (01) = Bitfield describing interactions with stairs tiles. uuuussss
- s = Stair tiles
- u = free ram
If this masked with 0x07 equals 0x07, Link moves slowly, like he's on a small staircase
- $02C0 (----) also needs this variable to be nonzero to trigger
- $59 (01) = ????
- $5A (01) = ????
- $5B (01) =
- 0 = indicates nothing
- 1 = Link is dangerously near the edge of a pit
- 2 = Link is falling
- $5D (01) = Link Handler or "State"
- 0x00 = ground state
- 0x01 = falling into a hole
- 0x02 = recoil from hitting wall / enemies
- 0x03 = spin attacking
- 0x04 = swimming
- 0x05 = Turtle Rock platforms
- 0x06 = recoil again (other movement)
- 0x07 = hit by Aghanim’s bug zapper
- 0x08 = using ether medallion
- 0x09 = using bombos medallion
- 0x0A = using quake medallion
- 0x0B = ???
- 0x0C = ???
- 0x0D = ???
- 0x0E = ???
- 0x0F = ???
- 0x10 = ???
- 0x11 = falling off a ledge
- 0x12 = used when coming out of a dash by pressing a direction other than the dash direction
- 0x13 = hookshot
- 0x14 = magic mirror
- 0x15 = holding up an item
- 0x16 = asleep in his bed
- 0x17 = permabunny
- 0x18 = stuck under a heavy rock
- 0x19 = Receiving Ether Medallion
- 0x1A = Receiving Bombos Medallion
- 0x1B = Opening Desert Palace
- 0x1C = temporary bunny
- 0x1D = Rolling back from Gargoyle gate or PullForRupees object
- 0x1E = The actual spin attack motion.
- $5E (01) = Speed setting for Link. The different values this can be set to index into a table that sets his real speed. Some common values:
- 0x00 = Normal walking speed
- 0x02 = Walking (or dashing) on stairs
- 0x10 = Dashing
- $60 (01) = During story mode, used as a counter for one set of jump tables.
- $64 (02) =
- 0x1000 if $EE = 1,
- 0x2000 if $EE = 0.
- $66 (01) = Indicates the last direction Link moved towards. Value wise:
- 0 = Up,
- 1 = Down,
- 2 = Left,
- 3 = Right
- $67 (01) = Indicates which direction Link is walking (even if not going anywhere) bitwise: 0000abcd.
- a = Up
- b = Down
- c = Left
- d = Righ
- $68 (01) = ????
- $69 (01) = ???
- $6A (01) = ???
- $6B (01)] =
- moving up against a \ wall: 0x1A
- moving right against a \ wall: 0x25
- moving down against a \ wall: 0x15
- moving left against a \ wall: 0x2A
- moving up against a / wall: 0x19
- moving left against a / wall: 0x26
- moving right against a / wall: 0x29
- moving down against a / wall: 0x16
- $6C (01) = Indicates whether you are standing in a doorway
- 0 = not standing in a doorway.
- 1 = standing in a vertical doorway
- 2 = standing in a horizontal door way
- $6D (01) = When you are moving against a diagonal wall and you are deadlocked, i.e. you are pressing against it directly, but aren't going anywhere, this will contain the value that $6B] would have.
- $6E (01) = (archiving but not sure if this is correct) Related to certain tile behaviours (see tile type 2 I think) nearby
- moving against a \ wall from below: 0
- moving against a \ wall from above: 2
- moving against a / wall from below: 4
- moving against a / wall from above: 6
- $6F (03) = As of now, I consider this to be free ram
- $72 (01) = ????
- $73 (01) = has value 0x02 when master sword beam is active...
- $74 (02) = ??? Related to moving water?
- $76 (02) = When link interacts with certain tile types, the index of that tile gets stored here.
- $78 (01) = possibly used in the context of chests.
- $79 (01) = Controls whether to do a spin attack or not (Found by PARCCC from gshi)
- $7B (01) = Set to 0x00 when in the Light World, and 0x40 when in the Dark World. Often used for temporary calculations, so don't expect it to be reflective of the current status of the player at all times.
- $82 (02) = ????
- $84 (02) = not sure...
- $86 (02) = not sure...
- $88 (02) = not sure...
- $8A (02) = Overworld Screen Index
- $8C (01) = Overlay index (credit: Euclid)
- $8D (01) = ???
- $90 (02) = Points to current position in the low OAM buffer (the first 512 bytes)
- $92 (02) = Points to current position in the high OAM table buffer (later 32 bytes)
- $94 (01) = Screen Mode Register ($2105)
- $95 (01) = Mosaic Settings ($2106)
- $96 (01) = Window Masks for Backgrounds 1 and 2 ($2123)
- $97 (01) = Window Masks for Backgrounds 3 and 4 ($2124)
- $98 (01) = Window Masks for Obj and Color Add/Subtraction Layers ($2125)
- $99 (01) = Enable Fixed Color +/- ($2130)
- $9A (01) = Enable +/- per layer ($2131)
- $9B (01) = HDMA channels to write to ($420C)
- $9C (01) = writes to $2132. Red fixed color component
- $9D (01) = writes to $2132. Green fixed color component
- $9E (01) = writes to $2132. Blue fixed color component
- $9F (01) = free ram?
- $A0 (02) = The index used for loading a dungeon room. There are 296 rooms all in all. (mirrored in other variables).
- $A2 (02) = Points to the previous dungeon room.
- $A4 (02) = Indicates the current floor Link is on in a dungeon.
- $A6 (01) = Set to 0 or 2, but it depends upon the dungeon room's layout and the quadrant it was entered from.
- $A7 (01) = ""
- $A8 (01) = Composite of dungeon room layout info and quadrant info that gets updated periodically 000cccba
- ccc = layout that the room uses (0 to 7 obviously)
- b = ORed in value of $AA
- a = ORed in value of $A9
- $A9 (01) =
- 0 if you are on the left half of the room.
- 1 if you are on the right half.
- $AA (01) =
- 2 if you are the lower half of the room.
- 0 if you are on the upper half.
- $AB (02) = free ram?
- $AD (01) = ??? collision?
- $AE (01) = In dungeons, holds the Tag1 Value. (see Hyrule Magic)
- $AF (01) = In dungeons, holds the Tag2 Value. (see Hyrule Magic)
- $B0 (01) = Sub-submodule index. (Submodules of the $11 submodule index.)
- $B1 (01) = free ram?
- $B2 (02) = Width indicator for drawing dungeon objects
- $B4 (02) = Height indicator for drawing dungeon objects
- $B7 (03) = Used as storage during dungeon loading for a 3-bit pointer to be indirectly accessed.
- $BA (02) = Often used as a position into a buffer of data during dungeon loading.
- $BD (0?) =
- (Bank 0x08) Used as a temporary for the Cane of Somaria creation poof, or something like that.
- (Bank 0x00) Temporary used in expanding 3bpp to 4bpp (high) graphics.
- (Bank 0x07) Address recorded during tile interactions.
- (Equipment) Seems to represent joypad input for selecting an item.
- $BF (??) = Used during the dungeon
- $C8 (01) =
- (in menus) keeps track of what part of a menu you are in. For example, 0 = 4 on the select game screen, 0 = 2 for each save game, 3 & 4 are copy and erase game.
- (in ending module) 16 bit timer used for stepping through each ending sequence.
- $E0 (02) = BG1 horizontal scroll register ($210F)
- $E2 (02) = BG2 horizontal scroll register ($210D)
- $E4 (02) = BG3 Horizontal Scroll Register ($2111)
- $E6 (02) = BG1 Vertical scroll register ($2110)
- $E8 (02) = BG2 Vertical scroll register ($210E)
- $EA (02) = BG3 Vertical Scroll Register ($2112)
- $EC (02) = Tilemap location calculation mask. Is only ever set to 0xFFF8 or 0x01F8
- $EE (01) = In dungeons, 0 Means you’re on the upper level. 1 Means you’re on a lower level. Important for interaction with different tile types.
- $EF (01) = Room Transitioning Value (bitwise)
- bit 0 = Toggles between BG0 and BG1. One example: Sanctuary and Hyrule Castle. (see door type up-11)
- bit 1 = Transition between Sewer and Hyrule Castle. Xors the dungeon index by 0x02.
- $F0 (01) = Unfiltered Joypad 1 Register: Same as $F4, except it preserves buttons that were being pressed in the previous frame.
- $F1 (01) = Unfiltered Joypad 2 Register: Same as $F5, except it preserves buttons that were being pressed in the previous frame. Note: Input from joypad 2 is not read unless you do some ASM hacking.
- $F2 (01) = Unfiltered Joypad 1 Register: Same as $F6, except it preserves buttons that were being pressed in the previous frame.
- $F3 (01) = Unfiltered Joypad 2 Register: Same as $F7, except it preserves buttons that were being pressed in the previous frame. Note: Input from joypad 2 is not read unless you do some asm hacking
- $F4 (01) = Filtered Joypad 1 Register: [BYST | udlr].
- Lower case represents the cardinal directions, T = start. S = select.
- $F5 (01) = Filtered Joypad 2 Register: [BYST | udlr].
- Lower case represents the cardinal directions, T = start. S = select.
- Note: Input from joypad 2 is not read unless you do some asm hacking
- $F6 (01) = Filtered Joypad Register [AXLR | ????]
- LR: The shoulder buttons.
- ? = unknown inputs
- $F7 (01) = Filtered Joypad Register [AXLR | ????]
- LR: The shoulder buttons. ? = unknown inputs.
- Note: input from joypad 2 is not read unless you do some asm hacking.
- $F8 (01) = ???
- $FC (02) = .... Overrides for dungeon room transitions? (Seen used with big bombable walls)
- $FF (01) = Vertical IRQ Trigger (this is the vertical scanline that will trigger the IRQ)
Table of Contents |
---|