Difference between revisions of "SRAM Map"

From TLoZ: ALTTP Hacking Resources
Jump to: navigation, search
({{$|340}} to {{$|38B}} = Items & Equipment)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
== Overview ==
 
== Overview ==
  
All offsets presented here are relative to the start of each save slot. There are $500 bytes for each slot. Note that
+
All offsets presented here are relative to the start of each save slot. There are {{$|500}} bytes for each slot. Note that each slot is mirrored, at a later point in SRAM.
each slot is mirrored, at a later point in SRAM.
 
  
Slot 1: $000; Mirror: $F00
+
* Slot 1: {{$|000}}; Mirror: {{$|F00}}
Slot 2: $500; Mirror: $1400
+
* Slot 2: {{$|500}}; Mirror: {{$|1400}}
Slot 3: $A00; Mirror: $1900
+
* Slot 3: {{$|A00}}; Mirror: {{$|1900}}
  
 
Only edits to the main copy will be recognized by the game unless the main copy fails its checksum. Each copy has its own checksum.
 
Only edits to the main copy will be recognized by the game unless the main copy fails its checksum. Each copy has its own checksum.
  
Addresses $1E00-$1FFE in SRAM are not used. No not assume that the free addresses are initialized to any specific or sensible value. The values from these addresses should be treated as undefined until initialized. Address $1FFF is used by the game to store temporary data.
+
Addresses {{$|1E00}} to {{$|1FFE}} in SRAM are not used. No not assume that the free addresses are initialized to any specific or sensible value. The values from these addresses should be treated as undefined until initialized. Address {{$|1FFF}} is used by the game to store temporary data.
  
$1FFE is used as the offset to know where the memory will be stored in the SRAM (02 is the first file, 04 the second and 06 the third)
+
{{$|1FFE}} is used as the offset to know where the memory will be stored in the SRAM ({{hex|02}} is the first file, {{hex|04}} the second and {{hex|06}} the third)
  
These offsets directly correspond to $7E:F--- for a particular save file is being played. When the game is finished it writes the information into bank $70 in the corresponding slot + offsets presented here. (e.g. For the second save file, the information will be saved to $70:0500-$70:09FF, and mirrored at $70:1400-$70:18FF.)
+
These offsets directly correspond to {{$|7E:F---}} for a particular save file is being played. When the game is finished it writes the information into bank {{$|70}} in the corresponding slot + offsets presented here. (e.g. For the second save file, the information will be saved to {{$|70:0500}} to {{$|70:09FF}}, and mirrored at {{$|70:1400}} to {{$|70:18FF}}.)
  
 
== Warning ==
 
== Warning ==
Line 22: Line 21:
 
== SRAM Map ==
 
== SRAM Map ==
  
=== $000 - $24F : Data for Rooms ===
+
=== {{$|000}} to {{$|24F}} = Data for Rooms ===
  
Room Information: There are $128 (296) rooms in in the ROM. Each room has one word of information devoted to it.
+
Room Information: There are {{$|128}} (296) rooms in in the ROM. Each room has one word of information devoted to it.
  
High Byte               Low Byte
+
'''High Byte'''
d d d d b k ck cr      c c c c q q q q     
+
{{green|d d d d b}} {{yellow|k}} {{red|c}}{{yellow|k}} {{red|c}}{{blue|r}}
 
c - chest, big key chest, or big key lock. Any combination of them totalling to 6 is valid.
 
q - quadrants visited:
 
k - key or item (such as a 300 rupee gift)
 
d - door opened (either unlocked, bombed or other means)
 
r - special rupee tiles, whether they've been obtained or not.
 
b - boss battle won
 
  
qqqq corresponds to 4321, so if quadrants 4 and 1 have been "seen" by Link, then qqqq will look like 1001. The quadrants are laid out like so in each room:
+
'''Low Byte'''
 +
{{red|c c c c}} {{orange|q q q q}} 
  
---------------
 
|      |      |
 
|  4  |  3  |
 
|      |      |
 
|-------------|
 
|      |      |
 
|  2  |  1  |
 
|      |      |
 
---------------
 
  
=== $250 - $27F : Unused ===
+
* {{red|c}} - chest, big key chest, or big key lock. Any combination of them totaling to 6 is valid.
 +
* {{orange|q}} - quadrants visited:  
 +
* {{yellow|k}} - key or item (such as a 300 rupee gift)
 +
* {{green|d}} - door opened (either unlocked, bombed or other means)
 +
* {{blue|r}} - special rupee tiles, whether they've been obtained or not.
 +
* {{purple|b}} - boss battle won
  
This area is believed to have been left to store additional room information that was not included in the final game. This would bring the grand total to $140 (320) possible rooms.
+
{{orange|qqqq}} corresponds to {{hex|4321}}, so if quadrants {{hex|4}} and {{hex|1}} have been "seen" by Link, then {{orange|qqqq}} will look like {{hex|1001}}. The quadrants are laid out like so in each room:
  
 +
{|border="1" align="center" cellpadding="44" cellspacing="0" style="margin: 1 1 0em 0em; background: #f7f8ff; border: 1px #8888cc solid; border-collapse: collapse; font-size: 95%"
 +
|4 
 +
|3
 +
|-
 +
|2
 +
|1
 +
|}
 +
 +
=== {{$|250}} to {{$|27F}} = Unused ===
 +
 +
This area is believed to have been left to store additional room information that was not included in the final game. This would bring the grand total to {{$|140}} (320) possible rooms.
  
=== $280 - $2FF : Overworld Event Information ===
+
=== {{$|280}} to {{$|2FF}} = Overworld Event Information ===
  
    (one byte per area)
+
(one byte per area)
  
    ?ho???s?
+
{{hex|?}}{{yellow|h}}{{red|o}}{{hex|???}}{{orange|s}}{{hex|?}}
  
        o - If set, the area will draw its designated overlay when you enter it.  
+
* {{red|o}} - If set, the area will draw its designated overlay when you enter it. e.g. If you're triggered misery mire then the entrance shows up there the next time you enter that area. You can view overlays in the latest release of Hyrule Magic (v0.963). Other overlays include stairs leading underground, and the removal of the weather vane after it has exploded.
            e.g. If you're triggered misery mire then the entrance shows up there the next time you enter that area.
+
* {{orange|s}} - If set, the area will draw its secondary overlay when you enter it.
            You can view overlays in the latest release of Hyrule Magic (v0.963).
+
* {{yellow|h}} - If set, heart piece has been collected in this area already. Also used for a handful of other sprites.
            Other overlays include stairs leading underground, and the removal of the weathervane after it has exploded.
+
* {{hex|?}} - unknown and probably unused.
       
 
        s - If set, the area will draw its secondary overlay when you enter it.
 
       
 
        h - If set, heart piece has been collected in this area already.
 
            Also used for a handful of other sprites.
 
       
 
        ? - unknown and probably unused.
 
  
=== $300 - $33F : Unused ===
+
=== {{$|300}} to {{$|33F}} = Unused ===
  
This area is believed to have been left to store additional overworld data that was not included in the final game. This would allow for $C0 (192) overworld areas in total. Note areas $80 and $82 are used but don't save data the way the other areas do. (i.e. not here)
+
This area is believed to have been left to store additional overworld data that was not included in the final game. This would allow for {{$|C0}} (192) overworld areas in total. Note areas {{$|80}} and {{$|82}} are used but don't save data the way the other areas do. (i.e. not here)
  
=== $340 - $38B : Items & Equipment ===
+
=== {{$|340}} to {{$|38B}} = Items & Equipment ===
  
{| class="basicTable"
+
{| {{prettytable}}
!Address!!Item!!colspan="5"|Values!!style="width:15%"|Notes
+
!Address
 +
!Item
 +
!colspan="5"|Values
 +
!style="width:15%"|Notes
 
|-
 
|-
|$340||Bow||0 - Nothing||1 - Bow||2 - Bow & Arrows||3 - Silver Arrow Bow||4 - Bow & Silver Arrows||Confirmed correct 4/19/16.
+
|{{$|340}}
 +
|Bow
 +
|0 - Nothing
 +
|1 - Bow
 +
|2 - Bow & Arrows
 +
|3 - Silver Arrow Bow
 +
|4 - Bow & Silver Arrows
 +
|Confirmed correct 4/19/16.
 
|-
 
|-
|$341||Boomerang||0 - Nothing||1 - Blue Boomerang||2 - Red Boomerang
+
|{{$|341}}
 +
|Boomerang
 +
|0 - Nothing
 +
|1 - Blue Boomerang
 +
|2 - Red Boomerang
 
|-
 
|-
|$342||Hookshot||0 - Nothing||1 - Hookshot
+
|{{$|342}}
 +
|Hookshot
 +
|0 - Nothing
 +
|1 - Hookshot
 
|-
 
|-
|$343||Bombs||How many bombs you have||colspan="4" class="spacerCell"| ||Can exceed 0x32 (50), up to 0xFF (255).
+
|{{$|343}}
 +
|Bombs|
 +
|How many bombs you have
 +
|colspan="4" class="spacerCell"| 
 +
|Can exceed {{0x|32}} (50), up to {{0x|FF}} (255).
 
|-
 
|-
|$344||Magic Powder||0 - Nothing||1 - Mushroom||2 - Magic Powder
+
|{{$|344}}
 +
|Magic Powder
 +
|0 - Nothing
 +
|1 - Mushroom
 +
|2 - Magic Powder
 
|-
 
|-
|$345||Fire Rod||0 - Nothing||1 - Fire Rod
+
|{{$|345}}
 +
|Fire Rod
 +
|0 - Nothing
 +
|1 - Fire Rod
 
|-
 
|-
|$346||Ice Rod||0 - Nothing||1 - Ice Rod
+
|{{$|346}}
 +
|Ice Rod
 +
|0 - Nothing
 +
|1 - Ice Rod
 
|-
 
|-
|$347||Bombos Medallion||0 - Nothing||1 - Bombos Medallion
+
|{{$|347}}
 +
|Bombos Medallion
 +
|0 - Nothing
 +
|1 - Bombos Medallion
 
|-
 
|-
|$348||Ether Medallion||0 - Nothing||1 - Ether Medallion
+
|{{$|348}}
 +
|Ether Medallion
 +
|0 - Nothing
 +
|1 - Ether Medallion
 
|-
 
|-
|$349||Quake Medallion||0 - Nothing||1 - Quake Medallion
+
|{{$|349}}
 +
|Quake Medallion
 +
|0 - Nothing
 +
|1 - Quake Medallion
 
|-
 
|-
|$34A||Lantern||0 - Nothing||1 - Lantern
+
|{{$|34A}}
 +
|Lamp
 +
|0 - Nothing
 +
|1 - Lamp
 
|-
 
|-
|$34B||Magic Hammer||0 - Nothing||1 - Magic Hammer
+
|{{$|34B}}
 +
|Magic Hammer
 +
|0 - Nothing
 +
|1 - Magic Hammer
 
|-
 
|-
|$34C||Flute||0 - Nothing||1 - Shovel||2 - Flute||3 - Flute & Bird
+
|{{$|34C}}
 +
|Flute
 +
|0 - Nothing
 +
|1 - Shovel
 +
|2 - Flute
 +
|3 - Flute & Bird
 
|-
 
|-
|$34D||Bug Catching Net||0 - Nothing||1 - Bug Catching Net
+
|{{$|34D}}||Bug Catching Net||0 - Nothing||1 - Bug Catching Net
 
|-
 
|-
|$34E||Book of Mudora||0 - Nothing||1 - Book of Mudora
+
|{{$|34E}}||Book of Mudora||0 - Nothing||1 - Book of Mudora
 +
|-|
 +
|{{$|34F}}||Bottles||0 - Nothing||1 - Bottle 1 ({{$|7EF35C}})||2 - Bottle 2 ({{$|7EF35D}})||3 - Bottle 3 ({{$|7EF35E}})||4 - Bottle 4 ({{$|7EF35F}})
 
|-
 
|-
|$34F||Bottles||0 - Nothing||1 - Bottle 1 ($7EF35C)||2 - Bottle 2 ($7EF35D)||3 - Bottle 3 ($7EF35E)||4 - Bottle 4 ($7EF35F)
+
|{{$|350}}||Cane of Somaria||0 - Nothing||1 - Cane of Somaria
 
|-
 
|-
|$350||Cane of Somaria||0 - Nothing||1 - Cane of Somaria
+
|{{$|351}}||Cane of Byrna||0 - Nothing||1 - Cane of Byrna
 
|-
 
|-
|$351||Cane of Byrna||0 - Nothing||1 - Cane of Byrna
+
|{{$|352}}||Magic Cape||0 - Nothing||1 - Magic Cape
 
|-
 
|-
|$352||Magic Cape||0 - Nothing||1 - Magic Cape
+
|{{$|353}}||Magic Mirror||0 - Nothing||1 - Magic Scroll||2 - Magic Mirror
 
|-
 
|-
|$353||Magic Mirror||0 - Nothing||1 - Magic Scroll||2 - Magic Mirror
+
|{{$|354}}||Gloves||0 - Nothing||1 - Power Glove||2 - Titan's Mitt
 
|-
 
|-
|$354||Gloves||0 - Nothing||1 - Power Gloves||2 - Titan's Mitt
+
|{{$|355}}||Pegasus Boots||0 - Nothing||1 - Pegasus Boots||colspan="3" class="spacerCell"| ||Just having the boots isn't enough to dash. The player must have the "Run" ability flag set as well. See {{$|379}}.
 
|-
 
|-
|$355||Pegasus Boots||0 - Nothing||1 - Pegasus Boots||colspan="3" class="spacerCell"| ||Just having the boots isn't enough to dash. The player must have the "Run" ability flag set as well. See $379.
+
|{{$|356}}||Zora's Flippers||0 - Nothing||1 - Zora's Flippers||colspan="3" class="spacerCell"| ||Having this allows you to swim, but doesn't make the swim ability text show up by itself. See {{$|379}}. Unlike with the Pegasus Boots, the ability to swim is granted as long as the player has this item.
 
|-
 
|-
|$356||Zora's Flippers||0 - Nothing||1 - Zora's Flippers||colspan="3" class="spacerCell"| ||Having this allows you to swim, but doesn't make the swim ability text show up by itself. See $379. Unlike with the Pegasus Boots, the ability to swim is granted as long as the player has this item.
+
|{{$|357}}||Moon Pearl||0 - Nothing||1 - Moon Pearl
 
|-
 
|-
|$357||Moon Pearl||0 - Nothing||1 - Moon Pearl
+
|{{$|358}}||Unused (See note)||colspan="5" class="spacerCell"| ||Can be clobbered by fairy fountains.
 
|-
 
|-
|$358||Unused (See note)||colspan="5" class="spacerCell"| ||Can be clobbered by fairy fountains.
+
|{{$|359}}||Sword||0 - No sword||1 - Fighter's Sword||2 - Master Sword||3 - Tempered Sword||4 - Golden Sword||***See Side Note 2***
 
|-
 
|-
|$359||Sword||0 - No sword||1 - Fighter's Sword||2 - Master Sword||3 - Tempered Sword||4 - Golden Sword||***See Side Note 2***
+
|{{$|35A}}||Shield||0 - No shield||1 - Blue Shield||2 - Hero's Shield||3 - Mirror Shield||class="spacerCell"| ||***See Side Note 2***
 
|-
 
|-
|$35A||Shield||0 - No shield||1 - Blue Shield||2 - Hero's Shield||3 - Mirror Shield||class="spacerCell"| ||***See Side Note 2***
+
|{{$|35B}}||Armor||0 - Green Jerkin||1 - Blue Mail||2 - Red Mail||colspan="2" class="spacerCell"| ||***See Side Note 2***
 
|-
 
|-
|$35B||Armor||0 - Green Jerkin||1 - Blue Mail||2 - Red Mail||colspan="2" class="spacerCell"| ||***See Side Note 2***
+
|rowspan="2"|{{$|35C}} to {{$|35F}}||rowspan="2"|Bottle Contents||0 - No bottle||1 - Mushroom||2 - Empty bottle||3 - Red Potion||4 - Green Potion
|-
 
|rowspan="2"|$35C-F||rowspan="2"|Bottle Contents||0 - No bottle||1 - Mushroom||2 - Empty bottle||3 - Red Potion||4 - Green Potion
 
 
|-
 
|-
 
|5 - Blue Potion||6 - Fairy||7 - Bee||8 - Good Bee
 
|5 - Blue Potion||6 - Fairy||7 - Bee||8 - Good Bee
 
|-
 
|-
|$360-1||Wallet Capacity||colspan="5" class="spacerCell"| ||rowspan="2"|This number can be set above the 999 limit.
+
|{{$|360}} to {{$|361}}||Wallet Capacity||colspan="5" class="spacerCell"| ||rowspan="2"|This number can be set above the 999 limit.
 
|-
 
|-
|$362-3||Rupee Count
+
|{{$|362}} to {{$|363}}||Rupee Count
 
|}
 
|}
  
 
THE COMPASS, BIG KEY, AND DUNGEON MAP WORD LOCATIONS ARE ALL MAPPED OUT THE SAME WAY, AS YOU WILL OBSERVE.
 
THE COMPASS, BIG KEY, AND DUNGEON MAP WORD LOCATIONS ARE ALL MAPPED OUT THE SAME WAY, AS YOU WILL OBSERVE.
  
Note: The unused areas would correspond to dungeon numbers $1C and $1E in the variable $7E040C, but alas there are no dungeons
+
{{Note|The unused areas would correspond to dungeon numbers {{$|1C}} and {{$|1E}} in the variable {{$|7E040C}}, but alas there are no dungeons in the game with those values.
in the game with those values.  
 
  
If you see "(doesn't exist)" it means this feature was not used in this dungeon in the original, in case you were wondering.
+
If you see "(doesn't exist)" it means this feature was not used in this dungeon in the original, in case you were wondering.}}
  
Compass1:          $364.    bit 0: Unused
+
{|{{prettytable}}
                              bit 1: Unused
+
!Item
                              bit 2: Compass of Ganon's Tower
+
!Address
                              bit 3: Compass of Turtle Rock
+
!Bit 0
                              bit 4: Compass of Gargoyle's domain
+
!Bit 1
                              bit 5: Compass of Tower of Hera
+
!Bit 2
                              bit 6: Compass of Ice Palace
+
!Bit 3
                              bit 7: Compass of Skull Woods.  
+
!Bit 4
 +
!Bit 5
 +
!Bit 6
 +
!Bit 7
 +
|-
 +
|Compass1
 +
|{{$|364}} 
 +
|rowspan="3"|Unused
 +
|rowspan="3"|Unused
 +
|rowspan="3"|Ganon's Tower
 +
|rowspan="3"|Turtle Rock
 +
|rowspan="3"|Gargoyle's domain
 +
|rowspan="3"|Tower of Hera
 +
|rowspan="3"|Ice Palace
 +
|rowspan="3"|Skull Woods.  
 +
|-
 +
|BigKey1
 +
|{{$|366}}
 +
|-
 +
|Dungeon map1
 +
|{{$|368}}
 +
|-
 +
|Compass2
 +
|{{$|365}}
 +
|rowspan="3"|Misery Mire.
 +
|rowspan="3"|Dark Palace
 +
|rowspan="3"|Swamp Palace
 +
|rowspan="3"|Hyrule Castle 2 (doesn't exist)
 +
|rowspan="3"|Desert Palace
 +
|rowspan="3"|Eastern Palace
 +
|rowspan="3"|Hyrule Castle (doesn't exist)
 +
|rowspan="3"|Sewer Passage (doesn't exist)
 +
|-
 +
|BigKey2
 +
|{{$|367}}
 +
|-
 +
|Dungeon map2
 +
|{{$|369}}
 +
|}
  
Compass2:          $365      bit 0: Compass of Misery Mire.
+
Wishing Pond Rupee {{$|36A}}
                              bit 1: Compass of Dark Palace
+
* Number of rupees in the pond Count
                              bit 2: Compass of Swamp Palace
 
                              bit 3: Compass of Hyrule Castle 2 (doesn't exist)
 
                              bit 4: Compass of Desert Palace
 
                              bit 5: Compass of Eastern Palace
 
                              bit 6: Compass of Hyrule Castle (doesn't exist)
 
                              bit 7: Compass of Sewer Passage (doesn't exist)
 
  
BigKey1:           $366.    bit 0: Unused
+
Heart pieces collected:
                              bit 1: Unused
+
*{{$|36B}}. Number of heart pieces (out of four) you have earned
                              bit 2: Big Key of Ganon's Tower
 
                              bit 3: Big Key of Turtle Rock
 
                              bit 4: Big Key of Gargoyle's domain
 
                              bit 5: Big Key of Tower of Hera
 
                              bit 6: Big Key of Ice Palace
 
                              bit 7: Big Key of Skull Woods.
 
                       
 
BigKey2:            $367.     bit 0: Big Key of Misery Mire.
 
                              bit 1: Big Key of Dark Palace
 
                              bit 2: Big Key of Swamp Palace
 
                              bit 3: Big Key of Hyrule Castle 2 (doesn't exist)
 
                              bit 4: Big Key of Desert Palace
 
                              bit 5: Big Key of Eastern Palace
 
                              bit 6: Big Key of Hyrule Castle
 
                              bit 7: Big Key of Sewer Passage (doesn't exist)
 
  
Dungeon map1:       $368.     bit 0: Unused
+
Health: {{$|36C}}
                              bit 1: Unused
+
* Goal (capacity) Health. Each increment of {{$|08}} is worth one heart.
                              bit 2: Map of Ganon's Tower
+
* {{$|04}} is a half heart. The max is generally {{$|A0}}. The game is coded to not accept health values beyond this.
                              bit 3: Map of Turtle Rock
+
*{{$|36D}}. Actual Health. Same as above, but this reflects your current health status rather than potential.
                              bit 4: Map of Gargoyle's domain
 
                              bit 5: Map of Tower of Hera
 
                              bit 6: Map of Ice Palace
 
                              bit 7: Map of Skull Woods.  
 
  
Dungeon map2:       $369      bit 0: Map of Misery Mire
+
Magic Power: {{$|36E}}
                              bit 1: Map of Dark Palace
+
* Magic power ranges from {{$|0}} to {{$|80}} (128). Each small bottle refills {{$|10}}. Setting Magic above {{$|80}} causes the magic meter to glitch and you can't use special items.
                              bit 2: Map of Swamp Palace
 
                              bit 3: Map of Hyrule Castle 2 (doesn't exist)
 
                              bit 4: Map of Desert Palace
 
                              bit 5: Map of Eastern Palace
 
                              bit 6: Map of Hyrule Castle
 
                              bit 7: Map of Sewer Passage (doesn't exist)
 
  
Wishing Pond Rupee  $36A. Number of rupees in the pond
+
Keys: {{$|36F}}
Count
+
* Number of Keys you have in the dungeon you are currently in. You can earn keys on the overworld but they don't do anything. If you're in a non-keyed dungeon it will generally read {{$|FF}}.
  
Heart pieces
+
Bomb Upgrades: {{$|370}}
collected:         $36B. Number of heart pieces (out of four) you have earned
+
* Number of upgrades your bomb capacity has received. Behavior varies after a while. Will probably need recoding to be consistent.
  
Health:             $36C. Goal (capacity) Health. Each increment of $08 is worth one heart.
+
Arrow Upgrades: {{$|371}}
                          $04 is a half heart. The max is generally $A0.
+
* Number of upgrades your arrow capacity has received. Same as above, more or less.
                          The game is coded to not accept health values beyond this.
 
                 
 
                    $36D. Actual Health. Same as above, but this reflects
 
                          your current health status rather than potential.
 
  
Magic Power:       $36E. Magic power ranges from 0 to $80 (128). Each small bottle refills $10.
+
Hearts filler: {{$|372}}
                        Setting Magic above $80 causes the magic meter to glitch and you can't
+
* Write to this location to fill in a set number of hearts. Make sure to write in a multiple of {{$|08}} Otherwise, you will end up filling the whole life meter.
                        use special items.
 
  
Keys:               $36F. Number of Keys you have in the dungeon you are currently in.  
+
Magic filler: {{$|373}}
                        You can earn keys on the overworld but they don't do anything.
+
* Write to this location how much magic power you want filled up. The maximum effective value is {{$|80}}.
                        If you're in a non-keyed dungeon it will generally read $FF.
 
  
Bomb Upgrades:     $370. Number of upgrades your bomb capacity has received. Behavior varies after a
+
Pendants: {{$|374}}
                          while. Will probably need recoding to be consistent.
+
* Bit 0: Red/Wisdom/Hera
 +
* Bit 1: Blue/Power/Desert
 +
* Bit 2: Green/Courage/Eastern Palace
  
Arrow Upgrades:     $371. Number of upgrades your arrow capacity has received.
+
Bomb filler: {{$|375}}
                          Same as above, more or less.
+
* Write to this location to add X bombs to your arsenal. It will not exceed your maximum, as defined with {{$|370}}.
  
Hearts filler:     $372. Write to this location to fill in a set number of hearts.
+
Arrow filler: {{$|376}}
                          Make sure to write in a multiple of $08.  
+
* Write to this location to add X arrows to your arsenal. It will not exceed your maximum, as defined with {{$|371}}.
                          Otherwise, you will end up filling the whole life meter.
 
  
Magic filler:       $373. Write to this location how much magic power you want filled up. The maximum
+
Arrows: {{$|377}}
                        effective value is $80.
+
* Can exceed {{hex|70}}.
  
Pendants:           $374. Bit 0: Red/Wisdom/Hera
+
????: {{$|378}}
                          Bit 1: Blue/Power/Desert
+
* ????
                          Bit 2: Green/Courage/Eastern Palace
 
  
Bomb filler:       $375. Write to this location to add X bombs to your arsenal. It will not exceed your
+
Ability Flags: {{$|379}}
                          maximum, as defined with $370
+
* Bit 0:
 +
* Bit 1: Swim
 +
* Bit 2: Run / Dash
 +
* Bit 3: Pull
 +
* Bit 4: ----
 +
* Bit 5: Talk
 +
* Bit 6: Read
 +
* Bit 7: ----
  
Arrow filler:       $376. Write to this location to add X arrows to your arsenal. It will not exceed your
+
Crystals: {{$|37A}}
                        maximum, as defined with $371.
+
* Bit 0: Misery Mire
 +
* Bit 1: Dark Palace
 +
* Bit 2: Ice Palace
 +
* Bit 3: Turtle Rock
 +
* Bit 4: Swamp Palace
 +
* Bit 5: Gargoyle's Domain
 +
* Bit 6: Skull Woods
  
Arrows:             $377. Can exceed 70.
+
Magic usage: {{$|$37B}}
 
+
* {{$|0}}: normal consumption
????                $378. ????
+
* {{$|1}}: 1/2 consumption
 
+
* {{$|2}}: 1/4 consumption
Ability Flags:      $379. Bit 0:
 
                          Bit 1: Swim
 
                          Bit 2: Run / Dash
 
                          Bit 3: Pull
 
                          Bit 4: ----
 
                          Bit 5: Talk
 
                          Bit 6: Read
 
                          Bit 7: ----
 
 
 
Crystals:          $37A. Bit 0: Misery Mire
 
                          Bit 1: Dark Palace
 
                          Bit 2: Ice Palace
 
                          Bit 3: Turtle Rock
 
                          Bit 4: Swamp Palace
 
                          Bit 5: Gargoyle's Domain
 
                          Bit 6: Skull Woods
 
 
 
Magic usage        $37B. $0: normal consumption
 
                          $1: 1/2 consumption
 
                          $2: 1/4 consumption
 
  
 
Keys earned per dungeon:
 
Keys earned per dungeon:
                    $37C: Sewer Passage
+
* {{$|37C}} = Sewer Passage
                    $37D: Hyrule Castle
+
* {{$|37D}} = Hyrule Castle
                    $37E: Eastern Palace
+
* {{$|37E}} = Eastern Palace
                    $37F: Desert Palace
+
* {{$|37F}} = Desert Palace
                    $380: Hyrule Castle 2
+
* {{$|380}} = Hyrule Castle 2
                    $381: Swamp Palace
+
* {{$|381}} = Swamp Palace
                    $382: Dark Palace
+
* {{$|382}} = Dark Palace
                    $383: Misery Mire
+
* {{$|383}} = Misery Mire
                    $384: Skull Woods
+
* {{$|384}} = Skull Woods
                    $385: Ice Palace
+
* {{$|385}} = Ice Palace
                    $386: Tower of Hera
+
* {{$|386}} = Tower of Hera
                    $387: Gargoyle's Domain
+
* {{$|387}} = Gargoyle's Domain
                    $388: Turtle Rock
+
* {{$|388}} = Turtle Rock
                    $389: Ganon's Tower
+
* {{$|389}} = Ganon's Tower
                    $38A: ??? possibly unused. (Were they planning two extra dungeons perhaps?)
+
* {{$|38A}} = ??? possibly unused. (Were they planning two extra dungeons perhaps?)
                    $38B: ??? possibly unused.
+
* {{$|38B}} = ??? possibly unused.
  
 
== Game Event Information ==
 
== Game Event Information ==
  
Progress Indicator (value, not bitwise)
+
Progress Indicator {{$|3C5}} (value, not bitwise):
$3C5: $0: Unset, Will put Link in his bed state at the beginning of the game. (Also can't use sword or shield)
+
* {{$|0}} = Unset, Will put Link in his bed state at the beginning of the game. (Also can't use sword or shield)
      $1: You have a sword and start in the castle on start up.
+
* {{$|1}} = You have a sword and start in the castle on start up.
      $2: Indicates you have completed the first Hyrule Castle dungeon.
+
* {{$|2}} = Indicates you have completed the first Hyrule Castle dungeon.
      $3: Indicates you have beaten Agahnim and are now searching for crystals.
+
* {{$|3}} = Indicates you have beaten Agahnim and are now searching for crystals.
      $4 and above: meaningless. Though, you could write code using them to expand the event system perhaps.
+
* {{$|4}} and above = meaningless. Though, you could write code using them to expand the event system perhaps.
 
 
$3C6: Progress Flags (bitwise)
 
 
 
    0 - Set after your Uncle gives you his gear in the secret passage.
 
        Prevents him from showing up there again.
 
   
 
    1 - Indicates that you've touched the dying priest in Sanctuary.
 
   
 
    2 - Set after you bring Zelda to sanctuary?
 
   
 
    3 - Unused? (98% certainty)
 
   
 
    4 - Set after Link's Uncle leaves your house. It's used to prevent him from respawning there.
 
   
 
    5 - Set after you obtain the Book of Mudora (this is a guess)
 
   
 
    6 - Seems to be a persistent flag that toggles between two possible
 
        statements that a fortune teller can give you during your "reading".
 
        In other words, don't expect this to stay in one state if you're using
 
        fortune tellers. Has no other known purpose.
 
   
 
    7 - Unused? (98% certainty)
 
  
Map Icons Indicator 2 (value, not bitwise)
+
Progress Flags  (bitwise){{$|3C6}}:
$3C7:
+
* {{hex|0}} = Set after your Uncle gives you his gear in the secret passage. Prevents him from showing up there again.
   
+
* {{hex|1}} = Indicates that you've touched the dying priest in Sanctuary.
    0x00 - ????
+
* {{hex|2}} = Set after you bring Zelda to sanctuary?
    0x01 - ????
+
* {{hex|3}} = Unused? (98% certainty)
    0x02 - ????
+
* {{hex|4}} = Set after Link's Uncle leaves your house. It's used to prevent him from respawning there.
    0x03 - The Three Pendants
+
* {{hex|5}} = Set after you obtain the Book of Mudora (this is a guess)
    0x04 - Master Sword in Lost Woods
+
* {{hex|6}} = Seems to be a persistent flag that toggles between two possible statements that a fortune teller can give you during your "reading". In other words, don't expect this to stay in one state if you're using fortune tellers. Has no other known purpose.
    0x05 - Agahnim (skull icon at Hyrule Castle)
+
* {{hex|7}} = Unused? (98% certainty)
    0x06 - Just crystal 1 shown (Sahasrala's idea)
 
    0x07 - All crystals shown
 
    0x08 - Agahnim (skull icon at Ganon's Tower)
 
  
    All values beyond 8 are invalid, it seems.
+
Map Icons Indicator 2 (value, not bitwise) {{$|3C7}}:
 +
* {{0x|00}} = ????
 +
* {{0x|01}} = ????
 +
* {{0x|02}} = ????
 +
* {{0x|03}} = The Three Pendants
 +
* {{0x|04}} = Master Sword in Lost Woods
 +
* {{0x|05}} = Agahnim (skull icon at Hyrule Castle)
 +
* {{0x|06}} = Just crystal 1 shown (Sahasrala's idea)
 +
* {{0x|07}} = All crystals shown
 +
* {{0x|08}} = Agahnim (skull icon at Ganon's Tower)
  
Starting Entrance to use:
+
All values beyond 8 are invalid, it seems.
$3C8: Abbreviations:
 
  
    LH = Link's House;
+
Starting Entrance to use: {{$|3C8}}: Abbreviations:
    SA = Sanctuary;
+
* LH = Link's House;
    MC = Mountain Cave;
+
* SA = Sanctuary;
    PP = Pyramid of Power in DW;   
+
* MC = Mountain Cave;
 +
* PP = Pyramid of Power in DW;   
 
      
 
      
    0: Start the game in Link's house always.
+
* {{hex|0}} = Start the game in Link's house always.
    1: SA.
+
* {{hex|1}} = SA.
    2: Start in Zelda's Cell (entrance index sanc?).
+
* {{hex|2}} = Start in Zelda's Cell (entrance index sanc?).
    3: Secret passage under HC garden (near dying uncle).
+
* {{hex|3}} = Secret passage under HC garden (near dying uncle).
    5: LH or SA or MC.
+
* {{hex|5}} = LH or SA or MC.
 
          
 
          
  
Progress Indicator 3 (bitwise)
+
Progress Indicator 3 (bitwise) {{$|3C9}}:
$3C9: 0: If set, means the bum gave you his bottle already.
+
* {{hex|0}} = If set, means the bum gave you his bottle already.
      1: If set, means that the salesman in the village sold you a bottle already
+
* {{hex|1}} = If set, means that the salesman in the village sold you a bottle already
      2:
+
* {{hex|2}} =
      3: Flute Boy (DW) has been arborated
+
* {{hex|3}} = Flute Boy (DW) has been arborated
      4: Thief's Chest has been opened by the middle aged guy
+
* {{hex|4}} = Thief's Chest has been opened by the middle aged guy
      5: After you save the Smithy's partner, this bit gets set.
+
* {{hex|5}} = After you save the Smithy's partner, this bit gets set.
      6:
+
* {{hex|6}}
      7: Means Smithies have your sword. Once they give it back it's no longer set. (so nonpermanent)
+
* {{hex|7}} = Means Smithies have your sword. Once they give it back it's no longer set. (so nonpermanent)
  
Lightworld / Darkworld
+
Lightworld / Darkworld {{$|3CA}}:
$3CA: 0:
+
* {{hex|0}}
      1:
+
* {{hex|1}}
      2:
+
* {{hex|2}}
      3:
+
* {{hex|3}}
      4:
+
* {{hex|4}}
      5:
+
* {{hex|5}}
      6: If set, we're in dark world. Other wise, in light world.
+
* {{hex|6}} = If set, we're in dark world. Otherwise, in light world.
      7:
+
* {{hex|7}}
  
Unused?
+
Unused? {{$|3CB}}:
$3CB: ?????
+
* ?????
     
+
 
$3CC[0x01] - (Tagalong)  
+
{{$|3CC}}[{{0x|01}}] - (Tagalong)
   
+
* Tagalong Indicator (who is following you, if anyone?) (value based)
    Tagalong Indicator (who is following you, if anyone?) (value based)
 
   
 
    Note: Don't use a value of 0x0F or larger here, as it will likely crash
 
    the game.
 
 
      
 
      
    0x00 - Tagalong disabled
+
Note: Don't use a value of {{0x|0F}} or larger here, as it will likely crash the game.
    0x01 - Princess Zelda
 
    0x02 - ???
 
    0x03 - ???
 
    0x04 - Old Man?
 
    0x05 - Zelda (invisible) bitching at you about coming to rescue her.
 
    0x06 - Blind masquerading as a Maiden
 
    0x07 - Missing Dwarf (smithyfrog as I call him) in DW
 
    0x08 - Missing Dwarf in LW
 
    0x09 - Middle Aged Guy w/ Sign
 
    0x0A - Kiki the monkey
 
    0x0B - ???
 
    0x0C - Thief's chest
 
    0x0D - Super Bomb
 
    0x0E - Activated in reaction to acquiring the Master Sword. Used
 
          to trigger a telepathic message from Zelda indicating that Agahnim's
 
          goons have come for her at Sanctuary.
 
 
 
$03CD[0x02] -
 
 
      
 
      
    Cached Y coordinate of Tagalong after it has been lost by the player.
+
* {{0x|00}}  =  Tagalong disabled
    Applies to the old man and to the super bomb, at the very least.
+
* {{0x|01}}  =  Princess Zelda
    This is intended to be used not as a save game variable, but rather as
+
* {{0x|02}}  =  ???
    a means of picking the Tagalong back up by getting in contact with it.
+
* {{0x|03}}  =  ???
 +
* {{0x|04}}  =  Old Man?
 +
* {{0x|05}}  =  Zelda (invisible) bitching at you about coming to rescue her.
 +
* {{0x|06}}  =  Blind masquerading as a Maiden
 +
* {{0x|07}}  =  Missing Dwarf (smithyfrog as I call him) in DW
 +
* {{0x|08}}  =  Missing Dwarf in LW
 +
* {{0x|09}}  =  Middle Aged Guy w/ Sign
 +
* {{0x|0A}}  =  Kiki the monkey
 +
* {{0x|0B}}  =  ???
 +
* {{0x|0C}}  =  Thief's chest
 +
* {{0x|0D}}  =  Super Bomb
 +
* {{0x|0E}}  =  Activated in reaction to acquiring the Master Sword. Used to trigger a telepathic message from Zelda indicating that Agahnim's goons have come for her at Sanctuary.
  
 +
{{$|03CD}}[{{0x|02}}] -
 +
* Cached Y coordinate of Tagalong after it has been lost by the player. Applies to the old man and to the super bomb, at the very least. This is intended to be used not as a save game variable, but rather as a means of picking the Tagalong back up by getting in contact with it.
  
$03CF[0x02] -  
+
{{$|03CF}}[{{0x|02}}] -  
 +
* Cached X coordinate of Tagalong after it has been lost by the player. Applies to the old man and to the super bomb, at the very least. This is intended to be used not as a save game variable, but rather as a means of picking the Tagalong back up by getting in contact with it.
  
    Cached X coordinate of Tagalong after it has been lost by the player.
+
{{$|3D1}}:
    Applies to the old man and to the super bomb, at the very least.
+
* ????
    This is intended to be used not as a save game variable, but rather as
 
    a means of picking the Tagalong back up by getting in contact with it.
 
  
$3D1: ????
+
{{$|3D2}}:  
  
$3D2:  
+
{{$|3D3}}:
 +
* Set to 0 normally. Set to {{$|80}} if a Super Bomb is going off.
  
$3D3: Set to 0 normally. Set to $80 if a Super Bomb is going off.
+
{{$|3D4}} to {{$|3D8}}:
 +
* ????
  
$3D4-$3D8: ????
+
Player's Name {{$|3D9}} to {{$|3E4}}:
 
+
* See appendix for listing of character codes. Note each of the six letters is represented by a 16-bit number.
Player's Name
 
$3D9-$3E4: See appendix for listing of character codes. Note each of the six letters is represented by a 16-bit number.
 
  
 
Validity (Checksum) of the File:
 
Validity (Checksum) of the File:
$3E5-$3E6: There is a subroutine in the ROM that checks to make sure this value is 0x55AA.  
+
{{$|3E5}} to {{$|3E6}}:
            (Note the reverse byte order in the actual SRAM.)  
+
* There is a subroutine in the ROM that checks to make sure this value is {{0x|55AA}}. (Note the reverse byte order in the actual SRAM.) If you alter this your file is automatically tagged for deletion at startup. The game is designed to delete it, it's not a Super NES feature or anything. In short, Don't mess with it. Unused game slots have the value {{0x|0000}} here, and you will too if you mess with it - resulting in your save file(s) being wiped out.
            If you alter this your file is automatically tagged for deletion at startup.  
 
            The game is designed to delete it, it's not a Super NES feature or anything.  
 
            In short, Don't mess with it. Unused game slots have the value 0x0000 here,
 
            and you will too if you mess with it - resulting in your save file(s) being wiped
 
            out.
 
  
$3E7-$402 (?) Deaths totals for each dungeon. Each number is 16 bit. Thanks to Euclid for helping verify this!
+
{{$|3E7}} to {{$|402}} (?) = Deaths totals for each dungeon. Each number is 16 bit. Thanks to Euclid for helping verify this!
      $3E7: Sewers
+
* {{$|3E7}} = Sewers
      $3E9: Hyrule Castle
+
* {{$|3E9}} = Hyrule Castle
      $3EB: Eastern Palace
+
* {{$|3EB}} = Eastern Palace
      $3ED: Desert Palace
+
* {{$|3ED}} = Desert Palace
      $3EF: Hyrule Castle 2
+
* {{$|3EF}} = Hyrule Castle 2
      $3F1: Swamp Palace
+
* {{$|3F1}} = Swamp Palace
      $3F3: Dark Palace
+
* {{$|3F3}} = Dark Palace
      $3F5: Misery Mire
+
* {{$|3F5}} = Misery Mire
      $3F7: Skull Woods
+
* {{$|3F7}} = Skull Woods
      $3F9: Ice Palace
+
* {{$|3F9}} = Ice Palace
      $3FB: Tower of Hera
+
* {{$|3FB}} = Tower of Hera
      $3FD: Gargoyle's Domain
+
* {{$|3FD}} = Gargoyle's Domain
      $3FF: Turtle Rock
+
* {{$|3FF}} = Turtle Rock
      $401: Ganon's Tower
+
* {{$|401}} = Ganon's Tower
  
Life/Save Counter:  
+
Life/Save Counter: {{$|403}} to {{$|404}}
$403-4. Counts the number of times your saved or died in the game, before you beat it.
+
* Counts the number of times your saved or died in the game, before you beat it.
  
PostGame Death Counter:  
+
PostGame Death Counter: {{$|405}} to {{$|406}}
$405-6. When you start the game this is written to with the value -1 (0xFFFF). On the game select
+
* When you start the game this is written to with the value -1 ({{0x|FFFF}}). On the game select screen, it will only display a number if this is not {{0x|FFFF}}. The max displayable number is 999.
screen, it will only display a number if this is not 0xFFFF. The max displayable number is 999.
 
 
When you beat the game, the number of times you died gets recorded here.
 
When you beat the game, the number of times you died gets recorded here.
  
Presumed to be unused
+
Presumed to be unused: {{$|407}} to {{$|4FD}}
$407-$4FD: ????
+
* ????
  
Inverse Checksum: $4FE-F. If you add numbers to the file, you need to subtract from this location. See Side Note 3 for more information.
+
Inverse Checksum: {{$|4FE}} to {{$|4FF}}
 +
* If you add numbers to the file, you need to subtract from this location. See Side Note 3 for more information.
  
 
===============================================================================================
 
===============================================================================================
Line 470: Line 476:
 
Appendix:
 
Appendix:
  
Side Note 2: Items other than the standard equipment can be equipped. For instance, it's possible
+
{{note|Items other than the standard equipment can be equipped. For instance, it's possible
 
to equip the compass as a sword. By some miracle, the items you end up with often work the same
 
to equip the compass as a sword. By some miracle, the items you end up with often work the same
 
way as their appropriate counterparts. Sometimes they are far superior to the normal items, and
 
way as their appropriate counterparts. Sometimes they are far superior to the normal items, and
 
sometimes they just suck. At least one item makes your armor invincible! Just experiment a little.
 
sometimes they just suck. At least one item makes your armor invincible! Just experiment a little.
Beware, the palletes will not be standard.
+
Beware, the palettes will not be standard.}}
  
Side Note 3: A tutorial on inverse checksums. Let's say I add to location $3EE. Now E = 14 in the
+
{{note|A tutorial on inverse checksums. Let's say I add to location {{$|3EE}}. Now E <nowiki>=</nowiki> 14 in the decimal system. (Note we are looking at the last digit. "E" that is.) Therefore {{$|3EE}} is even.
decimal system. (Note we are looking at the last digit. "E" that is.) Therefore $3EE is even.  
 
  
If I add a value to a memory location with an even address,
+
If I add a value to a memory location with an even address, I must subtract from the even address of the inverse checksum. Example: Suppose I add {{$|4}} to {{$|305}}. {{$|305}} is odd, so I SUBTRACT {{$|4}} from the odd checksum byte: {{$|4FF}}. If I subtracted from {{$|305}}, I must add to {{$|4FF}}. This maintains the "balance" of the file and keeps it from being erased.
I must subtract from the even address of the inverse checksum. Example: Suppose I add $4 to $305.
 
$305 is odd, so I SUBTRACT $4 from the odd checksum byte: $4FF. If I subtracted from $305, I must
 
add to $4FF. This maintains the "balance" of the file and keeps it from being erased.
 
  
Now this will work for slight changes in the checksum, but it takes a bit of insight to recognize
+
Now this will work for slight changes in the checksum, but it takes a bit of insight to recognize that the checksum is really a 16-bit number, not just two 8-bit numbers functioning separately.}}
that the checksum is really a 16-bit number, not just two 8-bit numbers functioning separately.
 
  
 
(edit later)
 
(edit later)
Line 578: Line 579:
  
 
Special characters (not normally accessible. This is by far an incomplete listing)
 
Special characters (not normally accessible. This is by far an incomplete listing)
 +
{|{{prettytable}}
 +
|-
 +
|{{$|A0}}
 +
|small right Arrow
 +
|-
 +
|{{$|A1}}
 +
|"'" (apostrophe)
 +
|-
 +
|{{$|A2}}
 +
|HPiece Again
 +
|-
 +
|{{$|A3}}
 +
|"empty right hand heart cont."
 +
|-
 +
|{{$|A4}}
 +
|see
 +
|-
 +
|{{$|A7}}
 +
|-
 +
|{{$|A5}}
 +
|Same As
 +
|-
 +
|{{$|A7}}
 +
|-
 +
|{{$|A6}}
 +
|"Quarter Heart piece, top right corner."
 +
|-
 +
|{{$|A7}}
 +
|"Heart piece,left half"
 +
|-
 +
|{{$|A8}}
 +
|"Heart piece, right half"
 +
|-
 +
|{{$|A9}}
 +
|blank
 +
|-
 +
|{{$|AA}}
 +
|"left Arrow"
 +
|}
  
<pre>
 
A0 = small right Arrow
 
A1 = "'" (apostrophe)
 
A2 = HPiece Again
 
A3 = "empty right hand heart cont."
 
A4 = see
 
A7
 
A5 = Same
 
As
 
A7
 
A6 = "Quarter Heart piece, top right corner."
 
A7 = "Heart piece,left half"
 
A8 = "Heart piece, right half"
 
A9 = blank
 
AA = "left Arrow"
 
  
SNES Button Alphabet:  
+
SNES Button Alphabet:
AB = A  
+
{|{{prettytable}}
AC = B  
+
|-
AD = X  
+
|{{$|AB}}
AE = Y
+
|A  
AF = I
+
|-
B1 = blank^
+
|{{$|AC}}
</pre>
+
|B  
 +
|-
 +
|{{$|AD}}
 +
|X  
 +
|-
 +
|{{$|AE}}
 +
|Y
 +
|-
 +
|{{$|AF}}
 +
|I
 +
|-
 +
|{{$|B1}}
 +
|blank^
 +
|}
  
^This code is not the canon encoding of this character. ex. AF is the proper "I". 08 is not.
+
^This code is not the canon encoding of this character. ex. {{hex|AF}} is the proper "I". 08 is not.
  
 
{{toc}}
 
{{toc}}

Latest revision as of 06:26, 10 December 2017

Overview

All offsets presented here are relative to the start of each save slot. There are $500 bytes for each slot. Note that each slot is mirrored, at a later point in SRAM.

  • Slot 1: $000; Mirror: $F00
  • Slot 2: $500; Mirror: $1400
  • Slot 3: $A00; Mirror: $1900

Only edits to the main copy will be recognized by the game unless the main copy fails its checksum. Each copy has its own checksum.

Addresses $1E00 to $1FFE in SRAM are not used. No not assume that the free addresses are initialized to any specific or sensible value. The values from these addresses should be treated as undefined until initialized. Address $1FFF is used by the game to store temporary data.

$1FFE is used as the offset to know where the memory will be stored in the SRAM (02 is the first file, 04 the second and 06 the third)

These offsets directly correspond to $7E:F--- for a particular save file is being played. When the game is finished it writes the information into bank $70 in the corresponding slot + offsets presented here. (e.g. For the second save file, the information will be saved to $70:0500 to $70:09FF, and mirrored at $70:1400 to $70:18FF.)

Warning

The SRAM save loading routing relies upon an inverse checksum. Additions to any byte in the .srm file, must be subtracted from that save game's checksum to maintain integrity. Failure to observe this precaution will cause the game to attempt to load the mirror copy. Should the mirror copy also fail the checksum verification, the save slot will be cleared.

SRAM Map

$000 to $24F = Data for Rooms

Room Information: There are $128 (296) rooms in in the ROM. Each room has one word of information devoted to it.

High Byte d d d d b k ck cr

Low Byte c c c c q q q q


  • c - chest, big key chest, or big key lock. Any combination of them totaling to 6 is valid.
  • q - quadrants visited:
  • k - key or item (such as a 300 rupee gift)
  • d - door opened (either unlocked, bombed or other means)
  • r - special rupee tiles, whether they've been obtained or not.
  • b - boss battle won

qqqq corresponds to 4321, so if quadrants 4 and 1 have been "seen" by Link, then qqqq will look like 1001. The quadrants are laid out like so in each room:

4 3
2 1

$250 to $27F = Unused

This area is believed to have been left to store additional room information that was not included in the final game. This would bring the grand total to $140 (320) possible rooms.

$280 to $2FF = Overworld Event Information

(one byte per area)

?ho???s?

  • o - If set, the area will draw its designated overlay when you enter it. e.g. If you're triggered misery mire then the entrance shows up there the next time you enter that area. You can view overlays in the latest release of Hyrule Magic (v0.963). Other overlays include stairs leading underground, and the removal of the weather vane after it has exploded.
  • s - If set, the area will draw its secondary overlay when you enter it.
  • h - If set, heart piece has been collected in this area already. Also used for a handful of other sprites.
  • ? - unknown and probably unused.

$300 to $33F = Unused

This area is believed to have been left to store additional overworld data that was not included in the final game. This would allow for $C0 (192) overworld areas in total. Note areas $80 and $82 are used but don't save data the way the other areas do. (i.e. not here)

$340 to $38B = Items & Equipment

Address Item Values Notes
$340 Bow 0 - Nothing 1 - Bow 2 - Bow & Arrows 3 - Silver Arrow Bow 4 - Bow & Silver Arrows Confirmed correct 4/19/16.
$341 Boomerang 0 - Nothing 1 - Blue Boomerang 2 - Red Boomerang
$342 Hookshot 0 - Nothing 1 - Hookshot
$343 How many bombs you have   Can exceed 0x32 (50), up to 0xFF (255).
$344 Magic Powder 0 - Nothing 1 - Mushroom 2 - Magic Powder
$345 Fire Rod 0 - Nothing 1 - Fire Rod
$346 Ice Rod 0 - Nothing 1 - Ice Rod
$347 Bombos Medallion 0 - Nothing 1 - Bombos Medallion
$348 Ether Medallion 0 - Nothing 1 - Ether Medallion
$349 Quake Medallion 0 - Nothing 1 - Quake Medallion
$34A Lamp 0 - Nothing 1 - Lamp
$34B Magic Hammer 0 - Nothing 1 - Magic Hammer
$34C Flute 0 - Nothing 1 - Shovel 2 - Flute 3 - Flute & Bird
$34D Bug Catching Net 0 - Nothing 1 - Bug Catching Net
$34E Book of Mudora 0 - Nothing 1 - Book of Mudora
$34F Bottles 0 - Nothing 1 - Bottle 1 ($7EF35C) 2 - Bottle 2 ($7EF35D) 3 - Bottle 3 ($7EF35E) 4 - Bottle 4 ($7EF35F)
$350 Cane of Somaria 0 - Nothing 1 - Cane of Somaria
$351 Cane of Byrna 0 - Nothing 1 - Cane of Byrna
$352 Magic Cape 0 - Nothing 1 - Magic Cape
$353 Magic Mirror 0 - Nothing 1 - Magic Scroll 2 - Magic Mirror
$354 Gloves 0 - Nothing 1 - Power Glove 2 - Titan's Mitt
$355 Pegasus Boots 0 - Nothing 1 - Pegasus Boots   Just having the boots isn't enough to dash. The player must have the "Run" ability flag set as well. See $379.
$356 Zora's Flippers 0 - Nothing 1 - Zora's Flippers   Having this allows you to swim, but doesn't make the swim ability text show up by itself. See $379. Unlike with the Pegasus Boots, the ability to swim is granted as long as the player has this item.
$357 Moon Pearl 0 - Nothing 1 - Moon Pearl
$358 Unused (See note)   Can be clobbered by fairy fountains.
$359 Sword 0 - No sword 1 - Fighter's Sword 2 - Master Sword 3 - Tempered Sword 4 - Golden Sword ***See Side Note 2***
$35A Shield 0 - No shield 1 - Blue Shield 2 - Hero's Shield 3 - Mirror Shield   ***See Side Note 2***
$35B Armor 0 - Green Jerkin 1 - Blue Mail 2 - Red Mail   ***See Side Note 2***
$35C to $35F Bottle Contents 0 - No bottle 1 - Mushroom 2 - Empty bottle 3 - Red Potion 4 - Green Potion
5 - Blue Potion 6 - Fairy 7 - Bee 8 - Good Bee
$360 to $361 Wallet Capacity   This number can be set above the 999 limit.
$362 to $363 Rupee Count

THE COMPASS, BIG KEY, AND DUNGEON MAP WORD LOCATIONS ARE ALL MAPPED OUT THE SAME WAY, AS YOU WILL OBSERVE.


Item Address Bit 0 Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bit 7
Compass1 $364 Unused Unused Ganon's Tower Turtle Rock Gargoyle's domain Tower of Hera Ice Palace Skull Woods.
BigKey1 $366
Dungeon map1 $368
Compass2 $365 Misery Mire. Dark Palace Swamp Palace Hyrule Castle 2 (doesn't exist) Desert Palace Eastern Palace Hyrule Castle (doesn't exist) Sewer Passage (doesn't exist)
BigKey2 $367
Dungeon map2 $369

Wishing Pond Rupee $36A

  • Number of rupees in the pond Count

Heart pieces collected:

  • $36B. Number of heart pieces (out of four) you have earned

Health: $36C

  • Goal (capacity) Health. Each increment of $08 is worth one heart.
  • $04 is a half heart. The max is generally $A0. The game is coded to not accept health values beyond this.
  • $36D. Actual Health. Same as above, but this reflects your current health status rather than potential.

Magic Power: $36E

  • Magic power ranges from $0 to $80 (128). Each small bottle refills $10. Setting Magic above $80 causes the magic meter to glitch and you can't use special items.

Keys: $36F

  • Number of Keys you have in the dungeon you are currently in. You can earn keys on the overworld but they don't do anything. If you're in a non-keyed dungeon it will generally read $FF.

Bomb Upgrades: $370

  • Number of upgrades your bomb capacity has received. Behavior varies after a while. Will probably need recoding to be consistent.

Arrow Upgrades: $371

  • Number of upgrades your arrow capacity has received. Same as above, more or less.

Hearts filler: $372

  • Write to this location to fill in a set number of hearts. Make sure to write in a multiple of $08 Otherwise, you will end up filling the whole life meter.

Magic filler: $373

  • Write to this location how much magic power you want filled up. The maximum effective value is $80.

Pendants: $374

  • Bit 0: Red/Wisdom/Hera
  • Bit 1: Blue/Power/Desert
  • Bit 2: Green/Courage/Eastern Palace

Bomb filler: $375

  • Write to this location to add X bombs to your arsenal. It will not exceed your maximum, as defined with $370.

Arrow filler: $376

  • Write to this location to add X arrows to your arsenal. It will not exceed your maximum, as defined with $371.

Arrows: $377

  • Can exceed 70.

????: $378

  •  ????

Ability Flags: $379

  • Bit 0:
  • Bit 1: Swim
  • Bit 2: Run / Dash
  • Bit 3: Pull
  • Bit 4: ----
  • Bit 5: Talk
  • Bit 6: Read
  • Bit 7: ----

Crystals: $37A

  • Bit 0: Misery Mire
  • Bit 1: Dark Palace
  • Bit 2: Ice Palace
  • Bit 3: Turtle Rock
  • Bit 4: Swamp Palace
  • Bit 5: Gargoyle's Domain
  • Bit 6: Skull Woods

Magic usage: $$37B

  • $0: normal consumption
  • $1: 1/2 consumption
  • $2: 1/4 consumption

Keys earned per dungeon:

  • $37C = Sewer Passage
  • $37D = Hyrule Castle
  • $37E = Eastern Palace
  • $37F = Desert Palace
  • $380 = Hyrule Castle 2
  • $381 = Swamp Palace
  • $382 = Dark Palace
  • $383 = Misery Mire
  • $384 = Skull Woods
  • $385 = Ice Palace
  • $386 = Tower of Hera
  • $387 = Gargoyle's Domain
  • $388 = Turtle Rock
  • $389 = Ganon's Tower
  • $38A = ??? possibly unused. (Were they planning two extra dungeons perhaps?)
  • $38B = ??? possibly unused.

Game Event Information

Progress Indicator $3C5 (value, not bitwise):

  • $0 = Unset, Will put Link in his bed state at the beginning of the game. (Also can't use sword or shield)
  • $1 = You have a sword and start in the castle on start up.
  • $2 = Indicates you have completed the first Hyrule Castle dungeon.
  • $3 = Indicates you have beaten Agahnim and are now searching for crystals.
  • $4 and above = meaningless. Though, you could write code using them to expand the event system perhaps.

Progress Flags (bitwise)$3C6:

  • 0 = Set after your Uncle gives you his gear in the secret passage. Prevents him from showing up there again.
  • 1 = Indicates that you've touched the dying priest in Sanctuary.
  • 2 = Set after you bring Zelda to sanctuary?
  • 3 = Unused? (98% certainty)
  • 4 = Set after Link's Uncle leaves your house. It's used to prevent him from respawning there.
  • 5 = Set after you obtain the Book of Mudora (this is a guess)
  • 6 = Seems to be a persistent flag that toggles between two possible statements that a fortune teller can give you during your "reading". In other words, don't expect this to stay in one state if you're using fortune tellers. Has no other known purpose.
  • 7 = Unused? (98% certainty)

Map Icons Indicator 2 (value, not bitwise) $3C7:

  • 0x00 = ????
  • 0x01 = ????
  • 0x02 = ????
  • 0x03 = The Three Pendants
  • 0x04 = Master Sword in Lost Woods
  • 0x05 = Agahnim (skull icon at Hyrule Castle)
  • 0x06 = Just crystal 1 shown (Sahasrala's idea)
  • 0x07 = All crystals shown
  • 0x08 = Agahnim (skull icon at Ganon's Tower)

All values beyond 8 are invalid, it seems.

Starting Entrance to use: $3C8: Abbreviations:

  • LH = Link's House;
  • SA = Sanctuary;
  • MC = Mountain Cave;
  • PP = Pyramid of Power in DW;
  • 0 = Start the game in Link's house always.
  • 1 = SA.
  • 2 = Start in Zelda's Cell (entrance index sanc?).
  • 3 = Secret passage under HC garden (near dying uncle).
  • 5 = LH or SA or MC.


Progress Indicator 3 (bitwise) $3C9:

  • 0 = If set, means the bum gave you his bottle already.
  • 1 = If set, means that the salesman in the village sold you a bottle already
  • 2 =
  • 3 = Flute Boy (DW) has been arborated
  • 4 = Thief's Chest has been opened by the middle aged guy
  • 5 = After you save the Smithy's partner, this bit gets set.
  • 6
  • 7 = Means Smithies have your sword. Once they give it back it's no longer set. (so nonpermanent)

Lightworld / Darkworld $3CA:

  • 0
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6 = If set, we're in dark world. Otherwise, in light world.
  • 7

Unused? $3CB:

  •  ?????

$3CC[0x01] - (Tagalong)

  • Tagalong Indicator (who is following you, if anyone?) (value based)

Note: Don't use a value of 0x0F or larger here, as it will likely crash the game.

  • 0x00 = Tagalong disabled
  • 0x01 = Princess Zelda
  • 0x02 =  ???
  • 0x03 =  ???
  • 0x04 = Old Man?
  • 0x05 = Zelda (invisible) bitching at you about coming to rescue her.
  • 0x06 = Blind masquerading as a Maiden
  • 0x07 = Missing Dwarf (smithyfrog as I call him) in DW
  • 0x08 = Missing Dwarf in LW
  • 0x09 = Middle Aged Guy w/ Sign
  • 0x0A = Kiki the monkey
  • 0x0B =  ???
  • 0x0C = Thief's chest
  • 0x0D = Super Bomb
  • 0x0E = Activated in reaction to acquiring the Master Sword. Used to trigger a telepathic message from Zelda indicating that Agahnim's goons have come for her at Sanctuary.

$03CD[0x02] -

  • Cached Y coordinate of Tagalong after it has been lost by the player. Applies to the old man and to the super bomb, at the very least. This is intended to be used not as a save game variable, but rather as a means of picking the Tagalong back up by getting in contact with it.

$03CF[0x02] -

  • Cached X coordinate of Tagalong after it has been lost by the player. Applies to the old man and to the super bomb, at the very least. This is intended to be used not as a save game variable, but rather as a means of picking the Tagalong back up by getting in contact with it.

$3D1:

  •  ????

$3D2:

$3D3:

  • Set to 0 normally. Set to $80 if a Super Bomb is going off.

$3D4 to $3D8:

  •  ????

Player's Name $3D9 to $3E4:

  • See appendix for listing of character codes. Note each of the six letters is represented by a 16-bit number.

Validity (Checksum) of the File: $3E5 to $3E6:

  • There is a subroutine in the ROM that checks to make sure this value is 0x55AA. (Note the reverse byte order in the actual SRAM.) If you alter this your file is automatically tagged for deletion at startup. The game is designed to delete it, it's not a Super NES feature or anything. In short, Don't mess with it. Unused game slots have the value 0x0000 here, and you will too if you mess with it - resulting in your save file(s) being wiped out.

$3E7 to $402 (?) = Deaths totals for each dungeon. Each number is 16 bit. Thanks to Euclid for helping verify this!

  • $3E7 = Sewers
  • $3E9 = Hyrule Castle
  • $3EB = Eastern Palace
  • $3ED = Desert Palace
  • $3EF = Hyrule Castle 2
  • $3F1 = Swamp Palace
  • $3F3 = Dark Palace
  • $3F5 = Misery Mire
  • $3F7 = Skull Woods
  • $3F9 = Ice Palace
  • $3FB = Tower of Hera
  • $3FD = Gargoyle's Domain
  • $3FF = Turtle Rock
  • $401 = Ganon's Tower

Life/Save Counter: $403 to $404

  • Counts the number of times your saved or died in the game, before you beat it.

PostGame Death Counter: $405 to $406

  • When you start the game this is written to with the value -1 (0xFFFF). On the game select screen, it will only display a number if this is not 0xFFFF. The max displayable number is 999.

When you beat the game, the number of times you died gets recorded here.

Presumed to be unused: $407 to $4FD

  •  ????

Inverse Checksum: $4FE to $4FF

  • If you add numbers to the file, you need to subtract from this location. See Side Note 3 for more information.
===================================================================================

Appendix:



(edit later)


Character Codes:

Alpha-numeric

00 = A
01 = B
02 = C
03 = D
04 = E
05 = F
06 = G
07 = H
08 = I^
09 = J
0A = K
0B = L
0C = M
0D = N
OE = O
OF = P
10 = ??
20 = Q
21 = R
22 = S
23 = T
24 = U
25 = V
26 = W
27 = X
28 = Y
29 = Z
2A = a
2B = b
2C = c
2D = d
2E = e
2F = f
40 = g
41 = h
42 = k
43 = j
44 = i
45 = l
46 = m
47 = n
48 = o
49 = p
4A = q
4B = r
4C = s
4D = t
4E = u
4F = v
60 = w
61 = x
62 = y
63 = z
64 = 0
65 = 1
66 = 2
67 = 3
68 = 4
69 = 5
6A = 6
6B = 7
6C = 8
6D = 9
6E = "?"
6F = "!"
80 = " = "
81 = "."
82 = ","

85 = "("
86 = ")"

Special characters (not normally accessible. This is by far an incomplete listing)

$A0 small right Arrow
$A1 "'" (apostrophe)
$A2 HPiece Again
$A3 "empty right hand heart cont."
$A4 see
$A7
$A5 Same As
$A7
$A6 "Quarter Heart piece, top right corner."
$A7 "Heart piece,left half"
$A8 "Heart piece, right half"
$A9 blank
$AA "left Arrow"


SNES Button Alphabet:

$AB A
$AC B
$AD X
$AE Y
$AF I
$B1 blank^

^This code is not the canon encoding of this character. ex. AF is the proper "I". 08 is not.

Navigate

Table of Contents
SpritesDungeonsOverworldUnderworldSRAM MapRAM MapROM MapMusicMonologueCreditsDumpsMiscellaneousTo-Do/Suggestions