The Legend of Zelda/RAM map: Difference between revisions

From Data Crystal
Jump to navigation Jump to search
(7F/93: x and y of boomerang also)
m (→‎RAM: added walking animation)
 
(62 intermediate revisions by 16 users not shown)
Line 1: Line 1:
{{rammap|game=Legend of Zelda}}
{{rammap|game=The Legend of Zelda}}
<br>
{| border="1" cellpadding="1"
| '''Zero Page''' || '''Function''' || '''Details'''
|-
|0x0000 || ? ||enemy #
|-
|0x0001 || ? ||
|-
|0x0002 || ? ||
|-
|0x0003 || ? ||
|-
|0x0004 || ? ||
|-
|0x0005 || ? ||
|-
|0x0006 || ? ||
|-
|0x0007 || ? ||
|-
|0x0008 || ? ||
|-
|0x0009 || ? ||
|-
|0x000A || ? ||
|-
|0x000B || ? ||
|-
|0x000C || ? ||
|-
|0x000D || ? ||
|-
|0x000E || ? ||
|-
|0x000F || ? ||
|-
|0x0010 || Current Level Index||
|-
|0x0011 || ? ||
|-
|0x0012 || Scroll status || 5=Normal  6=Preparing Scroll  7=Scrolling  4=Finishing Scroll
|-
|0x0013 || ? ||
|-
|0x0014 || ? ||
|-
|0x0015 || ? ||
|-
|0x0016 || ? ||
|-
|0x0017 || ? ||
|-
|0x0018 || ? ||
|-
|0x0019 || ? ||
|-
|0x001A || ? ||
|-
|0x001B || ? ||
|-
|0x001C || ? ||
|-
|0x001D || ? ||
|-
|0x001E || ? ||
|-
|0x001F || ? ||
|-
|0x0020 || ? ||
|-
|0x0021 || ? ||
|-
|0x0022 || ? ||
|-
|0x0023 || ? ||
|-
|0x0024 || ? ||
|-
|0x0025 || ? ||
|-
|0x0026 || ? ||
|-
|0x0027 || ? ||
|-
|0x0028 || ? ||
|-
|0x0029 || ? ||
|-
|0x002A || ? ||
|-
|0x002B || ? ||
|-
|0x002C || ? ||
|-
|0x002D || ? ||
|-
|0x002E || ? ||
|-
|0x002F || ? ||
|-
|0x0030 || ? ||
|-
|0x0031 || ? ||
|-
|0x0032 || ? ||
|-
|0x0033 || ? ||
|-
|0x0034 || ? ||
|-
|0x0035 || ? ||
|-
|0x0036 || ? ||
|-
|0x0037 || ? ||
|-
|0x0038 || ? ||
|-
|0x0039 || ? ||
|-
|0x003A || ? ||
|-
|0x003B || ? ||
|-
|0x003C || ? ||
|-
|0x003D || ? ||
|-
|0x003E || ? ||
|-
|0x003F || ? ||
|-
|0x0040 || ? ||
|-
|0x0041 || ? ||
|-
|0x0042 || ? ||
|-
|0x0043 || ? ||
|-
|0x0044 || ? ||
|-
|0x0045 || ? ||
|-
|0x0046 || ? ||
|-
|0x0047 || ? ||
|-
|0x0048 || ? ||
|-
|0x0049 || ? ||
|-
|0x004A || ? ||
|-
|0x004B || ? ||
|-
|0x004C || Countdown until Link can use his sword again after touching a White Bubble ||
|-
|0x004D || ? ||
|-
|0x004E || ? ||
|-
|0x004F || ? ||
|-
|0x0050 || ? ||
|-
|0x0051 || ? ||
|-
|0x0052 || ? ||
|-
|0x0053 || ? ||
|-
|0x0054 || ? ||
|-
|0x0055 || ? ||
|-
|0x0056 || ? ||
|-
|0x0057 || ? ||
|-
|0x0058 || ? ||
|-
|0x0059 || ? ||
|-
|0x005A || ? ||
|-
|0x005B || ? ||
|-
|0x005C || ? ||
|-
|0x005D || ? ||
|-
|0x005E || ? ||
|-
|0x005F || ? ||
|-
|0x0060 || ? ||
|-
|0x0061 || ? ||
|-
|0x0062 || ? ||
|-
|0x0063 || ? ||
|-
|0x0064 || ? ||
|-
|0x0065 || ? ||
|-
|0x0066 || ROM Offset for start of current Song Data (low byte) ||
|-
|0x0067 || ROM Offset for start of current Song Data (high byte) ||
|-
|0x0068 || ? ||
|-
|0x0069 || ? ||
|-
|0x006A || Pulse-2 Channel Frequency Offset ||
|-
|0x006B || Pulse-1 Channel Frequency Offset ||
|-
|0x006C || Offset related to Music Pointers ||
|-
|0x006D || ? ||
|-
|0x006E || ? ||
|-
|0x006F || ? ||
|-
|0x0070 || Link's X-position on the screen ||
|-
|0x0071 || Enemy #1's X-position || Also used for dropped enemy item
|-
|0x0072 || Enemy #2's X-position || Also used for dropped enemy item?
|-
|0x0073 || Enemy #3's X-position || Also used for dropped enemy item?
|-
|0x0074 || Enemy #4's X-position || Also used for dropped enemy item
|-
|0x0075 || Enemy #5's X-position || Also used for dropped enemy item?
|-
|0x0076 || Enemy #6's X-position || Also used for dropped enemy item?
|-
|0x0077 || Enemy #7's X-position || Also used for dropped enemy item?
|-
|0x0078 || Enemy #8's X-position || Also used for dropped enemy item?
|-
|0x0079 || Projectile X-position ||
|-
|0x007A || Projectile X-position ||
|-
|0x007B || Projectile #1's X-position ||
|-
|0x007C || ? ||
|-
|0x007D || ? ||
|-
|0x007E || Link's Sword X-position ||
|-
|0x007F || Boomerang/Bait X-position ||
|-
|0x0080 || ? ||
|-
|0x0081 || ? ||
|-
|0x0082 || ? ||
|-
|0x0083 || ? ||
|-
|0x0084 || Link's Y-position on the screen ||
|-
|0x0085 || Enemy #1's Y-position || Also used for dropped enemy item?
|-
|0x0086 || Enemy #2's Y-position || Also used for dropped enemy item?
|-
|0x0087 || Enemy #3's Y-position || Also used for dropped enemy item?
|-
|0x0088 || Enemy #4's Y-position || Also used for dropped enemy item
|-
|0x0089 || Enemy #5's Y-position || Also used for dropped enemy item?
|-
|0x008A || Enemy #6's Y-position || Also used for dropped enemy item?
|-
|0x008B || Enemy #7's Y-position || Also used for dropped enemy item?
|-
|0x008C || Enemy #8's Y-position || Also used for dropped enemy item?
|-
|0x008D || Projectile Y-position ||
|-
|0x008E || Projectile Y-position ||
|-
|0x008F || Projectile #1's Y-position ||
|-
|0x0090 || ? ||
|-
|0x0091 || ? ||
|-
|0x0092 || Link's Sword Y-position ||
|-
|0x0093 || Boomerang/Bait Y Position ||
|-
|0x0094 || ? ||
|-
|0x0095 || ? ||
|-
|0x0096 || ? ||
|-
|0x0097 || Dungeon Floor Item ||
|-
|0x0098 || The direction Link is facing || $08=North, $04=South, $01=East, $02=West ||
|-
|0x0099 || ? ||
|-
|0x009A || ? ||
|-
|0x009B || ? ||
|-
|0x009C || ? ||
|-
|0x009D || ? ||
|-
|0x009E || ? ||
|-
|0x009F || ? ||
|-
|0x00A0 || ? ||
|-
|0x00A1 || ? ||
|-
|0x00A2 || ? ||
|-
|0x00A3 || ? ||
|-
|0x00A4 || ? ||
|-
|0x00A5 || ? ||
|-
|0x00A6 || ? ||
|-
|0x00A7 || ? ||
|-
|0x00A8 || ? ||
|-
|0x00A9 || ? ||
|-
|0x00AA || ? ||
|-
|0x00AB || Type of item in screen || The value indicates item type (bomb, heart, rupee, etc)
|-
|0x00AC || ? ||
|-
|0x00AD || Type of dropped enemy item #1 ||
|-
|0x00AE || Type of dropped enemy item #2? ||
|-
|0x00AF || Type of dropped enemy item #3 ||
|-
|0x00B0 || Type of dropped enemy item #4 ||
|-
|0x00B1 || Type of dropped enemy item #5? ||
|-
|0x00B2 || Type of dropped enemy item #6? ||
|-
|0x00B3 || Type of dropped enemy item #7? ||
|-
|0x00B4 || Type of dropped enemy item #8? ||
|-
|0x00B5 || Projectile Onscreen? ||
|-
|0x00B6 || Projectile Onscreen? ||
|-
|0x00B7 || Projectile Onscreen? ||
|-
|0x00B8 || ? ||
|-
|0x00B9 || ? ||
|-
|0x00BA || ? ||
|-
|0x00BB || ? ||
|-
|0x00BC || ? ||
|-
|0x00BD || ? ||
|-
|0x00BE || ? ||
|-
|0x00BF || ? ||
|-
|0x00C0 || ? ||
|-
|0x00C1 || ? ||
|-
|0x00C2 || Dropped Enemy Item ||
|-
|0x00C3 || Dropped Enemy Item ||
|-
|0x00C4 || ? ||
|-
|0x00C5 || ? ||
|-
|0x00C6 || ? ||
|-
|0x00C7 || ? ||
|-
|0x00C8 || ? ||
|-
|0x00C9 || ? ||
|-
|0x00CA || ? ||
|-
|0x00CB || ? ||
|-
|0x00CC || ? ||
|-
|0x00CD || ? ||
|-
|0x00CE || ? ||
|-
|0x00CF || ? ||
|-
|0x00D0 || ? ||
|-
|0x00D1 || ? ||
|-
|0x00D2 || ? ||
|-
|0x00D3 || ? ||
|-
|0x00D4 || ? ||
|-
|0x00D5 || ? ||
|-
|0x00D6 || ? ||
|-
|0x00D7 || ? ||
|-
|0x00D8 || ? ||
|-
|0x00D9 || ? ||
|-
|0x00DA || ? ||
|-
|0x00DB || ? ||
|-
|0x00DC || ? ||
|-
|0x00DD || ? ||
|-
|0x00DE || ? ||
|-
|0x00DF || ? ||
|-
|0x00E0 || Game Paused? || $=No, $01=Yes ||
|-
|0x00E1 || ? ||
|-
|0x00E2 || ? ||
|-
|0x00E3 || ? ||
|-
|0x00E4 || ? ||
|-
|0x00E5 || ? ||
|-
|0x00E6 || ? ||
|-
|0x00E7 || ? ||
|-
|0x00E8 || Screen Scrolling? || $00=No, $08=Northbound, $04=Southbound, $01=Eastbound, $02=Westbound||
|-
|0x00E9 || ? ||
|-
|0x00EA || ? ||
|-
|0x00EB || Current map location || Value equals map x location + 0x10 * map y location
|-
|0x00EC || ? ||
|-
|0x00ED || ? ||
|-
|0x00EE || ? ||
|-
|0x00EF || ? ||
|-
|0x00F0 || ? ||
|-
|0x00F1 || ? ||
|-
|0x00F2 || ? ||
|-
|0x00F3 || ? ||
|-
|0x00F4 || ? ||
|-
|0x00F5 || ? ||
|-
|0x00F6 || ? ||
|-
|0x00F7 || ? ||
|-
|0x00F8 || Player 1 Buttons (Last Frame) || R = 1, L = 2, D = 4, U = 8, Start = 10, Select = 20, B = 40, A = 80
|-
|0x00F9 || Player 2 Buttons (Last Frame) || (See above)
|-
|0x00FA || Player 1 Buttons Pressed || $00=No, $08=Up, $04=Down, $01=Right, $02=Left $80=A, $40=B, $20=Select, $10=Start (these can be combined) ||
|-
|0x00FB || Player 2 Buttons Pressed || (See above)
|-
|0x00FC || Subscreen Y-scroll position || Used for storyboard text and subscreen position
|-
|0x00FD || Subscreen X-scroll position || This is always zero when not scrolling.
|-
|0x00FE || ? ||
|-
|0x00FF || ? ||
|-
|}
<br>


{| border="1" cellpadding="1"
==Zero Page==
| '''RAM''' || '''Function''' || '''Details'''
Address    Function                   Details
|-
----------- --------------------------- -----------------------------------------
|0x04CD || The entry from ROM:0x18680 for the current room || Overworld: stair placement, quest secrets, Link's V placement, monster entry
00         Multiple Functions          X-coords of sprite, ...   
|-
01         Multiple Functions          Y-coords of sprite, ...   
|0x0513 || Whether Link has used the candle on the current screen || $00=No, $01=Yes
02          Multiple Functions          Tile # for sprite (Left Half), ... 
|-
03          Multiple Functions          Tile # for sprite (Right Half), ...   
|0x0526 || Overworld room to return to when exiting the underworld ||
04          Multiple Functions          Attributes for sprite (Left Half), ... 
|-
05          Multiple Functions          Attributes for sprite (Right Half), ...   
|0x052E || Red Bubble Sword Disable switch || $01 if Link's use of his sword has been disabled by a red bubble, $00 otherwise.
06          ?         
|-
07          Multiple Functions
|0x052F || Maze counter used for rooms 0x61 (forest maze) and 0x1B (mountain room south of level 5) ||
08-0C        ?
|-
0D          Multiple Functions          Full Hearts Damage taken, ... 
|0x05F0 || Related to current frequency being played by Triangle channel ||
0E          Multiple Functions          Partial Heart Damage taken, ... 
|-
0F          Multiple Functions          Link's Move Direction (01,FF), ...                               
|0x05F1 || Reverb on/off status for Triangle on current song ||
10          Current Level              (0 = Overworld)
|-
11          ?        
|0x05F4 || Rhythm table pointer for current song ||
12          Game Mode                  0=Title/transitory    1=Selection Screen
|-
                                        5=Normal              6=Preparing Scroll
|0x0605 || Related to incidental music? ||
                                        7=Scrolling          4=Finishing Scroll;
|-
                                        E=Registration        F=Elimination
|0x0606 || Sound Effects ||
13          Routine Index
|-
14          PPU Loading Index
|0x0607 || Incidental Music ||
15          Frame counter     
|-
16          Current save slot          $00=first, $01=second, $02=third; On selection/registration/elimination screens: $03=fourth option, $04=fifth option
|0x0609 || Songtype currently active || $80=Title, $40=Dungeon, $20=Level 9, $10=Ending, $08=Item, $04=Triforce, $02=Ganon, $01=Overworld
17-23      Individual Randomizer
|-
24-27        ?
|0x060A || Current position within Pulse 2 part (with respect to overall music program) ||
28          (X to update $00, ...)
|-
29          Timer/Countdown          Used for dialog text and is a Countdown until Enemy #1 can do his action(See Below) again
|0x060B || Current position within Pulse 1 part (with respect to overall music program) ||
2A          Countdown until Enemy #2 can do his main action(Shoot a Projectile,Jump,etc.)again
|-
2B          Countdown until Enemy #3 can do his main action(See Above)again
|0x060C || Current position within Triangle part (with respect to overall music program) ||
2C          Countdown until Enemy #4 can do his main action(See Above)again
|-
2D          Countdown until Enemy #5 can do his main action(See Above)again
|0x060D || Current position within Noise part (with respect to overall music program) ||
2E          Countdown until Enemy #6 can do his main action(See Above)again
|-
2F          ?
|0x060E || ? ||
30          Countdown until Rock #1 and Zola's Fireball start to move
|-
31          Countdown until Rock #2 and Zola's Fireball start to move
|0x060F || Current cycle duration for notes played on Pulse 1 channel || Uses value from rhythm lookup table
32          Countdown until Rock #3 and Zola's Fireball start to move and until Zola start his next animation
|-
33          Countdown until Zola start his next animation
|0x0610 || Current cycle duration for notes played on Pulse 2 channel || Uses value from rhythm lookup table
34-36        ?
|-
37          Countdown until bait disappears (3 cycle before disappearence)
|0x0611 || Countdown from Pulse 2's current rhythm offset || Uses value from rhythm lookup table
38          Countdown until bomb explode or flame (Magical Rod or Candle) disappears
|-
39-3B        ?
|0x0612 || Pulse 2 countdown; volume fade ||
3C          Countdown until Link and enemies can move again after the recorder was use
|-
3D-4B        ?         
|0x0613 || Countdown from Pulse 1's current rhythm offset || Uses value from rhythm lookup table
4C          Countdown until Link can use his sword again after touching a White Bubble 
|-
4D-4F        ? 
|0x0614 || Pulse 1 countdown; volume fade ||
50          Counts number of enemies killed without taking damage, resets to 0 once it reaches 10 ("10th enemy has the bomb" RAM address)
|-
51-5B        ?
|0x0615 || Current cycle duration for notes played on Triangle channel || Uses value from rhythm lookup table
5C          Vertical Scrolling Offset (high byte)
|-
5D-65        ?
|0x0616 || Countdown from value in $615 until next note is to be played ||
66          ROM Offset for start of current Song Data (Low Byte)   
|-
67          ROM Offset for start of current Song Data (High Byte) 
|0x0617 || ? ||
68-69        ?
|-
6A          Pulse-2 Channel Frequency Offset   
|0x0618 || Related to incidental music ||
6B          Pulse-1 Channel Frequency Offset   
|-
6C          Offset related to Music Pointers   
|0x0619 || Reverb on/off status for BOTH Pulse channels on current song || $80=on, $01=off
6D          ?
|-
6E          Rhythmic Offset            For current note of Pulse 2 Incidental Music
|0x061A || ? ||
6F          Rhythmic Countdown          For Pulse 2 incidental music (Uses value at $6E)
|-
70          Link's X-position on the screen
|0x061B || Countup to Pulse 2 rhythm offset ||
71          Enemy #1 X-position          Also used for dropped enemy item
|-
72          Enemy #2 X-position          Also used for dropped enemy item
|0x061C || Countup to Pulse 1 rhythm offset ||
73          Enemy #3 X-position          Also used for dropped enemy item
|-
74          Enemy #4 X-position          Also used for dropped enemy item
|0x061D || ??? (seems to count upward as $616 counts down) || Value is always [$615] - [$616] + 1.
75          Enemy #5 X-position          Also used for dropped enemy item
|-
76          Enemy #6 X-position          Also used for dropped enemy item
|0x061E || Number of repeats remaining if in Triangle repeat cycle ||
77          Enemy #4 Projectile X-position
|-
78          Enemy #1 Projectile X-position
|0x061F || Position within song program of current Triangle repeat coda (return point) ||
79          Enemy #2 Projectile X-position 
|-
7A          Enemy #3 Projectile and Zola(On Some Screen) X-position
|0x0620 || Screen history write index || Contains the index of the next screen history slot to write to (see below)
7B          Zola X position (On Some screen )
|-
7C          ?
|0x0621 || Screen history 1 || One of five recently visited map locations
7D          Link's Sword X-position (As a Melee Weapon)
|-
7E          Link's Sword X-position (As a Projectile)  
|0x0622 || Screen history 2 || One of five recently visited map locations
7F          Boomerang/Bait X-position 
|-
80          Flame/Bomb #1 X-position
|0x0623 || Screen history 3 || One of five recently visited map locations
81          Flame/Bomb #2 X-position
|-
82          Link's Arrow X-position   
|0x0624 || Screen history 4 || One of five recently visited map locations
83          ? 
|-
84          Link's Y-position on the screen   
|0x0625 || Screen history 5 || One of five recently visited map locations
85          Enemy #1 Y-position          Also used for dropped enemy item
|-
86          Enemy #2 Y-position          Also used for dropped enemy item
|0x0626 || ? ||
87          Enemy #3 Y-position          Also used for dropped enemy item
|-
88          Enemy #4 Y-position          Also used for dropped enemy item
|0x0627 || Killed enemy count || Number of killed enemies in current screen
89          Enemy #5 Y-position          Also used for dropped enemy item
|-
8A          Enemy #6 Y-position          Also used for dropped enemy item
|0x0628 || Unused ||
8B          Enemy #4 Projectile Y-position
|-
8C          Enemy #1 Projectile Y-position
|0x0629 || Unused ||
8D          Enemy #2 Projectile Y-position
|-
8E          Enemy #3 Projectile and Zola (On Some Screen) Y-position
|0x062A || Unused ||
8F          Zola Y-position (On Some Screen)
|-
90          ? 
|0x062B || Unused ||
91          Link's Sword Y-position  (As a Melee Weapon)
|-
92          Link's Sword Y-position  (As a Projectile) 
|0x062C || Unused ||
93          Boomerang/Bait Y-position 
|-
94          Flame/Bomb #1 Y-position
|0x062D || Current quest for first save slot || $00=First, $01=Second
95          Flame/Bomb #2 Y-position
|-
96          Link's Arrow Y-position   
|0x062E || Current quest for second save slot || $00=First, $01=Second
97          Dungeon Floor Item 
|-
98          Link's Direction            $08=North, $04=South, $01=East, $02=West
|0x062F || Current quest for third save slot || $00=First, $01=Second
99          Enemy #1 Direction (See Above)
|-
9A          Enemy #2 Direction (See Above)
|0x0656 || Cursor position for selecting Link's B item ||
9B          Enemy #3 Direction (See Above)
|-
9C          Enemy #4 Direction (See Above)
|0x0657 || Current sword || $00=None, $01=Sword, $02=White Sword, $03=Magical Sword
9D          Enemy #5 Direction (See Above)
|-
9E          Enemy #6 Direction (See Above)
|0x0658 || Number of Bombs ||
9F          Enemy #4 Projectile Direction(See Below)
|-
A0          Enemy #1 Projectile Direction            $08=North, $04=South, $01=East, $02=West(Diagonal direction are equal to $(Xdirection+Ydirection))
|0x0659 || Arrow status || $00=None, $01=Arrow, $02=Silver Arrow
A1          Enemy #2 Projectile Direction (See Above)
|-
A2          Enemy #3 Projectile Direction (See Above)
|0x065A || Bow in Inventory || $00=False, $01=True
A3-A4        ?
|-
A5          Link's Sword Direction (As a Melee weapon)          $08=North, $04=South, $01=East, $02=West
|0x065B || Status of candle || 00=None, $01=Blue Candle, $02=Red Candle
A6          Link's Sword Direction (As a Projectile)
|-
A7          Boomerang Direction
|0x065C || Whistle in Inventory || $00=False, $01=True
A8          Flame (Candle or Magic Rod) Direction
|-
A9          Second Flame Direction
|0x065D || Food in Inventory || $00=False, $01=True
AA          Arrow and Magic Rod's projectile Direction $08=North, $04=South, $01=East, $02=West
|-
AB          Type of item in screen  The value indicates item type (Bomb, Heart, Rupee, etc)
|0x065E || Potion in Inventory || $00=None/Letter, $01=Life Potion, $02=2nd Potion
AC          Link's Animation
|-
AD          Type of dropped enemy item #1
|0x065F || Magical Rod in Inventory || $00=False, $01=True
AE          Type of dropped enemy item #2
|-
AF          Type of dropped enemy item #3
|0x0660 || Raft in Inventory || $00=False, $01=True
B0          Type of dropped enemy item #4
|-
B1          Type of dropped enemy item #5
|0x0661 || Magic Book in Inventory || $00=False, $01=True
B2          Type of dropped enemy item #6
|-
B3          State of Enemy #4 Projectile (See Below)
|0x0662 || Ring in Inventory || $00-None, $01-Blue Ring, $02-Red Ring. Note: Changing this value will not change Link's color.
B4          State of Enemy #1 Projectile        $00=Not Existant, $10=In Movement, $20=Start of Blowing Animation, $28=End of Blowing Animation, $30=Being Deflected by Shield
|-
B5          State of Enemy #2 Projectile (See Above)
|0x0663 || Step Ladder in Inventory || $00=False, $01=True
B6          State of Enemy #3 Projectile (See Above)
|-
B7          State of Enemy #? Projectile (See Above)
|0x0664 || Magical Key in Inventory || $00=False, $01=True
B8          ?
|-
B9          Link's Sword Animation
|0x0665 || Power Bracelet in Invenotry || $00=False, $01=True
BA          State of Link's Sword(As a Projectile) and Magic            $00=Not Existant, $10=In Movement, $11=Blowing Animation, $80=Magic Onscreen
|-
BB          State of Bait and Link's Boomerang            $10-$17=Rotation of boomerang when going away, $24=Turnaround of Boomerang, $28=Blowing Animation of Boomerang, $50-$57=Rotation of boomerang when coming back, $80=Bait Onscreen(First cycle of 0x0037), $81=Bait Onscreen(Second cycle of 0x0037), $82 Bait Onscreen(Last cycle of 0x0037)
|0x0666 || Letter in Inventory || $00=False, $01=True, Link can buy potions from the old woman if $02.
BC          State of Link's Bomb and Flame #1          $12=Bomb Onscreen, $13=Bomb's Smoke Onscreen, $14=Bomb's Smoke Dissappearing, $21=Flame #1 is Moving, $22=Flame #1 is static
|-
  BD          State of Link's Flame #2            $21=Flame #2 is Moving, $22=Flame #2 is static
|0x0667 || Compass status for Levels 1 through 8 || When value is converted to binary, a $01 represents having the Compass and a $00 represents not having it.
BE          State of Link's Arrow and Magical rod animation          $00=Not Existant, $10=In Movement, $20=Start of Blowing Animation, $28=End of Blowing Animation, $31-$35=Magical Rod Animation
|-
BF-C1        ?
|0x0668 || Map status for Levels 1 through 8 || When value is converted to binary, a $01 represents having the Map and a $00 represents not having it.
C2          Dropped Enemy Item 
|-
C3          Dropped Enemy Item 
|0x0669 || Level 9 Compass possessed || $00=False, $01=True
C4-DF        ? 
|-
E0          Game Paused?                $00=No, $01=Yes
|0x066A || Level 9 Map possessed || $00=False, $01=True
E1          Item Menu Scrolling Animation 
|-
E2-E7        ?         
|0x066C || Clock possessed || $00=False, $01=True
E8          Screen Scrolling?          $00=No, $08=Northbound, $04=Southbound, $01=Eastbound, $02=Westbound
|-
E9-EA        ?
|0x066D || Number of Rupees
EB          Map location                Value equals map x location + 0x10 * map y location
|-
EC          Next Location
|0x066E || Number of Keys
ED-F7        ? 
|-
F8          Player 1 Buttons            (Last Frame)  R = 1, L = 2, D = 4, U = 8, Start = 10, Select = 20, B = 40, A = 80
|0x066F || Heart Containers || Low Nibble = how many hearts are filled. High Nybble = Number of heart containers - 1 <br> Ex: $10 = 2 Heart Containers with none filled
F9          Player 2 Buttons            (Last Frame)  (See above)
|-
FA          Player 1 Buttons            Pressed    $08=Up, $04=Down, $01=Right, $02=Left $80=A, $40=B, $20=Select, $10=Start
|0x0670 || The heart following the last filled heart || $00 = empty, $01 to $7F = half full, $80 to $FF = full.
FB          Player 2 Buttons            Pressed    (See Above)
|-
FC          Subscreen Y-scroll position Used for storyboard text and subscreen position
|0x0671 || Triforce pieces || When value is converted to binary, a $01 represents having the piece and a $00 represents not having it.
FD          Subscreen X-scroll position This is always zero when not scrolling.
See [http://img519.imageshack.us/img519/2193/tribitflags0mi.jpg this] image for a visualization.
FE          The PPU mask value is set to the value of this address (it's always $1E during gameplay but takes on different values in screen changes of the title screen). Could have had a purpose in some stage of development to hide sprites, since it is used by the item menu and pause routine as well as the screen-transition routine (they call a routine that takes the value and AND's it with $FE, which does nothing today, but could have been set to something else back then).
|-
FF          ?
|0x0674 || Boomerang in Inventory || $00=False, $01=True. Note: 0x0675 overrides this variable.
|-
|0x0675 || Magical Boomerang in Inventory || $00=False, $01=True.
|-
|0x0676 || Magic Shield in Inventory || $00=False, $01=True.
|-
|0x067C || Maximum number of bombs || Starts out as $08.
|-
|0x067D || Number of rupees to add ||
|-
|0x067E || Number of rupees to subtract ||
|-
|0x6804 || Link's tunic color || $29 = green, $32 = blue, $16 = red
|-
|0x6B92 || Link's tunic color. Overwritten with 0x6804 when Link exits a cave or enters or exits a level
|-
|0xA014 || Name table drawing macro offset || Pointer to a macro that writes name table data to PPU memory
|-
|}
<br>


[[Category: Legend of Zelda]]
== RAM ==
RAM    Function                    Details
------- --------------------------- -----------------------
0394    Link's Sub-tile            Used for 8 pixel grid for all directions
0395    Enemy #1 Sub-tile?
0396    Enemy #2 Sub-tile?
0397    Enemy #3 Sub-tile?
0398    Enemy #4 Sub-tile?
0399    Enemy #5 Sub-tile?
039A    Enemy #6 Sub-tile?
03A8    Link's Subpixel            Used for all directions
03A9    Enemy #1 Subpixel?
03AA    Enemy #2 Subpixel?
03AB    Enemy #3 Subpixel?
03AC    Enemy #4 Subpixel?
03AD    Enemy #5 Subpixel?
03AE    Enemy #6 Subpixel?
03D0    Link's walking Animation Timer
03E4    Link's Walking Animation State
049E    Link's Current Colliding Tile ($26 is empty)
04CD    Screen options              The entry from ROM:0x18680 for the current room    Overworld: stair placement, quest secrets, Link's V placement, monster entry
0513    Candle used                Whether Link has used the candle on the current screen  $00=No, $01=Yes
0523     Randomizer
0526    Cave return screen          Overworld room to return to when exiting the underworld
052A     Enemies Killed (resets after 9)
052E    Sword disable              Red Bubble Sword Disable switch: $01 if Link's use of his sword has been disabled by a red bubble, $00 otherwise.
052F    Maze counter                Used for screens 0x61 (forest maze) and 0x1B (mountain room south of level 5)   
05F0                                Related to current frequency being played by Triangle channel 
05F1    Triangle Reverb            Reverb on/off status for Triangle on current song 
05F4    Rhythm table pointer        for current song 
0600    Song Trigger                Song ID#'s are written here to activate; value is copied over to $609 within a frame. $600 is then zeroed-out.
0602    Pulse 2 I.M. Trigger        Incidental Music ID#'s for Pulse 2 are written here; value is copied over to $607 within a frame.
    01 = Rupee Taken
    02 = Object Appears
    04 = Secret Found
    08 = Object Taken
    10 = Flute Chime
    20 = Enemy Killed
    40 = Game Over Tune
    80 = Link Death
0604    Pulse 1 I.M. Trigger        Incidental Music ID#'s for Pulse 1 are written here; value is copied over to $605 within a frame.
0605    Pulse 1 I.M. Type          $80=?, $40=1 Heart Warning, $20=Set Bomb, $10=Small Heart Pickup, $08=Key Pickup, $04=Magic Cast, $02=Boomerang Stun, $01=Arrow Deflected           
0606    Sound Effects 
0607    Pulse 2 I.M. Type          $80=Death Spiral, $40=Continue Screen, $20=Enemy Burst, $10=Whistle, $08=Bomb Pickup, $04=Secret Revealed, $02=Key Appears, $01=Rupee Pickup
0609    Songtype currently active  $80=Title, $40=Dungeon, $20=Level 9, $10=Ending, $08=Item, $04=Triforce, $02=Ganon, $01=Overworld
060A    Pulse 2 pos                Current position within Pulse 2 part (with respect to overall music program)   
060B    Pulse 1 pos                Current position within Pulse 1 part (with respect to overall music program)   
060C    Triangle pos                Current position within Triangle part (with respect to overall music program) 
060D    Noise pos                  Current position within Noise part (with respect to overall music program) 
060E    ? 
060F    Pulse 1 cycle              Current cycle duration for notes played on Pulse 1 channel  Uses value from rhythm lookup table
0610    Pulse 2 cycle              Current cycle duration for notes played on Pulse 2 channel  Uses value from rhythm lookup table
0611    Pulse 2 rhythm              Countdown from Pulse 2's current rhythm offset  Uses value from rhythm lookup table
0612    Pulse 2 countdown          volume fade 
0613    Pulse 1 rhythem            Countdown from Pulse 1's current rhythm offset  Uses value from rhythm lookup table
0614    Pulse 1 countdown          volume fade 
0615    Triangle cycle              Current cycle duration for notes played on Triangle channel    Uses value from rhythm lookup table
0616    Note countdown              Countdown from value in $615 until next note is to be played   
0617    ? 
0618    Pulse 2 I.M. offset        Offset into Pulse 2 Incidental Music data
0619    Pulse reverb                Reverb on/off status for BOTH Pulse channels on current song    $80=on, $01=off
061A    ? 
061B    Pulse 2 rhythm counter      Countup to Pulse 2 rhythm offset   
061C    Pulse 1 rhythm counter      Countup to Pulse 1 rhythm offset   
061D                                ??? (seems to count upward as $616 counts down)    Value is always [$615] - [$616] + 1.
061E    Triangle repeat counter    Number of repeats remaining if in Triangle repeat cycle   
061F    Triangle Song pos          Position within song program of current Triangle repeat coda (return point)   
0620    Screen history write index  Contains the index of the next screen history slot to write to (see below)
0621    Screen history 1            One of five recently visited map locations
0622    Screen history 2            One of five recently visited map locations
0623    Screen history 3            One of five recently visited map locations
0624    Screen history 4            One of five recently visited map locations
0625    Screen history 5            One of five recently visited map locations
0626    ? 
0627    Killed enemy count          Number of killed enemies in current screen
0628    Unused 
0629    Unused 
062A    Unused 
062B    Unused 
062C    Unused 
062D    Current quest              Save slot 1: $00=First, $01=Second
062E    Current quest              Save slot 2: $00=First, $01=Second
062F    Current quest              Save slot 3: $00=First, $01=Second
0630    Number of deaths            Save slot 1 
0631    Number of deaths            Save slot 2 
0632    Number of deaths            Save slot 3 
0633    Slot 1 Present              Save Slot 1 present (Cursor will bypass Slot 1 if set to $00)
0634    Slot 2 Present              Save Slot 2 present (Cursor will bypass Slot 2 if set to $00)
0635    Slot 3 Present              Save Slot 3 present (Cursor will bypass Slot 3 if set to $00)
0636    Register Your Name Present  Register Your Name option present (Cursor will bypass "Register Your Name" if set to $00)
0637    Elimination Mode Present    Elimination Mode option present (Cursor will bypass "Elimination Mode" if set to $00)
0638    Slot 1 Player name          Player Name for Save Slot 1 (8 bytes)
0640    Slot 2 Player name          Player Name for Save Slot 2 (8 bytes)
0648    Slot 3 Player name          Player Name for Save Slot 3 (8 bytes)
0650    Heart Cont. (File Select)  Low Nibble = how many hearts are filled. High Nybble = No. of heart containers - 1
                                    Ex: $22 = 3 Heart Containers with all 3 filled
0651    Fill hearts (File Select)  $FF = Full.
0652    Heart Cont. (File Select)  Low Nibble = how many hearts are filled. High Nybble = No. of heart containers - 1
                                    Ex: $22 = 3 Heart Containers with all 3 filled
0653    Fill hearts (File Select)  $FF = Full.
0654    Heart Cont. (File Select)  Low Nibble = how many hearts are filled. High Nybble = No. of heart containers - 1
                                    Ex: $22 = 3 Heart Containers with all 3 filled
0655    Fill hearts (File Select)  $FF = Full.
0656    Selected item pos          Cursor position for selecting Link's B item   
0657    Current sword              $00=None, $01=Sword, $02=White Sword, $03=Magical Sword
0658    Number of Bombs   
0659    Arrow status                $00=None, $01=Arrow, $02=Silver Arrow
065A    Bow in Inventory            $00=False, $01=True
065B    Status of candle            $00=None, $01=Blue Candle, $02=Red Candle
065C    Whistle in Inventory        $00=False, $01=True
065D    Food in Inventory          $00=False, $01=True
065E    Potion in Inventory        $00=None/Letter, $01=Life Potion, $02=2nd Potion
065F    Magical Rod in Inventory    $00=False, $01=True
0660    Raft in Inventory          $00=False, $01=True
0661    Magic Book in Inventory    $00=False, $01=True
0662    Ring in Inventory          $00-None, $01-Blue Ring, $02-Red Ring. Note: Changing this value will not change Link's color.
0663    Step Ladder in Inventory    $00=False, $01=True
0664    Magical Key in Inventory    $00=False, $01=True
0665    Power Bracelet in Invenotry $00=False, $01=True
0666    Letter in Inventory        $00=False, $01=True, Link can buy potions from the old woman if $02.
0667    Compass in Inventory        One bit per level
0668    Map in Inventory            One bit per level
0669    Compass in Inventory        (Level 9)
066A    Map in Inventory            (Level 9)
066C    Clock possessed            $00=False, $01=True
066D    Number of Rupees
066E    Number of Keys
066F    Heart Containers            Low Nibble = how many hearts are filled. High Nybble = Number of heart containers - 1
                                    Ex: $10 = 2 Heart Containers with none filled
0670    Partial heart              $00 = empty, $01 to $7F = half full, $80 to $FF = full.
0671    Triforce pieces            One bit per piece
0672                                ??? Related to Ganon's Triforce ???
0673                                ??? Unused ???
0674    Boomerang in Inventory      $00=False, $01=True. Note: 0x0675 overrides this variable.
0675    Magical Boomerang in Inventory 
                                    $00=False, $01=True.
0676    Magic Shield in Inventory  $00=False, $01=True.
0677-067B                          ??? Unused ???
067C    Maximum number of bombs    Starts out as $08.
067D    Number of rupees to add   
067E    Number of rupees to subtract
067F                             ?? Screen State (Bit 7 = Secret Discovered)
 
== SRAM ==
RAM    Function                    Details
------- --------------------------- -----------------------
6000     NameTable Player Name Save #1
600A     NameTable Player Name Save #2
6010     NameTable Player Name Save #3
6530     Tile Mapping Codes for Current Screen (B * 2 * 20 = 2C0 bytes)
67F0     ..??
6804     Link's tunic color          $29 = green, $32 = blue, $16 = red
6880     This is used in Game but also for SaveFunction.
6880     SaveStatePlayerOne Name??
6898     SaveStatePlayerOne Item
PRG $A6C6
LDY #$27 TableSize               
LDA $0657,Y    $067E  RAM Location     
STA ($C0),Y    $6997 SRAM Location     
DEY
PRG $A7B3 After it will be copied to beginning of SRAM
LDY #$07               
LDA ($C4),Y    $6883         
STA ($04),Y    $6005       
DEY                     
68C0     ??
6910-6A8F     End of Player one SaveTable??
6B92        Link's tunic color          Overwritten with 0x6804 when Link exits a cave or enters or exits a level
6827 -> 19D0F 134E8
 
Pointer table for Column Definitions
687E -> 8A00 2182 Screen Attributes - Table 0
68FE -> 8A80 2182 Screen Attributes - Table 1
697E -> 8B00 2182 Screen Attributes - Table 2
69FE -> 8B80 2182 Screen Attributes - Table 3
6A7E -> 8C00 2182 Screen Attributes - Table 4
6AFE -> 8C80 2182 Screen Attributes - Table 5
6BA2 -> Enemy Quantities (4 bytes)
6BA6 -> Link's Starting Vertical Position (Various Data)
6BA7 -> Stairs Positions (4 bytes)
6BAF-6BB0 -> 19331 12782
 
Offset in Cartridge RAM for Screen Status (Overworld Various Data)
6BB1 Level Number
6C90 -> 6500 790 Code
6D80 -> 65F0
6DC7 -> 6637
6E39 -> 66A9
6E6E -> 66DE
6EF9 -> 6769
6F29 -> 6799
6F73 -> 67E3
700F -> 687F
701F -> 688F 790
728E -> 6AFE 790 Code (called at 16A52)
7314 -> 6B84 790
73AA -> 6C1A 790
7613 -> 6E83 790 Table
7A4A -> 72BA 790 Enemy Damage Table
7E26 -> 7696 790
 
== WRAM ==
RAM    Function                    Details
------- --------------------------- -----------------------
6804    Link's tunic color          $29 = green, $32 = blue, $16 = red
6B92    Link's tunic color          Overwritten with 0x6804 when Link exits a cave or enters or exits a level
A014    Name table drawing macro offset   
                                    Pointer to a macro that writes name table data to PPU memory
{{Internal Data|game=The Legend of Zelda}}

Latest revision as of 19:14, 2 July 2024

Chip tiny.png The following article is a RAM map for The Legend of Zelda.

Zero Page

Address     Function                    Details
----------- --------------------------- -----------------------------------------
00          Multiple Functions          X-coords of sprite, ...     
01          Multiple Functions          Y-coords of sprite, ...     
02          Multiple Functions          Tile # for sprite (Left Half), ...  
03          Multiple Functions          Tile # for sprite (Right Half), ...     
04          Multiple Functions          Attributes for sprite (Left Half), ...  
05          Multiple Functions          Attributes for sprite (Right Half), ...     
06           ?          
07          Multiple Functions
08-0C        ?
0D          Multiple Functions          Full Hearts Damage taken, ...   
0E          Multiple Functions          Partial Heart Damage taken, ...   
0F          Multiple Functions          Link's Move Direction (01,FF), ...                                
10          Current Level               (0 = Overworld)
11           ?          
12          Game Mode                   0=Title/transitory    1=Selection Screen
                                        5=Normal              6=Preparing Scroll
                                        7=Scrolling           4=Finishing Scroll;
                                        E=Registration        F=Elimination 
13          Routine Index
14          PPU Loading Index
15          Frame counter       
16          Current save slot           $00=first, $01=second, $02=third; On selection/registration/elimination screens: $03=fourth option,  $04=fifth option
17-23       Individual Randomizer
24-27        ?
28          (X to update $00, ...)
29          Timer/Countdown          Used for dialog text and is a Countdown until Enemy #1 can do his action(See Below) again
2A          Countdown until Enemy #2 can do his main action(Shoot a Projectile,Jump,etc.)again
2B          Countdown until Enemy #3 can do his main action(See Above)again
2C          Countdown until Enemy #4 can do his main action(See Above)again
2D          Countdown until Enemy #5 can do his main action(See Above)again
2E          Countdown until Enemy #6 can do his main action(See Above)again
2F           ?
30          Countdown until Rock #1 and Zola's Fireball start to move
31          Countdown until Rock #2 and Zola's Fireball start to move
32          Countdown until Rock #3 and Zola's Fireball start to move and until Zola start his next animation
33          Countdown until Zola start his next animation
34-36        ?
37          Countdown until bait disappears (3 cycle before disappearence)
38          Countdown until bomb explode or flame (Magical Rod or Candle) disappears
39-3B        ?
3C          Countdown until Link and enemies can move again after the recorder was use
3D-4B        ?          
4C          Countdown until Link can use his sword again after touching a White Bubble  
4D-4F        ?  
50          Counts number of enemies killed without taking damage, resets to 0 once it reaches 10 ("10th enemy has the bomb" RAM address)
51-5B        ?
5C          Vertical Scrolling Offset (high byte)
5D-65        ?
66          ROM Offset for start of current Song Data (Low Byte)    
67          ROM Offset for start of current Song Data (High Byte)   
68-69        ?
6A          Pulse-2 Channel Frequency Offset    
6B          Pulse-1 Channel Frequency Offset    
6C          Offset related to Music Pointers    
6D           ?  
6E          Rhythmic Offset             For current note of Pulse 2 Incidental Music
6F          Rhythmic Countdown          For Pulse 2 incidental music (Uses value at $6E)
70          Link's X-position on the screen
71          Enemy #1 X-position          Also used for dropped enemy item
72          Enemy #2 X-position          Also used for dropped enemy item
73          Enemy #3 X-position          Also used for dropped enemy item
74          Enemy #4 X-position          Also used for dropped enemy item
75          Enemy #5 X-position          Also used for dropped enemy item
76          Enemy #6 X-position          Also used for dropped enemy item
77          Enemy #4 Projectile X-position
78          Enemy #1 Projectile X-position 
79          Enemy #2 Projectile X-position   
7A          Enemy #3 Projectile and Zola(On Some Screen) X-position
7B          Zola X position (On Some screen )
7C           ?
7D          Link's Sword X-position (As a Melee Weapon)
7E          Link's Sword X-position (As a Projectile)   
7F          Boomerang/Bait X-position   
80          Flame/Bomb #1 X-position
81          Flame/Bomb #2 X-position
82          Link's Arrow X-position     
83           ?  
84          Link's Y-position on the screen     
85          Enemy #1 Y-position          Also used for dropped enemy item
86          Enemy #2 Y-position          Also used for dropped enemy item
87          Enemy #3 Y-position          Also used for dropped enemy item
88          Enemy #4 Y-position          Also used for dropped enemy item
89          Enemy #5 Y-position          Also used for dropped enemy item
8A          Enemy #6 Y-position          Also used for dropped enemy item
8B          Enemy #4 Projectile Y-position
8C          Enemy #1 Projectile Y-position
8D          Enemy #2 Projectile Y-position
8E          Enemy #3 Projectile and Zola (On Some Screen) Y-position
8F          Zola Y-position (On Some Screen)
90           ?  
91          Link's Sword Y-position  (As a Melee Weapon)
92          Link's Sword Y-position  (As a Projectile)   
93          Boomerang/Bait Y-position   
94          Flame/Bomb #1 Y-position 
95          Flame/Bomb #2 Y-position
96          Link's Arrow Y-position     
97          Dungeon Floor Item  
98          Link's Direction             $08=North, $04=South, $01=East, $02=West
99          Enemy #1 Direction (See Above)
9A          Enemy #2 Direction (See Above)
9B          Enemy #3 Direction (See Above)
9C          Enemy #4 Direction (See Above)
9D          Enemy #5 Direction (See Above)
9E          Enemy #6 Direction (See Above)
9F          Enemy #4 Projectile Direction(See Below)
A0          Enemy #1 Projectile Direction             $08=North, $04=South, $01=East, $02=West(Diagonal direction are equal to $(Xdirection+Ydirection))
A1          Enemy #2 Projectile Direction (See Above)
A2          Enemy #3 Projectile Direction (See Above)
A3-A4        ?
A5          Link's Sword Direction (As a Melee weapon)          $08=North, $04=South, $01=East, $02=West
A6          Link's Sword Direction (As a Projectile)
A7          Boomerang Direction 
A8          Flame (Candle or Magic Rod) Direction
A9          Second Flame Direction
AA          Arrow and Magic Rod's projectile Direction $08=North, $04=South, $01=East, $02=West
AB          Type of item in screen  The value indicates item type (Bomb, Heart, Rupee, etc)
AC          Link's Animation
AD          Type of dropped enemy item #1 
AE          Type of dropped enemy item #2 
AF          Type of dropped enemy item #3 
B0          Type of dropped enemy item #4 
B1          Type of dropped enemy item #5 
B2          Type of dropped enemy item #6 
B3          State of Enemy #4 Projectile (See Below)
B4          State of Enemy #1 Projectile         $00=Not Existant, $10=In Movement, $20=Start of Blowing Animation, $28=End of Blowing Animation, $30=Being Deflected by Shield
B5          State of Enemy #2 Projectile (See Above)
B6          State of Enemy #3 Projectile (See Above)
B7          State of Enemy #? Projectile (See Above)
B8           ?
B9          Link's Sword Animation
BA          State of Link's Sword(As a Projectile) and Magic             $00=Not Existant, $10=In Movement, $11=Blowing Animation, $80=Magic Onscreen
BB          State of Bait and Link's Boomerang            $10-$17=Rotation of boomerang when going away, $24=Turnaround of Boomerang, $28=Blowing Animation of Boomerang, $50-$57=Rotation of boomerang when coming back, $80=Bait Onscreen(First cycle of 0x0037), $81=Bait Onscreen(Second cycle of 0x0037), $82 Bait Onscreen(Last cycle of 0x0037)
BC          State of Link's Bomb and Flame #1          $12=Bomb Onscreen, $13=Bomb's Smoke Onscreen, $14=Bomb's Smoke Dissappearing, $21=Flame #1 is Moving, $22=Flame #1 is static
BD          State of Link's Flame #2            $21=Flame #2 is Moving, $22=Flame #2 is static
BE          State of Link's Arrow and Magical rod animation          $00=Not Existant, $10=In Movement, $20=Start of Blowing Animation, $28=End of Blowing Animation, $31-$35=Magical Rod Animation
BF-C1        ?
C2          Dropped Enemy Item  
C3          Dropped Enemy Item  
C4-DF        ?  
E0          Game Paused?                $00=No, $01=Yes
E1          Item Menu Scrolling Animation  
E2-E7        ?          
E8          Screen Scrolling?           $00=No, $08=Northbound, $04=Southbound, $01=Eastbound, $02=Westbound
E9-EA        ?
EB          Map location                Value equals map x location + 0x10 * map y location
EC          Next Location
ED-F7        ?  
F8          Player 1 Buttons            (Last Frame)   R = 1, L = 2, D = 4, U = 8, Start = 10, Select = 20, B = 40, A = 80
F9          Player 2 Buttons            (Last Frame)   (See above)
FA          Player 1 Buttons            Pressed    $08=Up, $04=Down, $01=Right, $02=Left $80=A, $40=B, $20=Select, $10=Start 
FB          Player 2 Buttons            Pressed    (See Above)
FC          Subscreen Y-scroll position Used for storyboard text and subscreen position
FD          Subscreen X-scroll position This is always zero when not scrolling.
FE          The PPU mask value is set to the value of this address (it's always $1E during gameplay but takes on different values in screen changes of the title screen). Could have had a purpose in some stage of development to hide sprites, since it is used by the item menu and pause routine as well as the screen-transition routine (they call a routine that takes the value and AND's it with $FE, which does nothing today, but could have been set to something else back then).
FF           ?

RAM

RAM     Function                    Details
------- --------------------------- -----------------------
0394    Link's Sub-tile             Used for 8 pixel grid for all directions
0395    Enemy #1 Sub-tile?
0396    Enemy #2 Sub-tile?
0397    Enemy #3 Sub-tile?
0398    Enemy #4 Sub-tile?
0399    Enemy #5 Sub-tile?
039A    Enemy #6 Sub-tile?
03A8    Link's Subpixel             Used for all directions
03A9    Enemy #1 Subpixel?
03AA    Enemy #2 Subpixel?
03AB    Enemy #3 Subpixel?
03AC    Enemy #4 Subpixel?
03AD    Enemy #5 Subpixel?
03AE    Enemy #6 Subpixel?
03D0    Link's walking Animation Timer
03E4    Link's Walking Animation State
049E    Link's Current Colliding Tile ($26 is empty)
04CD    Screen options              The entry from ROM:0x18680 for the current room     Overworld: stair placement, quest secrets, Link's V placement, monster entry
0513    Candle used                 Whether Link has used the candle on the current screen  $00=No, $01=Yes
0523				     Randomizer
0526    Cave return screen          Overworld room to return to when exiting the underworld
052A				     Enemies Killed (resets after 9)
052E    Sword disable               Red Bubble Sword Disable switch: $01 if Link's use of his sword has been disabled by a red bubble, $00 otherwise.
052F    Maze counter                Used for screens 0x61 (forest maze) and 0x1B (mountain room south of level 5)    
05F0                                Related to current frequency being played by Triangle channel   
05F1    Triangle Reverb             Reverb on/off status for Triangle on current song   
05F4    Rhythm table pointer        for current song   
0600    Song Trigger                Song ID#'s are written here to activate; value is copied over to $609 within a frame. $600 is then zeroed-out.
0602    Pulse 2 I.M. Trigger        Incidental Music ID#'s for Pulse 2 are written here; value is copied over to $607 within a frame.
				     	01 = Rupee Taken
				     	02 = Object Appears
				     	04 = Secret Found
				     	08 = Object Taken
				     	10 = Flute Chime
				     	20 = Enemy Killed
				     	40 = Game Over Tune
				     	80 = Link Death
0604    Pulse 1 I.M. Trigger        Incidental Music ID#'s for Pulse 1 are written here; value is copied over to $605 within a frame.
0605    Pulse 1 I.M. Type           $80=?, $40=1 Heart Warning, $20=Set Bomb, $10=Small Heart Pickup, $08=Key Pickup, $04=Magic Cast, $02=Boomerang Stun, $01=Arrow Deflected            
0606    Sound Effects   
0607    Pulse 2 I.M. Type           $80=Death Spiral, $40=Continue Screen, $20=Enemy Burst, $10=Whistle, $08=Bomb Pickup, $04=Secret Revealed, $02=Key Appears, $01=Rupee Pickup
0609    Songtype currently active   $80=Title, $40=Dungeon, $20=Level 9, $10=Ending, $08=Item, $04=Triforce, $02=Ganon, $01=Overworld
060A    Pulse 2 pos                 Current position within Pulse 2 part (with respect to overall music program)    
060B    Pulse 1 pos                 Current position within Pulse 1 part (with respect to overall music program)    
060C    Triangle pos                Current position within Triangle part (with respect to overall music program)   
060D    Noise pos                   Current position within Noise part (with respect to overall music program)  
060E     ?  
060F    Pulse 1 cycle               Current cycle duration for notes played on Pulse 1 channel  Uses value from rhythm lookup table
0610    Pulse 2 cycle               Current cycle duration for notes played on Pulse 2 channel  Uses value from rhythm lookup table
0611    Pulse 2 rhythm              Countdown from Pulse 2's current rhythm offset  Uses value from rhythm lookup table
0612    Pulse 2 countdown           volume fade  
0613    Pulse 1 rhythem             Countdown from Pulse 1's current rhythm offset  Uses value from rhythm lookup table
0614    Pulse 1 countdown           volume fade  
0615    Triangle cycle              Current cycle duration for notes played on Triangle channel     Uses value from rhythm lookup table
0616    Note countdown              Countdown from value in $615 until next note is to be played    
0617     ?  
0618    Pulse 2 I.M. offset         Offset into Pulse 2 Incidental Music data 
0619    Pulse reverb                Reverb on/off status for BOTH Pulse channels on current song    $80=on, $01=off
061A     ?  
061B    Pulse 2 rhythm counter      Countup to Pulse 2 rhythm offset    
061C    Pulse 1 rhythm counter      Countup to Pulse 1 rhythm offset    
061D                                ??? (seems to count upward as $616 counts down)    Value is always [$615] - [$616] + 1.
061E    Triangle repeat counter     Number of repeats remaining if in Triangle repeat cycle     
061F    Triangle Song pos           Position within song program of current Triangle repeat coda (return point)     
0620    Screen history write index  Contains the index of the next screen history slot to write to (see below)
0621    Screen history 1            One of five recently visited map locations
0622    Screen history 2            One of five recently visited map locations
0623    Screen history 3            One of five recently visited map locations
0624    Screen history 4            One of five recently visited map locations
0625    Screen history 5            One of five recently visited map locations
0626     ?  
0627    Killed enemy count          Number of killed enemies in current screen
0628    Unused  
0629    Unused  
062A    Unused  
062B    Unused  
062C    Unused  
062D    Current quest               Save slot 1: $00=First, $01=Second
062E    Current quest               Save slot 2: $00=First, $01=Second
062F    Current quest               Save slot 3: $00=First, $01=Second
0630    Number of deaths            Save slot 1   
0631    Number of deaths            Save slot 2   
0632    Number of deaths            Save slot 3   
0633    Slot 1 Present              Save Slot 1 present (Cursor will bypass Slot 1 if set to $00)
0634    Slot 2 Present              Save Slot 2 present (Cursor will bypass Slot 2 if set to $00)
0635    Slot 3 Present              Save Slot 3 present (Cursor will bypass Slot 3 if set to $00)
0636    Register Your Name Present  Register Your Name option present (Cursor will bypass "Register Your Name" if set to $00)
0637    Elimination Mode Present    Elimination Mode option present (Cursor will bypass "Elimination Mode" if set to $00)
0638    Slot 1 Player name          Player Name for Save Slot 1 (8 bytes)
0640    Slot 2 Player name          Player Name for Save Slot 2 (8 bytes)
0648    Slot 3 Player name          Player Name for Save Slot 3 (8 bytes)
0650    Heart Cont. (File Select)   Low Nibble = how many hearts are filled. High Nybble = No. of heart containers - 1
                                    Ex: $22 = 3 Heart Containers with all 3 filled
0651    Fill hearts (File Select)   $FF = Full.
0652    Heart Cont. (File Select)   Low Nibble = how many hearts are filled. High Nybble = No. of heart containers - 1
                                    Ex: $22 = 3 Heart Containers with all 3 filled
0653    Fill hearts (File Select)   $FF = Full.
0654    Heart Cont. (File Select)   Low Nibble = how many hearts are filled. High Nybble = No. of heart containers - 1
                                    Ex: $22 = 3 Heart Containers with all 3 filled
0655    Fill hearts (File Select)   $FF = Full.
0656    Selected item pos           Cursor position for selecting Link's B item     
0657    Current sword               $00=None, $01=Sword, $02=White Sword, $03=Magical Sword
0658    Number of Bombs     
0659    Arrow status                $00=None, $01=Arrow, $02=Silver Arrow
065A    Bow in Inventory            $00=False, $01=True
065B    Status of candle            $00=None, $01=Blue Candle, $02=Red Candle
065C    Whistle in Inventory        $00=False, $01=True
065D    Food in Inventory           $00=False, $01=True
065E    Potion in Inventory         $00=None/Letter, $01=Life Potion, $02=2nd Potion
065F    Magical Rod in Inventory    $00=False, $01=True
0660    Raft in Inventory           $00=False, $01=True
0661    Magic Book in Inventory     $00=False, $01=True
0662    Ring in Inventory           $00-None, $01-Blue Ring, $02-Red Ring. Note: Changing this value will not change Link's color.
0663    Step Ladder in Inventory    $00=False, $01=True
0664    Magical Key in Inventory    $00=False, $01=True
0665    Power Bracelet in Invenotry $00=False, $01=True
0666    Letter in Inventory         $00=False, $01=True, Link can buy potions from the old woman if $02.
0667    Compass in Inventory        One bit per level
0668    Map in Inventory            One bit per level
0669    Compass in Inventory        (Level 9)
066A    Map in Inventory            (Level 9)
066C    Clock possessed             $00=False, $01=True
066D    Number of Rupees
066E    Number of Keys
066F    Heart Containers            Low Nibble = how many hearts are filled. High Nybble = Number of heart containers - 1
                                    Ex: $10 = 2 Heart Containers with none filled
0670    Partial heart               $00 = empty, $01 to $7F = half full, $80 to $FF = full.
0671    Triforce pieces             One bit per piece
0672                                ??? Related to Ganon's Triforce ???
0673                                ??? Unused ???
0674    Boomerang in Inventory      $00=False, $01=True. Note: 0x0675 overrides this variable.
0675    Magical Boomerang in Inventory  
                                    $00=False, $01=True.
0676    Magic Shield in Inventory   $00=False, $01=True.
0677-067B                           ??? Unused ???
067C    Maximum number of bombs     Starts out as $08.
067D    Number of rupees to add     
067E    Number of rupees to subtract
067F	                             ?? Screen State (Bit 7 = Secret Discovered)

SRAM

RAM     Function                    Details
------- --------------------------- -----------------------
6000				    NameTable Player Name Save #1
600A				    NameTable Player Name Save #2
6010				    NameTable Player Name Save #3
6530				    Tile Mapping Codes for Current Screen (B * 2 * 20 = 2C0 bytes)
67F0				    ..??
6804				    Link's tunic color          $29 = green, $32 = blue, $16 = red
6880				    This is used in Game but also for SaveFunction. 
6880				    SaveStatePlayerOne	Name??
6898				    SaveStatePlayerOne 	Item
						PRG $A6C6
							LDY #$27 		TableSize                
							LDA $0657,Y     $067E  RAM Location      
							STA ($C0),Y     $6997 SRAM Location      
							DEY
						PRG $A7B3 			After it will be copied to beginning of SRAM 
							LDY #$07                 
							LDA ($C4),Y    	$6883          
							STA ($04),Y     $6005         
							DEY                      
68C0				    ??							
6910-6A8F			    End of Player one SaveTable??
6B92    			    Link's tunic color          Overwritten with 0x6804 when Link exits a cave or enters or exits a level
6827	->	19D0F		134E8
Pointer table for Column Definitions
687E -> 8A00	2182		Screen Attributes - Table 0
68FE -> 8A80	2182		Screen Attributes - Table 1
697E -> 8B00	2182		Screen Attributes - Table 2
69FE -> 8B80	2182		Screen Attributes - Table 3
6A7E -> 8C00	2182		Screen Attributes - Table 4
6AFE -> 8C80	2182		Screen Attributes - Table 5
6BA2 -> Enemy Quantities (4 bytes)
6BA6 -> Link's Starting Vertical Position (Various Data)
6BA7 -> Stairs Positions (4 bytes)
6BAF-6BB0 -> 19331	12782
Offset in Cartridge RAM for Screen Status (Overworld Various Data)
6BB1		Level Number
6C90 -> 6500	790		Code
6D80 -> 65F0
6DC7 -> 6637
6E39 -> 66A9
6E6E -> 66DE
6EF9 -> 6769
6F29 -> 6799
6F73 -> 67E3
700F -> 687F
701F -> 688F	790
728E -> 6AFE	790		Code (called at 16A52)
7314 -> 6B84	790
73AA -> 6C1A	790
7613 -> 6E83	790		Table
7A4A -> 72BA	790		Enemy Damage Table
7E26 -> 7696	790

WRAM

RAM     Function                    Details
------- --------------------------- -----------------------
6804    Link's tunic color          $29 = green, $32 = blue, $16 = red
6B92    Link's tunic color          Overwritten with 0x6804 when Link exits a cave or enters or exits a level
A014    Name table drawing macro offset     
                                    Pointer to a macro that writes name table data to PPU memory