The Legend of Zelda/RAM map: Difference between revisions

From Data Crystal
Jump to navigation Jump to search
(Added ~thirty more Zero-Page Definitions)
(Added memory addresses obtained from observation / disassembly)
Line 36: Line 36:
|0x000F || ? ||
|0x000F || ? ||
|-
|-
|0x0010 || ? ||
|0x0010 || Current Level Index||  
|-
|-
|0x0011 || ? ||
|0x0011 || ? ||
|-
|-
|0x0012 || ? ||
|0x0012 || Scroll status || 5=Normal  6=Preparing Scroll  7=Scrolling  4=Finishing Scroll
|-
|-
|0x0013 || ? ||
|0x0013 || ? ||
Line 258: Line 258:
|0x007E || Link's Sword X-position ||
|0x007E || Link's Sword X-position ||
|-
|-
|0x007F || ? ||
|0x007F || Bait X-position ||
|-
|-
|0x0080 || ? ||
|0x0080 || ? ||
Line 298: Line 298:
|0x0092 || Link's Sword Y-position ||
|0x0092 || Link's Sword Y-position ||
|-
|-
|0x0093 || ? ||
|0x0093 || Bait Y Position ||
|-
|-
|0x0094 || ? ||
|0x0094 || ? ||
Line 346: Line 346:
|0x00AA || ? ||
|0x00AA || ? ||
|-
|-
|0x00AB || ? ||
|0x00AB || Index of item in screen || The value indicates item type (bomb, heart, rupee, etc)
|-
|-
|0x00AC || ? ||
|0x00AC || ? ||
Line 474: Line 474:
|0x00EA || ? ||
|0x00EA || ? ||
|-
|-
|0x00EB || ? ||
|0x00EB || Current map location || Value equals map x location + 0x10 * map y location
|-
|-
|0x00EC || ? ||
|0x00EC || ? ||
Line 500: Line 500:
|0x00F7 || ? ||
|0x00F7 || ? ||
|-
|-
|0x00F8 || Related to 0x00FA?
|0x00F8 || Player 1 Buttons (Last Frame) || R = 1, L = 2, D = 4, U = 8, Start = 10, Select = 20, B = 40, A = 80
|-
|-
|0x00F9 || ? ||
|0x00F9 || Player 2 Buttons (Last Frame) || (See above)
|-
|-
|0x00FA || Controller Buttons Pressed || $00=No, $08=Up, $04=Down, $01=Right, $02=Left $80=A, $40=B, $20=Select, $10=Start (these can be combined) ||
|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 || ? ||
|0x00FB || Player 2 Buttons Pressed || (See above)
|-
|-
|0x00FC || Related to Scrolling Story Sequence ||
|0x00FC || Subscreen Y-scroll position || Used for storyboard text and subscreen position
|-
|-
|0x00FD || ? ||
|0x00FD || Subscreen X-scroll position || This is always zero when not scrolling.
|-
|-
|0x00FE || ? ||
|0x00FE || ? ||
Line 523: Line 523:
|-
|-
|0x052E || Red Bubble Sword Disable switch || $01 if Link's use of his sword has been disabled by a red bubble, $00 otherwise.
|0x052E || Red Bubble Sword Disable switch || $01 if Link's use of his sword has been disabled by a red bubble, $00 otherwise.
|-
|0x0620 || Screen history write index || Contains the index of the next screen history slot to write to (see below)
|-
|0x0621 || Screen history 1 || One of five recently visited map locations
|-
|0x0622 || Screen history 2 || One of five recently visited map locations
|-
|0x0623 || Screen history 3 || One of five recently visited map locations
|-
|0x0624 || Screen history 4 || One of five recently visited map locations
|-
|0x0625 || Screen history 5 || One of five recently visited map locations
|-
|0x0627 || Killed enemy count || Number of killed enemies in current screen
|-
|-
|0x062D || Current quest for first save slot || $00=First, $01=Second
|0x062D || Current quest for first save slot || $00=First, $01=Second
Line 600: Line 614:
|-
|-
|0x6B92 || Link's tunic color. This value is overwritten with 0x6804 when Link exits a cave or enters or exits a level
|0x6B92 || Link's tunic color. This value is 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>
<br>
{{stub}}
{{stub}}

Revision as of 22:24, 3 March 2009

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


Zero Page Function Details
0x0000 ?
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
0x0072 Enemy #2's X-position
0x0073 Enemy #3's X-position
0x0074 Enemy #4's X-position
0x0075 Enemy #5's X-position
0x0076 ?
0x0077 ?
0x0078 ?
0x0079 Projectile X-position
0x007A Projectile X-position
0x007B Projectile #1's X-position
0x007C ?
0x007D ?
0x007E Link's Sword X-position
0x007F Bait X-position
0x0080 ?
0x0081 ?
0x0082 ?
0x0083 ?
0x0084 Link's Y-position on the screen
0x0085 Enemy #1's Y-position
0x0086 Enemy #2's Y-position
0x0087 Enemy #3's Y-position
0x0088 Enemy #4's Y-position
0x0089 Enemy #5's Y-position
0x008A ?
0x008B ?
0x008C ?
0x008D Projectile Y-position
0x008E Projectile Y-position
0x008F Projectile #1's Y-position
0x0090 ?
0x0091 ?
0x0092 Link's Sword Y-position
0x0093 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 Index of item in screen The value indicates item type (bomb, heart, rupee, etc)
0x00AC ?
0x00AD ?
0x00AE ?
0x00AF ?
0x00B0 ?
0x00B1 ?
0x00B2 ?
0x00B3 ?
0x00B4 ?
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 ?


RAM Function Details
0x052E Red Bubble Sword Disable switch $01 if Link's use of his sword has been disabled by a red bubble, $00 otherwise.
0x0620 Screen history write index Contains the index of the next screen history slot to write to (see below)
0x0621 Screen history 1 One of five recently visited map locations
0x0622 Screen history 2 One of five recently visited map locations
0x0623 Screen history 3 One of five recently visited map locations
0x0624 Screen history 4 One of five recently visited map locations
0x0625 Screen history 5 One of five recently visited map locations
0x0627 Killed enemy count Number of killed enemies in current screen
0x062D Current quest for first save slot $00=First, $01=Second
0x062E Current quest for second save slot $00=First, $01=Second
0x062F Current quest for third save slot $00=First, $01=Second
0x0656 Cursor position for selecting Link's B item
0x0657 Current sword $00=None, $01=Sword, $02=White Sword, $03=Magical Sword
0x0658 Number of Bombs
0x0659 Arrow status $00=None, $01=Arrow, $02=Silver Arrow
0x065A Bow in Inventory $00=False, $01=True
0x065B Status of candle 00=None, $01=Blue Candle, $02=Red Candle
0x065C Whistle in Inventory $00=False, $01=True
0x065D Food in Inventory $00=False, $01=True
0x065E Potion in Inventory $00=None/Letter, $01=Life Potion, $02=2nd Potion
0x065F Magical Rod in Inventory $00=False, $01=True
0x0660 Raft in Inventory $00=False, $01=True
0x0661 Magic Book in Inventory $00=False, $01=True
0x0662 Ring in Inventory $00-None, $01-Blue Ring, $02-Red Ring. Note: Changing this value will not change Link's color.
0x0663 Step Ladder in Inventory $00=False, $01=True
0x0664 Magical Key in Inventory $00=False, $01=True
0x0665 Power Bracelet in Invenotry $00=False, $01=True
0x0666 Letter in Inventory $00=False, $01=True, Link can buy potions from the old woman if $02.
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.
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.
0x0669 Level 9 Compass possessed $00=False, $01=True
0x066A Level 9 Map possessed $00=False, $01=True
0x066C Clock possessed $00=False, $01=True
0x066D Number of Rupees
0x066E Number of Keys
0x066F Heart Containers Low Nibble = how many hearts are filled. High Nybble = Number of heart containers - 1
Ex: $10 = 2 Heart Containers with none filled
0x0670 The heart following the last filled heart $00 = empty, $01 to $7F = half full, $80 to $FF = full.
0x0671 Triforce pieces When value is converted to binary, a $01 represents having the piece and a $00 represents not having it.

See this image for a visualization.

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. This value is 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


So very stubbly.
This page is rather stubbly and could use some expansion.
Are you a bad enough dude to rescue this article?