Difference between revisions of "Zelda II: The Adventure of Link:ROM map"

From Data Crystal
Jump to: navigation, search
(minor change)
(Sound Data: Added music routine entry points. This is useful for hacks that would wish to replace the entire music engine.)
 
(98 intermediate revisions by 27 users not shown)
Line 1: Line 1:
<div id="catlinks">[[Image:Chip_tiny.png]]The following article is a [[ROM map]] for [[Zelda II: The Adventure of Link]].</div>
+
{{rommap|game=Zelda II: The Adventure of Link}}
{{clear}}
 
<includeonly>[[Category:Zelda II: The Adventure of Link]][[Category:Zelda II: The Adventure of Link|ROM map]]</includeonly>
 
  
0x001669 - Experience for Attack to level 2 (add 255)
+
==Other Documentation==
 +
* [[Zelda II: The Adventure of Link:Character Data|Character Data]]
 +
* [[Zelda II: The Adventure of Link:Enemy Data|Enemy Data]]
  
0x001681 - Experience for Attack to level 2 (000-255)
+
==Main Menu==
 +
17339 - Y position for cursor on Save Slot 1
 +
17351 - Y position for cursor on Save Slot 2
 +
17369 - Y position for cursor on Save Slot 3
 +
1737F - Y position for cursor on Register Your Name
 +
17391 - Y position for cursor on Elimation Mode
 +
17395 - X position for cursor
  
0x00166A - Experience for Attack to level 3 (add 255)
+
==Beginning Values==
 +
17AF7 - Begin with Shield Magic
 +
17AF8 - Begin with Jump Magic
 +
17AF9 - Begin with Life Magic
 +
17AFA - Begin with Fairy Magic
 +
17AFB - Begin with Fire Magic
 +
17AFC - Begin with Reflect Magic
 +
17AFD - Begin with Spell Magic
 +
17AFE - Begin with Thunder Magic
 +
17AFF - Number of Magic Containers to begin game
 +
17B00 - Number of Heart Containers to begin game
 +
17B01 - Begin with Candle
 +
17B02 - Begin with Power Glove
 +
17B03 - Begin with Raft
 +
17B04 - Begin with Boots
 +
17B05 - Begin with Flute
 +
17B06 - Begin with Cross
 +
17B07 - Begin with Hammer
 +
17B08 - Begin with Magic Key
 +
17B10 - Number of Crystals to begin game
 +
17B12 - Techs (Downward Thrust 10) (Upward Thrust 04) (Both 14)
 +
17B1D - 0x017B24 - Letter Values when blanking a name out
 +
17B25 - 0x017C04 - Bit defaults for sprites (keys, items, etc.)
 +
1C369 - Number of lives to begin game
  
0x001682 - Experience for Attack to level 3 (000-255)
+
==Magic Spell Effect Pointers==
 +
from    to
 +
----    ----
 +
00E58 - 00E59 - Shield
 +
00E5A - 00E5B - Jump
 +
00E5C - 00E5D - Life
 +
00E5E - 00E5F - Fairy
 +
00E60 - 00E61 - Fire
 +
00E62 - 00E63 - Reflect
 +
00E64 - 00E65 - Spell
 +
00E66 - 00E67 - Thunder
  
0x00166B - Experience for Attack to level 4 (add 255)
+
It's possible to alter the order in which Link "learns" magic spells by re-arranging the data from [$E58-$E67]. (For example, to make Thunder the first spell Link acquires, replace the data at [$E58-$E59] with that from [$E66-$E67]. Note, however, that the spell will still be under the first slot and named "Shield.")  
  
0x001683 - Experience for Attack to level 4 (000-255)
+
==Sound Data==
 +
18000  Music Engine Entry Point, Title Screen (Replace with 'RTS' to disable the music engine)
 +
19000  Music Engine Entry Point, Rest of the Game (Replace with 'RTS' to disable the music engine)
 +
1A01A  Overworld music string
 +
1A027  Battleground music string
 +
1A02C  "Got a Heart/Item/Etc." music string
  
0x00166C - Experience for Attack to level 5 (add 255)
+
==PPU Data==
  
0x001684 - Experience for Attack to level 5 (000-255)
+
===Overworld===
 +
from    to
 +
----    ----
 +
007B3 - 007B6 - PPU data for Towns
 +
007B7 - 007BA - PPU data for Caves
 +
007BB - 007BE - PPU data for Palaces
 +
007BF - 007C2 - PPU data for Bridges
 +
007C3 - 007C6 - PPU data for Desert
 +
007C7 - 007CA - PPU data for Grass Areas
 +
007CB - 007CE - PPU data for Forests
 +
007CF - 007D2 - PPU data for Swamps
 +
007D3 - 007D6 - PPU data for Graveyards
 +
007D7 - 007DA - PPU data for Trails
 +
007DB - 007DE - PPU data for Lava Areas
 +
007DF - 007E2 - PPU data for Mountains
 +
007E3 - 007E6 - PPU data for Water
 +
007E7 - 007EA - PPU data for Walkable Water
 +
007EB - 007EE - PPU data for Rocks/Roadblocks
 +
007EF - 007F2 - PPU data for River Devil
  
0x00166D - Experience for Attack to level 6 (add 255)
+
===Western Hyrule===
 +
044EB - 044EE - PPU data for Grass on Battlefield
  
0x001685 - Experience for Attack to level 6 (000-255)
+
===Eastern Hyrule===
 +
from    to
 +
----    ----
 +
084DF - 084E2 - PPU data for Leaves of Trees on Battlefield
 +
084E3 - 084E6 - PPU data for Hanging Leaves on Battlefield
 +
084EB - 084EE - PPU data for Grass on Battlefield
  
0x00166E - Experience for Attack to level 7 (add 255)
+
===Towns===
 +
from    to
 +
----    ----
 +
0C3F6 - 0C3F9 - PPU data for Top of Exterior Windows
 +
0C3FA - 0C3FD - PPU data for Bottom of Exterior Windows
 +
0C44E - 0C451 - PPU data for left side of Clouds
 +
0C452 - 0C455 - PPU data for right side of Larger Clouds
 +
0C456 - 0C459 - PPU data for right side of Smaller Clouds
 +
0C45A - 0C45D - PPU data for angle of tunnel right
 +
0C45E - 0C461 - PPU data for tunnel wall right
 +
0C4E2 - 0C4E5 - PPU data for floors inside buildings
 +
0C6B2 - 0C6B5 - PPU data for Sky
 +
0C6BA - 0C6BD - PPU data for background of Basements
 +
0C6C6 - 0C6C9 - PPU data for Bushs
 +
0C6FE - 0C701 - PPU data for Ground
 +
0C706 - 0C709 - PPU data for Walls in Basements
  
0x001686 - Experience for Attack to level 7 (000-255)
+
==Palace Data==
 +
from    to
 +
----    ----
 +
10480 - 104DF - Palettes for Outside the 6 Palaces
 +
13F10 - 13F6F - Palettes for the 6 Palaces Interiors
 +
1C46B - 1C47A - Palette for Overworld
 +
1C47B - 1C48A - Sprite pallet set for Overworld
  
0x00166F - Experience for Attack to level 8 (add 255)
+
===Graphics Set===
 +
1CD3A - Graphics Set for Palace 1
 +
1CD3B - Graphics Set for Palace 2
 +
1CD3C - Graphics Set for Palace 3
 +
1CD3E - Graphics Set for Palace 4
 +
1CD42 - Graphics Set for Palace 5
 +
1CD43 - Graphics Set for Palace 6
 +
1CD44 - Graphics Set for Great Palace
  
0x001687 - Experience for Attack to level 8 (000-255)
+
===Palette Pointers===
 +
1CD45 - Palette Pointer for Palace 1
 +
1CD46 - Palette Pointer for Palace 2
 +
1CD47 - Palette Pointer for Palace 3
 +
1CD49 - Palette Pointer for Palace 4
 +
1CD4D - Palette Pointer for Palace 5
 +
1CD4E - Palette Pointer for Palace 6
 +
1CD4F - Palette Pointer for Great Palace
  
0x001670 - Experience for extra life (add 255)
+
== Overworld ==
  
0x001688 - Experience for extra life (000-255)
+
=== Overworld Map Data ===
  
0x001671 - Experience for Magic to level 2 (add 255)
+
506C - 538C - West Hyrule
 +
665C - 6942 - Death Mountain
 +
9056 - 936F - East Hyrule
 +
A65C - A942 - Maze Island
  
0x001689 - Experience for Magic to level 2 (000-255)
+
The 4 Overworld maps are 64 tiles wide, and their respective heights are variable. Overworld data is encoded in an RLE (Run Length Encoding) format. Each byte codes for a horizontal strip of terrain, as follows:
  
0x001672 - Experience for Magic to level 3 (add 255)
+
xxxx .... - Length (add 1)
 +
.... xxxx - Type
  
0x00168A - Experience for Magic to level 3 (000-255)
+
Table of Tile Types:
  
0x001673 - Experience for Magic to level 4 (add 255)
+
0    Town
 +
1    Cave
 +
2    Palace
 +
3    Bridge
 +
4   Desert
 +
5    Grass
 +
6    Forest
 +
7    Swamp
 +
8    Graveyard
 +
9    Road
 +
A    Lava
 +
B    Mountain
 +
C    Water
 +
D    Water (walkable)
 +
E    Rock
 +
F    Spider
  
0x00168B - Experience for Magic to level 4 (000-255)
 
  
0x001674 - Experience for Magic to level 5 (add 255)
+
Data Structure Example from West Hyrule (first four bytes starting at 0x506C):
  
0x00168C - Experience for Magic to level 5 (000-255)
+
<pre>BB DC 74 FC ...</pre>
  
0x001675 - Experience for Magic to level 6 (add 255)
+
* BB - 12 (B + 1) Mountain (B) Tiles
 +
[[File:Zelda2-WestHyruleByte1.png]]
  
0x00168D - Experience for Magic to level 6 (000-255)
+
* DC - 14 (D + 1) Water (C) Tiles
 +
[[File:Zelda2-WestHyruleByte2.png]]
  
0x001676 - Experience for Magic to level 7 (add 255)
+
* 74 - 8 (7 + 1) Desert (4) Tiles
 +
[[File:Zelda2-WesthyruleByte3.png]]
  
0x00168E - Experience for Magic to level 7 (000-255)
+
* FC - 16 (F + 1) Water (C) Tiles
 +
[[File:Zelda2-WestHyruleByte4.png]]
  
0x001677 - Experience for Magic to level 8 (add 255)
+
* BB DC 74 FC
 +
[[File:Zelda2-WestHyrule4Bytes.png]]
  
0x00168F - Experience for Magic to level 8 (000-255)
+
=== Overworld in RAM ===
  
0x001678 - Experience for extra life (add 255)
+
The compressed Overworld map is copied to Cartridge RAM to allow the game to modify the map. Data is stored between 0x7C00 and 0x7FFF.
  
0x001690 - Experience for extra life (000-255)
+
=== Palace Pointers ===
  
0x001679 - Experience for Life to level 2 (add 255)
+
These control which byte in Cartridge RAM gets turned into a single rock (0B) after completing a palace.
 +
Data is Cartridge RAM pointers, the base is 0x7C00, and the offset is how many bytes into the compressed map.
  
0x001691 - Experience for Life to level 2 (000-255)
+
West Hyrule / Death Mountain
 +
 +
479F - Palace 1
 +
47A1 - Palace 2
 +
47A3 - Palace 3
 +
47A5 - Palace 4 (in Death Mountain)
 +
 +
East Hyrule / Maze Island
 +
 +
879F - Palace 5
 +
87A1 - Palace 6
 +
87A5 - Invalid pointer
 +
87A7 - Palace 4 (in Maze Island)
  
0x00167A - Experience for Life to level 3 (add 255)
+
=== Overworld Areas ===
  
0x001692 - Experience for Life to level 3 (000-255)
+
Each area has 4 bytes that define various informations, like position on the Overworld, destination map number, destination world number, where Link starts in the side view mode, etc. Each byte is formatted as follows:
  
0x00167B - Experience for Life to level 4 (add 255)
+
<pre>Byte 0
  
0x001693 - Experience for Life to level 4 (000-255)
+
.xxx xxxx - Y position
 +
x... .... - External to this world
  
0x00167C - Experience for Life to level 5 (add 255)
+
Byte 1 (offset 3F bytes from Byte 0)
  
0x001694 - Experience for Life to level 5 (000-255)
+
..xx xxxx - X position
 +
xx.. .... - On exit, appear at the location of area index minus this value (0-3)
  
0x00167D - Experience for Life to level 6 (add 255)
+
Byte 2 (offset 7E bytes from Byte 0)
  
0x001695 - Experience for Life to level 6 (000-255)
+
..xx xxxx - Map number
 +
xx.. .... - Horizontal position to enter within map
 +
    0 = enter from the left
 +
    1 = enter at x=256 or from the right for 2 screens maps
 +
    2 = enter at x=512 or from the right for 3 screens maps
 +
    3 = enter from the right for 4 screens maps
  
0x00167E - Experience for Life to level 7 (add 255)
+
Byte 3 (offset BD bytes from Byte 0)
  
0x001696 - Experience for Life to level 7 (000-255)
+
...x xxxx - World number
 +
..x. .... - Forced enter from the right edge of screen
 +
.x.. .... - Pass through
 +
x... .... - Fall in hole
 +
</pre>
  
0x00167F - Experience for Life to level 8 (add 255)
+
====West Hyrule====
 +
from  to
 +
----  ----
 +
462F - 466D - Areas Y position
 +
466E - 46AC - Areas X position
 +
46AD - 46EB - Areas map number
 +
46EC - 472A - Areas world number
  
0x001697 - Experience for Life to level 8 (000-255)
+
====Death Mountain====
  
0x001680 - Experience for extra life (add 255)
+
from  to
 +
----  --
 +
610C - 614A - Areas Y position
 +
614B - 6189 - Areas X position
 +
618A - 61C8 - Areas map number
 +
61C9 - 6207 - Areas world number
  
0x001698 - Experience for extra life (000-255)
+
====East Hyrule====
  
 +
from  to
 +
----  --
 +
862F - 866D - Areas Y position
 +
866E - 86AC - Areas X position
 +
86AD - 86EB - Areas map number
 +
86EC - 8727 - Areas world number
  
 +
====Maze Island====
  
0x004C4C - 0x004C67 - Grass Area level data
+
from  to
 +
----  --
 +
A10C - A14A - Areas Y position
 +
A14B - A189 - Areas X position
 +
A18A - A1C8 - Areas map number
 +
A1C9 - A207 - Areas world number
  
0x004C64 - 0x004C78 - Forest Area level data
+
[[Zelda_II:_The_Adventure_of_Link:List_of_areas|Click here]] for an extensive list of all areas with descriptions.
  
 +
==Level Data==
  
 +
04C4C - 04C67 - Grass Area level data
 +
04C64 - 04C78 - Forest Area level data
 +
04C8C - 04CA6 - 50 point bag level data
  
0x004C8C - 0x004CA6 - 50 point bag level data
+
=Unsorted Information=
  
  
 +
18027 - 1811E - Note Tables
 +
1E8B0        - Number of enemies to defeat for exp. bag or magic jar
 +
1E910        - Type of vulnarablity Bit (red) has
 +
1E911        - Type of vulnarability Bot (blue) has
  
0x011435 - HP for Bots inside Temple
+
==Dwedit's documents (unsorted)==
  
0x011437 - HP for Magic Stealing Skulls
+
I just made a full document of what I know about Zelda 2's side-view areas, and copy-pasted it into datacrystal, I figure someone else can sort it out later. Haven't tested or verified it yet, so there may be a few mistakes. I just went by my level editor.
  
 +
<pre>Zelda 2 sideview information
  
 +
Address convention:
 +
I don't want to bother explaining NES memory pointers.
 +
I'll be using addresses as they reside in NES memory.  $8000-$BFFF is where data rom banks are mapped in NES memory.
 +
When I say $XXXX in rom bank Y, that means a file address of ($XXXX-$8000) + Y*$4000, + $10.  So a NES memory address $8123 on bank 4 means a .nes file address of $10133.
  
0x01D4B0 - Number of experience to lose from certain enemies
+
Sometimes pointers point to areas other than $8000-$BFFF, such as the SRAM area $6000-$7FFF.
  
 +
--------------
 +
Rom or Ram?
 +
--------------
 +
This game was originally an FDS game, so it relies on lots of data being writable.
  
 +
Enemies are stored in SRAM starting at $7000
 +
Compressed overworld maps are stored in SRAM starting at $7C00.
  
Enemies that give no experience
+
--------------
 +
Number of Maps
 +
--------------
 +
Each area has 63 maps, 0-62, map #63 is an invalid map number indicating that the destination is outside.
  
0x01DD5C - Show  no  experience points (part 1)
+
---------
 +
Rom Banks
 +
---------
 +
A "Rom Bank" is 16k (4000) bytes long.
 +
Each rom bank has two sets of 63 maps, except for 3 and 5, which only have one set.
  
0x01DD6C - Show  no  experience points (part 2)
+
bank 1 contains west hyrule/death mountain
 +
bank 2 contains east hyrule/maze island
 +
bank 3 contains towns
 +
bank 4 contains palaces 1,2,5, then palaces 3,4,6.
 +
bank 5 contains the great palace
  
 +
----------------------------
 +
Map and Enemy Pointer Tables
 +
----------------------------
 +
Map pointers point to ROM in the $8000-$BFFF range.
 +
Enemy pointers point to SRAM in the $7000-$7xxx range, this is so the game can keep track of defeated enemies.
  
 +
Information for the second set of maps/enemies comes $1ADD later.
  
Enemies that give 2 experience
+
Enemy data for all 126 maps is copied from $88A0 to $7000.  (length unknown?)
  
0x01DD5D - Show  no  experience points (part 1)
+
For the first set of 63 maps:
 +
$8523 - map pointers
 +
$85A1 - enemy pointers
  
0x01DD6D - Show "2" experience points (part 2)
+
For the second set of 63 maps:
 +
$A000 - map pointers
 +
$A07E - enemy pointers
  
 +
For the "behind this map" maps (1-7) specified by header byte 3 (there is no back map #0):
 +
$8000 - map pointers
  
  
Enemies that give 3 experience
+
----------------------
 +
Room connectivity data
 +
----------------------
 +
Begins at $871B, 4 bytes per entry
 +
Begins at $A1F8 for second set of 63 maps
  
0x01DD5E - Show  no  experience points (part 1)
+
xxxxxx.. = Destination map number (63 to go outside)
 +
......xx = Starting X coordinate on destination (times 256)
  
0x01DD6E - Show "3" experience points (part 2)
+
Order of bytes:
 +
Left exit
 +
Down exit
 +
Up exit
 +
Right exit
  
 +
===================
 +
Sideview Map Format
 +
===================
 +
----------------------
 +
First 4 bytes (header)
 +
----------------------
  
 +
Things may vary, most of this info applies to overworld sideview maps, some may not apply for towns and palaces, some numbers may be different for those.
  
Enemies that give 5 experience
+
0 - Size of level in bytes, including header
 +
1 - Flags
 +
x....... - Which Object Set - This determines which objects can appear on this map!
 +
.xx..... - Width of level (in screens, add 1)
 +
...x.... - ?
 +
....x... - "Grass", when set, adds grass tiles to map row #9
 +
.....x.. - "bushes", when set, adds bushes tiles to map row #10
 +
......xx - ?
 +
2 - Ground Graphics / initial floor/ceiling position
 +
The levels are made up of objects, and ground tiles.  This byte selects initial floor/ceiling position, and set of ground tiles to be used by the level.
 +
x....... - "no ceiling",  top 2 rows of the map are set to background tile, this overrides all
 +
.xxx.... - Sets which set of tiles assigned to the Ground tiles
 +
0 = cave
 +
1 = forest
 +
2 = lava/death water
 +
3 = swamp
 +
4 = sand/grass
 +
5 = volcano (cave with brighter wall)
 +
6 = North Castle
 +
7 = Cave with clear wall (rocks outside)
 +
....xxxx - Initial position of floor/ceiling
 +
0-7 = Floor at 2-9 (from bottom), Ceiling at 1 from top
 +
8-14 = Ceiling at 2-8 (from top)
 +
15 = Filled in with wall tile
 +
3 - Palette and back tiles byte
 +
xx...... - Palette for sprites
 +
0 = black borders
 +
1 = dark colored borders
 +
2,3 = not used by game, give weird colors
 +
..xxx... - Background Palette
 +
0 = north castle
 +
1 = cave palette (dark without candle for overworld maps)
 +
2 = desert
 +
3 = grass
 +
4 = forest
 +
5 = swamp
 +
6 = graveyard
 +
7 = "water" palette
 +
.....xxx - Map to load behind map
 +
0 = nothing
 +
1 = clouds
 +
2 = forest (3 wide)
 +
3 = forest (4 wide)
 +
4 = forest (single tree)
 +
5 = Dead-end caves
 +
6 = long cave, dead end
 +
7 = ???
 +
------------
 +
Level bytes:
 +
------------
  
0x01DD5F - Show  no  experience points (part 1)
+
0 -  
 +
xxxx.... - Y position
 +
....xxxx - Advance cursor X this many tiles after the object ("X space")
 +
1 -
 +
xxxxxxxx - Object number
 +
If Object number = 15, and Y position < 13, then this is a 3 byte object (collectable item)
 +
2 - (3 byte objects only)
 +
xxxxxxxx - For 3 byte objects only, object number (0-21, 22+ are not used)
 +
  
0x01DD6F - Show "5" experience points (part 2)
+
Special Y posisitons:
 +
13 - Set new ground
 +
Sets the floor and ceiling to new values, just like header byte 2
 +
x....... - "no ceiling",  top 2 rows of the map are set to background tile
 +
.xxx.... - Not used, you can't change tiles for ground
 +
....xxxx - New position of floor/ceiling
 +
0-7 = Floor at 2-9 (from bottom), Ceiling at 1 from top
 +
8-14 = Ceiling at 2-8 (from top)
 +
15 = Filled in with wall tile
 +
14 - "Skip"
 +
Sets the cursor X directly to "x space" * 16.  Does not advance the cursor after this object as normal.
 +
15 - Extra objects, including lava and cactuses.  These have fixed-y coordinates.
  
  
 +
-----------
 +
Map Objects
 +
-----------
 +
This part really could be done much better, instead of hard-specifying everything, see how the game handles them, see what tiles it selects, see how it assembles the structures, etc.
  
Enemies that give 10 experience
 
  
0x01DD60 - Show no experience points (part 1)
+
Objects: (For Overworld sideview maps)
 +
00001111 - 3 byte object (collectable)
 +
0000xxxx - 16 different small objects
 +
xxxx.... - Object type
 +
....xxxx - Size of object (1-16)
 +
Small objects:
 +
00 = headstone
 +
01 = cross
 +
02 = angled cross
 +
03 = tree stump
 +
04 = stone table, ("stonehenge")
 +
05 = locked door (always at Y position 8)
 +
06 = sleeping princess Zelda
 +
07 = sleeping princess Zelda
 +
08 = Pit (extends to ground?)
 +
09-0E = Cloud
 +
0F = crash
 +
Big objects for Object set 0
 +
0x = small objects
 +
1x = crash
 +
2x = forest ceiling, two high
 +
3x = forest ceiling, two high
 +
4x = curtains, two high
 +
5x = forest ceiling, one high
 +
6x = sword-destroyable blocks, one high
 +
7x = horizontal pit, one high
 +
8x = single weed, one high
 +
9x = two weeds, one high
 +
Ax = north castle steps (background), one high
 +
Bx = background bricks, used in north castle and ruins, one high
 +
Cx = strip of volcano background, one high
 +
Dx = sword-destroyable blocks, one wide
 +
Ex = background tree trunk, one wide
 +
Fx = column, one wide
 +
Big objects for Object set 1
 +
0x = small objects
 +
1x = crash
 +
2x = wide rock floor, two high
 +
3x = wide rock ceiling, two high
 +
4x = bridge, two high
 +
5x = cave blocks, one high
 +
6x = sword-destroyable blocks, one high
 +
7x = bridge that falls apart, one high
 +
8x = single weed, one high
 +
9x = two weeds, one high
 +
Ax = horizontal pit, one high
 +
Bx = background bricks, used in north castle and ruins, one high
 +
Cx = strip of volcano background, one high
 +
Dx = sword-destroyable blocks, one wide
 +
Ex = tall rock floor, one wide
 +
Fx = stone spire
 +
Extra objects (Y position 15):
 +
0x = crash
 +
1x = crash
 +
2x = Lava at bottom of screen, three high
 +
3x = Cactus at Y position 9, grows upwards, one wide
 +
4x = Cactus with stem at Y position 9, one wide, two high
 +
5x = Elevator?
 +
60-FF = crash
  
0x01DD70 - Show "10" experience points (part 2)
+
Objects: (for towns)
 +
Small Objects:
 +
00 = closed door with grass at bottom, 4 high 1 wide
 +
01 = open door with grass at bottom
 +
02 = open door with bricks at bottom
 +
03 = open door with vertical bricks at bottom
 +
04 = stonehenge
 +
05 = chair
 +
06 = ?
 +
07 = cloud
 +
08 = table
 +
09 = bench
 +
0A = cross
 +
0B-0E = cloud
 +
0F = crash
 +
Big objects for Object Set 0
 +
0x = small objects
 +
1x = crash
 +
2x = cross hatched roof, two high
 +
3x = gray vertical brick roof, two high
 +
4x = green vertical brick roof, two high
 +
5x = brick building, extends to ground
 +
6x = white small brick building, extends to ground
 +
7x = grass building, extends to ground
 +
8x = white brick wall, extends to ground
 +
9x = log building, extends to ground
 +
Ax = brown square windows, one wide, Two tall. One tile Gap between windows.  Repeats vertically
 +
Bx = gray windows, round on top...
 +
Cx = brown windows, round on top
 +
Dx = Underground blue bricks, two high
 +
Ex = Column
 +
Fx = castle background bricks
 +
Effects of Object Set 1 unknown
 +
Extra Objects (Y position 15)
 +
00 = Door to left
 +
01 = Door to right
 +
02 = Wall to left
 +
03 = wall to right
 +
04 = fireplace
 +
05 = fountain
 +
06 = sign
 +
07 = headstone one above ground
 +
08-0F = ?
 +
1x = single bush
 +
2x = background wall at Y pos 4, 3 wide, x tall
 +
3x = ?
 +
4x = ?
 +
5x = ?
 +
6x = bridge
 +
7x = water/lava
 +
80-FF = ?
  
 +
Objects: (for Palaces)
 +
Small Objects
 +
00 = Window
 +
01 = Rightward unicorn head
 +
02 = leftward wolf head
 +
03,04 = crystal return statue
 +
05,06 = locked door
 +
07 = cloud
 +
08 = small cloud
 +
09 = ironknuckle statue
 +
0A-0E = small cloud
 +
0F = crash
 +
Large Objects (set 0)
 +
0x = small objects
 +
1x = Horizontal Pit, one high
 +
2x = horizontal bricks, one high
 +
3x = breakable blocks, one high
 +
4x = steel blocks, one high
 +
5x = breaking bridge, one high
 +
6x = breakable blocks, one high
 +
7x = horizontal bricks, two high
 +
8x = curtains, two high
 +
9x = breakable blocks, two high
 +
Ax = walk-thru bricks, two high
 +
Bx = breakable blocks, one wide
 +
Cx = Column, one wide
 +
Dx = Bridge, two high
 +
Ex = Pit, one wide
 +
Fx = Horizontal Pit, extends to bottom of screen
 +
Extra Objects
 +
1x = Lava
  
 +
Objects: (for Great Palace)
 +
Great palace contains tiles for the "north castle" used in ending
 +
Same as above, except:
 +
09 = Zelda
 +
0A = Ironknuckle Statue
 +
1x = Canopy (for final boss room)
 +
5x = North Castle bricks
 +
6x = North Castle Steps
 +
7x = breakable bridge
 +
8x = bridge, two high
 +
9x = bricks, two high
 +
Ax = curtains, two high
 +
Bx = Walk-thru bricks, two high
 +
Cx = breakable blocks, two high
 +
Dx = breakable blocks, one wide
 +
Ex = electric barrier
 +
Fx = column
  
Enemies that give 20 experience
+
============
 +
Enemy Format
 +
============
  
0x01DD61 - Show "2" experience points (part 1)
+
Header:
 +
Byte 0 - Length of enemy data
 +
When selecting "Strong Enemy" for random overworld battles, advance that many bytes, data for "strong enemy" follows the first enemy set.  Non-random battles do not have "strong enemy" information
  
0x01DD71 - Show "0" experience points (part 2)
+
Bytes for enemy data:
 +
0 -
 +
....xxxx = X coordinate (in tiles)
 +
xxxx.... = Y coordinate (in tiles)
 +
Y coordinate 0 maps to row 1, otherwise maps to row 2+x
 +
1 -
 +
xx...... = Upper bits of X coordinate
 +
..xxxxxx = Enemy number (0-63)
  
 +
-----------
 +
Enemy lists
 +
-----------
 +
West Hyrule, Death Mountain:
 +
00 - Fairy
 +
01 - Red Jar
 +
02 - Locked Door
 +
03 - Myu
 +
04 - Bot (blue)
 +
05 - Bit (red)
 +
06 - Moa
 +
07 - Ache
 +
08 - crash
 +
09 - crash
 +
0A - Acheman
 +
0B - Bubble generator
 +
0C - Rock Generator
 +
0D - Red Deeler
 +
0E - Blue Deeler
 +
0F - Bago Bago Generator
 +
10 - Bago Bago
 +
11 - Red Octoroc (Jumping Only)
 +
12 - Red Octorock (Moving and Jumping)
 +
13 - Elevator
 +
14 - Orange Moblin
 +
15 - Red Moblin
 +
16 - Blue Moblin
 +
17 - Orange Diara
 +
18 - Red Diara
 +
19 - Orange Goryia
 +
1A - Red Goryia
 +
1B - Blue Goryia
 +
1C - Lowder
 +
1D - Moby generator
 +
1E - Moby
 +
1F - Megmet
 +
20 - Geldarm
 +
21 - Dumb Moblin Generator
 +
22 - Dumb Moblin
 +
23-FF crash
 +
East Hyrule, Maze Island
 +
00 - Fairy
 +
01 - Red Magic Jar
 +
02 - Locked Door
 +
03 - Myu
 +
04 - Bot (blue)
 +
05 - Bit (red)
 +
06 - Moa
 +
07 - Ache
 +
08 - ???
 +
09 - ???
 +
0A - Acheman
 +
0B - Bubble Generator
 +
0C - Rock Generator (messed up link-doll sprite in east hyrule)
 +
0D - Red Deeler
 +
0E - Blue Deeler
 +
0F - Bago Bago Generator
 +
10 - Bago Bago
 +
11 - Blue Octoroc (Jumping Only)
 +
12 - Blue Octorock (Moving and Jumping)
 +
13 - Elevator
 +
14 - Tektite
 +
15 - Eye
 +
16 - Leever
 +
17 - Boon
 +
18 - Basilisk
 +
19 - Scorpion
 +
1A - Red Lizalfo
 +
1B - Orange Lizalfo
 +
1C - Blue Lizalfo
 +
1D - Boulder Tossing Lizalfos
 +
1E-FF - Crash
 +
Towns
 +
00 - Fairy
 +
01 - Candle
 +
02 - Locked Door
 +
03 - Purple Kees
 +
04 - Purple Bot
 +
05 - Bit
 +
06 - Purple Moa
 +
07 - Purple Kees (again?)
 +
08 - Gold colored girl, crashes game if you talk to her
 +
09-24 - Various townspeople
 +
Palace 1,2,5
 +
00 - Fairy
 +
01 - Item in Palace Sprite
 +
02 - Locked Door
 +
03 - Myu
 +
04 - Bot
 +
05 - Strike for Red Jar
 +
06 - Slow Magic Stealing Skull
 +
07 - Orange Moa
 +
08 - Falling Block Generator
 +
09 - Single falling block
 +
0A - Blue Skull Head
 +
0B - Rathead Generator
 +
0C - Rathead
 +
0D - Dripping Column
 +
0E - Fast Magic Stealing Skull
 +
0F - Bago Bago Generator
 +
10 - Bago Bago
 +
11 - Rope Jumping Only
 +
12 - Rope Jumping and Moving
 +
13 - Elevator
 +
14 - Crystal Slot
 +
15 - Crystal
 +
16 - Energy ball shooter (to down-right)
 +
17 - Energy ball shooter (to down-left)
 +
18 - Orange Iron Knuckle
 +
19 - Red Iron Knuckle
 +
1A - Blue Iron Knuckle
 +
1B - Wolf Head Generator
 +
1C - Wolf Head
 +
1D - Mago
 +
1E - Hammer Thrower
 +
1F - Red Stalfos
 +
20 - Horse Head
 +
21 - Helmethead/Gooma (5th Palace Boss)
 +
22 - Helmethead's floating head
 +
23 - Blue Stalfos
 +
24-FF crash
 +
Palace 3,4,6
 +
00 - Fairy
 +
01 - Item in Palace sprite
 +
02 - Locked Door
 +
03 - Myu
 +
04 - Bot
 +
05 - Strike for Red Jar/Ironknuckle
 +
06 - Slow Magic Stealing Skulls
 +
07 - Orange Moa
 +
08 - Falling Blocks Generator
 +
09 - Single falling block
 +
0A - Blue Skull Head
 +
0B - Rathead Generator
 +
0C - Rathead
 +
0D - Dripping Column
 +
0E - Fast Magic Stealing Skulls
 +
0F - ???
 +
10 - Flame
 +
11 - Rope
 +
12 - ???
 +
13 - Elevator
 +
14 - Crystal Slot
 +
15 - Crystal
 +
16 - Energy ball shooter (to down-right)
 +
17 - Energy ball shooter (to down-left)
 +
18 - Orange Iron Knuckle
 +
19 - Red Iron Knuckle
 +
1A - Blue Iron Knuckle
 +
1B - Wolf Head Generator
 +
1C - Wolf Head
 +
1D - Wizrobe
 +
1E - Red Stalfos Knight
 +
1F - Doomknocker
 +
20 - Blue Iron Knuckle on horse
 +
21 - Dragon (6th palace boss)
 +
22 - Wizard (4th palace boss)
 +
23 - Blue Stalfos Knight
  
 +
00 - Fairy
 +
01 - Candle
 +
02 - Door
 +
03 - Myu
 +
04 - Bot
 +
05 - Strike for Red Jar/Ironknuckle
 +
06 - Bubble
 +
07 - Orange Moa
 +
08 - Falling blocks
 +
09 - Single falling block
 +
0A - Unicorn Head
 +
0B - Rat Head generator
 +
0C - Rat Head
 +
0D - Column dripper
 +
0E - Fast bubble
 +
0F - ? nothing
 +
10 - Fire
 +
11 - snake/octorock thingy
 +
12 - ? nothing
 +
13 - elevator
 +
14 - crystal return
 +
15 - crystal
 +
16 - unicorn head shooter (to down-right)
 +
17 - unicorn head shooter (to down-left)
 +
18 - Orange Ironknuckle
 +
19 - Red Ironknuckle
 +
1A - Blue Ironknuckle
 +
1B - red wolf head generator
 +
1C - wolf head
 +
1D - reflect wizrobe
 +
1E - Red stalfos
 +
1F - blue boomerang-club thing
 +
20 - Ironknuckle on horse
 +
21 - 6th palace boss
 +
22 - 4th palace boss
 +
23 - Blue stalfos
 +
24-FF crash
 +
Great Palace (NOT VERIFED!)
 +
00 - Fairy
 +
01 - Red Magic Jar
 +
02 - Locked Door
 +
03 - Myu
 +
04 - Bot (blue)
 +
05 - Bit (red)
 +
06 - Moa
 +
07 - Ache
 +
08 - ???
 +
09 - ???
 +
0A - Acheman
 +
0B - Bubble Generator
 +
0C - Rock Generator
 +
0D - Red Deeler
 +
0E - Blue Deeler
 +
0F - Fire Bago Bago Generator
 +
10 - Fire Bago Bago
 +
11 - Fire Rope Jumping Only
 +
12 - Fire Rope Jumping and Moving
 +
13 - Elevator
 +
14 - Slow Magic Stealing Skull
 +
15 - Fast Magic Stealing Skull
 +
16 - Orange Skull Head
 +
17 - Large Magic Stealing Skull
 +
18 - Orange Dreadhawk
 +
19 - Red Dreadhawk
 +
1A - Blue Dreadhawk
 +
1B - ???
 +
1C - ???
 +
1D - Firebird
 +
1E - King Bot
 +
1F - ???
 +
20 - Barrier for Grand Palace
 +
21 - ???
 +
22 - Thunder Bird Boss
 +
23 - Trigger for Dark Link battle
 +
24-FF crash
 +
</pre>
  
Enemies that give 30 experience
+
Information about overworld locations, kinda overlaps with the information there, but made by someone who actually understatnds bitfields :) [But does he ''understand'' them???]
  
0x01DD62 - Show "3" experience points (part 1)
+
<pre>
 +
----------------------------
 +
"Browse Around" information
 +
----------------------------
 +
locations of towns and caves and such:
 +
base addresses
  
0x01DD72 - Show "0" experience points (part 2)
+
0x462F  west hyrule
 +
0x610C  death mtn
 +
0x862F  east hyrule
 +
0xA10C  maze island
  
 +
Base address is for "Y"
 +
Add 3F to get "X"
 +
Add 7E to get "Z"
 +
Add BD to get "W"
  
 +
"Y":
 +
.xxxxxxx - Y position
 +
x....... - Is external to this world?
  
Enemies that give 50 experience
+
"X":
 +
..xxxxxx - X position
 +
.x...... - Is second part of a cave?
 +
x....... - ???
  
0x01DD63 - Show "5" experience points (part 1)
+
"Z":
 +
..xxxxxx - Map number
 +
xx...... - Horizontal position to enter within map
 +
00 = leftmost
 +
01 = enter at x=256? or rightmost for 512 pixel wide maps?
 +
10 = enter at x=512? or rightmost for 768 pixel wide maps?
 +
11 = enter at rightmost for 1024 pixel wide maps?
  
0x01DD73 - Show "0" experience points (part 2)
+
"W":
 +
...xxxxx - "world number"?
 +
xxx..... - "flags"?
 +
</pre>
  
 +
0x0106B4 - 0x0106EE - side view map area for the map with elevator in center of room with windows on each side and exit on each side (first underground room of Level 1 Palace)
  
 
+
{{Internal Data|game=Zelda II: The Adventure of Link}}
Enemies that give 70 experience
 
 
 
0x01DD64 - Show "7" experience points (part 1)
 
 
 
0x01DD74 - Show "0" experience points (part 2)
 
 
 
 
 
 
 
Enemies that give 100 experience
 
 
 
0x01DD65 - Show "10" experience points (part 1)
 
 
 
0x01DD75 - Show "0" experience points (part 2)
 
 
 
 
 
 
 
Enemies that give 150 experience
 
 
 
0x01DD66 - Show "15" experience points (part 1)
 
 
 
0x01DD76 - Show "0" experience points (part 2)
 
 
 
 
 
 
 
Enemies that give 200 experience
 
 
 
0x01DD67 - Show "2" experience points (part 1)
 
 
 
0x01DD77 - Show "00" experience points (part 2)
 
 
 
 
 
 
 
Enemies that give 300 experience
 
 
 
0x01DD68 - Show "3" experience points (part 1)
 
 
 
0x01DD78 - Show "00" experience points (part 2)
 
 
 
 
 
 
 
Enemies that give 500 experience
 
 
 
0x01DD69 - Show "5" experience points (part 1)
 
 
 
0x01DD79 - Show "00" experience points (part 2)
 
 
 
 
 
 
 
Enemies that give 700 experience
 
 
 
0x01DD6A - Show "7" experience points (part 1)
 
 
 
0x01DD7A - Show "00" experience points (part 2)
 
 
 
 
 
 
 
Enemies that give 1000 experience
 
 
 
0x01DD6B - Show "10" experience points (part 1)
 
 
 
0x01DD7B - Show "00" experience points (part 2)
 
 
 
 
 
 
 
0x01DDD0 - Experience Points Type 01 (000)
 
 
 
0x01DDD1 - Experience Points Type 02 (002)
 
 
 
0x01DDD2 - Experience Points Type 03 (003)
 
 
 
0x01DDD3 - Experience Points Type 04 (005)
 
 
 
0x01DDD4 - Experience Points Type 05 (010)
 
 
 
0x01DDD5 - Experience Points Type 06 (020)
 
 
 
0x01DDD6 - Experience Points Type 07 (030)
 
 
 
0x01DDD7 - Experience Points Type 08 (050)
 
 
 
0x01DDD8 - Experience Points Type 09 (070)
 
 
 
0x01DDD9 - Experience Points Type 10 (100)
 
 
 
0x01DDDA - Experience Points Type 11 (150)
 
 
 
0x01DDDB - Experience Points Type 12 (200)
 

Latest revision as of 20:00, 26 April 2020

Other Documentation

Main Menu

17339 - Y position for cursor on Save Slot 1
17351 - Y position for cursor on Save Slot 2
17369 - Y position for cursor on Save Slot 3
1737F - Y position for cursor on Register Your Name
17391 - Y position for cursor on Elimation Mode
17395 - X position for cursor

Beginning Values

17AF7 - Begin with Shield Magic
17AF8 - Begin with Jump Magic
17AF9 - Begin with Life Magic
17AFA - Begin with Fairy Magic
17AFB - Begin with Fire Magic
17AFC - Begin with Reflect Magic
17AFD - Begin with Spell Magic
17AFE - Begin with Thunder Magic
17AFF - Number of Magic Containers to begin game
17B00 - Number of Heart Containers to begin game
17B01 - Begin with Candle
17B02 - Begin with Power Glove
17B03 - Begin with Raft
17B04 - Begin with Boots
17B05 - Begin with Flute
17B06 - Begin with Cross
17B07 - Begin with Hammer
17B08 - Begin with Magic Key
17B10 - Number of Crystals to begin game
17B12 - Techs (Downward Thrust 10) (Upward Thrust 04) (Both 14)
17B1D - 0x017B24 - Letter Values when blanking a name out
17B25 - 0x017C04 - Bit defaults for sprites (keys, items, etc.)
1C369 - Number of lives to begin game

Magic Spell Effect Pointers

from    to
----    ----
00E58 - 00E59 - Shield 
00E5A - 00E5B - Jump 
00E5C - 00E5D - Life 
00E5E - 00E5F - Fairy 
00E60 - 00E61 - Fire 
00E62 - 00E63 - Reflect 
00E64 - 00E65 - Spell 
00E66 - 00E67 - Thunder 

It's possible to alter the order in which Link "learns" magic spells by re-arranging the data from [$E58-$E67]. (For example, to make Thunder the first spell Link acquires, replace the data at [$E58-$E59] with that from [$E66-$E67]. Note, however, that the spell will still be under the first slot and named "Shield.")

Sound Data

18000   Music Engine Entry Point, Title Screen (Replace with 'RTS' to disable the music engine)
19000   Music Engine Entry Point, Rest of the Game (Replace with 'RTS' to disable the music engine)
1A01A   Overworld music string
1A027   Battleground music string
1A02C   "Got a Heart/Item/Etc." music string

PPU Data

Overworld

from    to 
----    ----
007B3 - 007B6 - PPU data for Towns
007B7 - 007BA - PPU data for Caves
007BB - 007BE - PPU data for Palaces
007BF - 007C2 - PPU data for Bridges
007C3 - 007C6 - PPU data for Desert
007C7 - 007CA - PPU data for Grass Areas
007CB - 007CE - PPU data for Forests
007CF - 007D2 - PPU data for Swamps
007D3 - 007D6 - PPU data for Graveyards
007D7 - 007DA - PPU data for Trails
007DB - 007DE - PPU data for Lava Areas
007DF - 007E2 - PPU data for Mountains
007E3 - 007E6 - PPU data for Water
007E7 - 007EA - PPU data for Walkable Water
007EB - 007EE - PPU data for Rocks/Roadblocks
007EF - 007F2 - PPU data for River Devil

Western Hyrule

044EB - 044EE - PPU data for Grass on Battlefield

Eastern Hyrule

from    to
----    ----
084DF - 084E2 - PPU data for Leaves of Trees on Battlefield
084E3 - 084E6 - PPU data for Hanging Leaves on Battlefield
084EB - 084EE - PPU data for Grass on Battlefield

Towns

from    to
----    ----
0C3F6 - 0C3F9 - PPU data for Top of Exterior Windows
0C3FA - 0C3FD - PPU data for Bottom of Exterior Windows
0C44E - 0C451 - PPU data for left side of Clouds
0C452 - 0C455 - PPU data for right side of Larger Clouds
0C456 - 0C459 - PPU data for right side of Smaller Clouds
0C45A - 0C45D - PPU data for angle of tunnel right
0C45E - 0C461 - PPU data for tunnel wall right
0C4E2 - 0C4E5 - PPU data for floors inside buildings
0C6B2 - 0C6B5 - PPU data for Sky
0C6BA - 0C6BD - PPU data for background of Basements
0C6C6 - 0C6C9 - PPU data for Bushs
0C6FE - 0C701 - PPU data for Ground
0C706 - 0C709 - PPU data for Walls in Basements

Palace Data

from    to
----    ----
10480 - 104DF - Palettes for Outside the 6 Palaces
13F10 - 13F6F - Palettes for the 6 Palaces Interiors
1C46B - 1C47A - Palette for Overworld
1C47B - 1C48A - Sprite pallet set for Overworld

Graphics Set

1CD3A - Graphics Set for Palace 1
1CD3B - Graphics Set for Palace 2
1CD3C - Graphics Set for Palace 3
1CD3E - Graphics Set for Palace 4
1CD42 - Graphics Set for Palace 5
1CD43 - Graphics Set for Palace 6
1CD44 - Graphics Set for Great Palace

Palette Pointers

1CD45 - Palette Pointer for Palace 1
1CD46 - Palette Pointer for Palace 2
1CD47 - Palette Pointer for Palace 3
1CD49 - Palette Pointer for Palace 4
1CD4D - Palette Pointer for Palace 5
1CD4E - Palette Pointer for Palace 6
1CD4F - Palette Pointer for Great Palace

Overworld

Overworld Map Data

506C - 538C - West Hyrule
665C - 6942 - Death Mountain
9056 - 936F - East Hyrule
A65C - A942 - Maze Island

The 4 Overworld maps are 64 tiles wide, and their respective heights are variable. Overworld data is encoded in an RLE (Run Length Encoding) format. Each byte codes for a horizontal strip of terrain, as follows:

xxxx .... - Length (add 1)
.... xxxx - Type

Table of Tile Types:

0    Town
1    Cave
2    Palace
3    Bridge
4    Desert
5    Grass
6    Forest
7    Swamp
8    Graveyard
9    Road
A    Lava
B    Mountain
C    Water
D    Water (walkable)
E    Rock
F    Spider


Data Structure Example from West Hyrule (first four bytes starting at 0x506C):

BB DC 74 FC ...
  • BB - 12 (B + 1) Mountain (B) Tiles

Zelda2-WestHyruleByte1.png

  • DC - 14 (D + 1) Water (C) Tiles

Zelda2-WestHyruleByte2.png

  • 74 - 8 (7 + 1) Desert (4) Tiles

Zelda2-WesthyruleByte3.png

  • FC - 16 (F + 1) Water (C) Tiles

Zelda2-WestHyruleByte4.png

  • BB DC 74 FC

Zelda2-WestHyrule4Bytes.png

Overworld in RAM

The compressed Overworld map is copied to Cartridge RAM to allow the game to modify the map. Data is stored between 0x7C00 and 0x7FFF.

Palace Pointers

These control which byte in Cartridge RAM gets turned into a single rock (0B) after completing a palace. Data is Cartridge RAM pointers, the base is 0x7C00, and the offset is how many bytes into the compressed map.

West Hyrule / Death Mountain

479F - Palace 1
47A1 - Palace 2
47A3 - Palace 3
47A5 - Palace 4 (in Death Mountain)

East Hyrule / Maze Island

879F - Palace 5
87A1 - Palace 6
87A5 - Invalid pointer
87A7 - Palace 4 (in Maze Island)

Overworld Areas

Each area has 4 bytes that define various informations, like position on the Overworld, destination map number, destination world number, where Link starts in the side view mode, etc. Each byte is formatted as follows:

Byte 0

.xxx xxxx - Y position
x... .... - External to this world

Byte 1 (offset 3F bytes from Byte 0)

..xx xxxx - X position
xx.. .... - On exit, appear at the location of area index minus this value (0-3)

Byte 2 (offset 7E bytes from Byte 0)

..xx xxxx - Map number
xx.. .... - Horizontal position to enter within map
    0 = enter from the left
    1 = enter at x=256 or from the right for 2 screens maps
    2 = enter at x=512 or from the right for 3 screens maps
    3 = enter from the right for 4 screens maps

Byte 3 (offset BD bytes from Byte 0)

...x xxxx - World number
..x. .... - Forced enter from the right edge of screen
.x.. .... - Pass through
x... .... - Fall in hole

West Hyrule

from   to
----   ----
462F - 466D - Areas Y position
466E - 46AC - Areas X position
46AD - 46EB - Areas map number
46EC - 472A - Areas world number

Death Mountain

from   to
----   --
610C - 614A - Areas Y position
614B - 6189 - Areas X position
618A - 61C8 - Areas map number
61C9 - 6207 - Areas world number

East Hyrule

from   to
----   --
862F - 866D - Areas Y position
866E - 86AC - Areas X position
86AD - 86EB - Areas map number
86EC - 8727 - Areas world number

Maze Island

from   to
----   --
A10C - A14A - Areas Y position
A14B - A189 - Areas X position
A18A - A1C8 - Areas map number
A1C9 - A207 - Areas world number

Click here for an extensive list of all areas with descriptions.

Level Data

04C4C - 04C67 - Grass Area level data
04C64 - 04C78 - Forest Area level data
04C8C - 04CA6 - 50 point bag level data

Unsorted Information

18027 - 1811E - Note Tables
1E8B0         - Number of enemies to defeat for exp. bag or magic jar
1E910         - Type of vulnarablity Bit (red) has
1E911         - Type of vulnarability Bot (blue) has

Dwedit's documents (unsorted)

I just made a full document of what I know about Zelda 2's side-view areas, and copy-pasted it into datacrystal, I figure someone else can sort it out later. Haven't tested or verified it yet, so there may be a few mistakes. I just went by my level editor.

Zelda 2 sideview information

Address convention:
I don't want to bother explaining NES memory pointers.
I'll be using addresses as they reside in NES memory.  $8000-$BFFF is where data rom banks are mapped in NES memory.
When I say $XXXX in rom bank Y, that means a file address of ($XXXX-$8000) + Y*$4000, + $10.  So a NES memory address $8123 on bank 4 means a .nes file address of $10133.

Sometimes pointers point to areas other than $8000-$BFFF, such as the SRAM area $6000-$7FFF.

--------------
Rom or Ram?
--------------
This game was originally an FDS game, so it relies on lots of data being writable.

Enemies are stored in SRAM starting at $7000
Compressed overworld maps are stored in SRAM starting at $7C00.

--------------
Number of Maps
--------------
Each area has 63 maps, 0-62, map #63 is an invalid map number indicating that the destination is outside.

---------
Rom Banks
---------
A "Rom Bank" is 16k (4000) bytes long.
Each rom bank has two sets of 63 maps, except for 3 and 5, which only have one set.

bank 1 contains west hyrule/death mountain
bank 2 contains east hyrule/maze island
bank 3 contains towns
bank 4 contains palaces 1,2,5, then palaces 3,4,6.
bank 5 contains the great palace

----------------------------
Map and Enemy Pointer Tables
----------------------------
Map pointers point to ROM in the $8000-$BFFF range.
Enemy pointers point to SRAM in the $7000-$7xxx range, this is so the game can keep track of defeated enemies.

Information for the second set of maps/enemies comes $1ADD later.

Enemy data for all 126 maps is copied from $88A0 to $7000.  (length unknown?)

For the first set of 63 maps:
$8523 - map pointers
$85A1 - enemy pointers

For the second set of 63 maps:
$A000 - map pointers
$A07E - enemy pointers

For the "behind this map" maps (1-7) specified by header byte 3 (there is no back map #0):
$8000 - map pointers


----------------------
Room connectivity data
----------------------
Begins at $871B, 4 bytes per entry
Begins at $A1F8 for second set of 63 maps

xxxxxx.. = Destination map number (63 to go outside)
......xx = Starting X coordinate on destination (times 256)

Order of bytes:
	Left exit
	Down exit
	Up exit
	Right exit

===================
Sideview Map Format
===================
----------------------
First 4 bytes (header)
----------------------

Things may vary, most of this info applies to overworld sideview maps, some may not apply for towns and palaces, some numbers may be different for those.

0 - Size of level in bytes, including header
1 - Flags
	x....... - Which Object Set - This determines which objects can appear on this map!
	.xx..... - Width of level (in screens, add 1)
	...x.... - ?
	....x... - "Grass", when set, adds grass tiles to map row #9
	.....x.. - "bushes", when set, adds bushes tiles to map row #10
	......xx - ?
2 - Ground Graphics / initial floor/ceiling position
The levels are made up of objects, and ground tiles.  This byte selects initial floor/ceiling position, and set of ground tiles to be used by the level.
	x....... - "no ceiling",  top 2 rows of the map are set to background tile, this overrides all
	.xxx.... - Sets which set of tiles assigned to the Ground tiles
		0 = cave
		1 = forest
		2 = lava/death water
		3 = swamp
		4 = sand/grass
		5 = volcano (cave with brighter wall)
		6 = North Castle
		7 = Cave with clear wall (rocks outside)
	....xxxx - Initial position of floor/ceiling
		0-7 = Floor at 2-9 (from bottom), Ceiling at 1 from top
		8-14 = Ceiling at 2-8 (from top)
		15 = Filled in with wall tile
3 - Palette and back tiles byte
	xx...... - Palette for sprites
		0 = black borders
		1 = dark colored borders
		2,3 = not used by game, give weird colors
	..xxx... - Background Palette
		0 = north castle
		1 = cave palette (dark without candle for overworld maps)
		2 = desert
		3 = grass
		4 = forest
		5 = swamp
		6 = graveyard
		7 = "water" palette
	.....xxx - Map to load behind map
		0 = nothing
		1 = clouds
		2 = forest (3 wide)
		3 = forest (4 wide)
		4 = forest (single tree)
		5 = Dead-end caves
		6 = long cave, dead end
		7 = ???
------------
Level bytes:
------------

0 - 
	xxxx.... - Y position
	....xxxx - Advance cursor X this many tiles after the object ("X space")
1 -
	xxxxxxxx - Object number
	If Object number = 15, and Y position < 13, then this is a 3 byte object (collectable item)
2 - (3 byte objects only)
	xxxxxxxx - For 3 byte objects only, object number (0-21, 22+ are not used)
	

Special Y posisitons:
	13 - Set new ground
		Sets the floor and ceiling to new values, just like header byte 2
		x....... - "no ceiling",  top 2 rows of the map are set to background tile
		.xxx.... - Not used, you can't change tiles for ground
		....xxxx - New position of floor/ceiling
			0-7 = Floor at 2-9 (from bottom), Ceiling at 1 from top
			8-14 = Ceiling at 2-8 (from top)
			15 = Filled in with wall tile
	14 - "Skip"
		Sets the cursor X directly to "x space" * 16.  Does not advance the cursor after this object as normal.
	15 - Extra objects, including lava and cactuses.  These have fixed-y coordinates.


-----------
Map Objects
-----------
This part really could be done much better, instead of hard-specifying everything, see how the game handles them, see what tiles it selects, see how it assembles the structures, etc.


Objects: (For Overworld sideview maps)
	00001111 - 3 byte object (collectable)
	0000xxxx - 16 different small objects
	xxxx.... - Object type
	....xxxx - Size of object (1-16)
	Small objects:
		00 = headstone
		01 = cross
		02 = angled cross
		03 = tree stump
		04 = stone table, ("stonehenge")
		05 = locked door (always at Y position 8)
		06 = sleeping princess Zelda
		07 = sleeping princess Zelda
		08 = Pit (extends to ground?)
		09-0E = Cloud
		0F = crash
	Big objects for Object set 0
		0x = small objects
		1x = crash
		2x = forest ceiling, two high
		3x = forest ceiling, two high
		4x = curtains, two high
		5x = forest ceiling, one high
		6x = sword-destroyable blocks, one high
		7x = horizontal pit, one high
		8x = single weed, one high
		9x = two weeds, one high
		Ax = north castle steps (background), one high
		Bx = background bricks, used in north castle and ruins, one high
		Cx = strip of volcano background, one high
		Dx = sword-destroyable blocks, one wide
		Ex = background tree trunk, one wide
		Fx = column, one wide
	Big objects for Object set 1
		0x = small objects
		1x = crash
		2x = wide rock floor, two high
		3x = wide rock ceiling, two high
		4x = bridge, two high
		5x = cave blocks, one high
		6x = sword-destroyable blocks, one high
		7x = bridge that falls apart, one high
		8x = single weed, one high
		9x = two weeds, one high
		Ax = horizontal pit, one high
		Bx = background bricks, used in north castle and ruins, one high
		Cx = strip of volcano background, one high
		Dx = sword-destroyable blocks, one wide
		Ex = tall rock floor, one wide
		Fx = stone spire
	Extra objects (Y position 15):
		0x = crash
		1x = crash
		2x = Lava at bottom of screen, three high
		3x = Cactus at Y position 9, grows upwards, one wide
		4x = Cactus with stem at Y position 9, one wide, two high
		5x = Elevator?
		60-FF = crash

Objects: (for towns)
	Small Objects:
		00 = closed door with grass at bottom, 4 high 1 wide
		01 = open door with grass at bottom
		02 = open door with bricks at bottom
		03 = open door with vertical bricks at bottom
		04 = stonehenge
		05 = chair
		06 = ?
		07 = cloud
		08 = table
		09 = bench
		0A = cross
		0B-0E = cloud
		0F = crash
	Big objects for Object Set 0
		0x = small objects
		1x = crash
		2x = cross hatched roof, two high
		3x = gray vertical brick roof, two high
		4x = green vertical brick roof, two high
		5x = brick building, extends to ground
		6x = white small brick building, extends to ground
		7x = grass building, extends to ground
		8x = white brick wall, extends to ground
		9x = log building, extends to ground
		Ax = brown square windows, one wide, Two tall. One tile Gap between windows.  Repeats vertically
		Bx = gray windows, round on top...
		Cx = brown windows, round on top
		Dx = Underground blue bricks, two high
		Ex = Column
		Fx = castle background bricks
	Effects of Object Set 1 unknown
	Extra Objects (Y position 15)
		00 = Door to left
		01 = Door to right
		02 = Wall to left
		03 = wall to right
		04 = fireplace
		05 = fountain
		06 = sign
		07 = headstone one above ground
		08-0F = ?
		1x = single bush
		2x = background wall at Y pos 4, 3 wide, x tall
		3x = ?
		4x = ?
		5x = ?
		6x = bridge
		7x = water/lava
		80-FF = ?

Objects: (for Palaces)
	Small Objects
		00 = Window
		01 = Rightward unicorn head
		02 = leftward wolf head
		03,04 = crystal return statue
		05,06 = locked door
		07 = cloud
		08 = small cloud
		09 = ironknuckle statue
		0A-0E = small cloud
		0F = crash
	Large Objects (set 0)
		0x = small objects
		1x = Horizontal Pit, one high
		2x = horizontal bricks, one high
		3x = breakable blocks, one high
		4x = steel blocks, one high
		5x = breaking bridge, one high
		6x = breakable blocks, one high
		7x = horizontal bricks, two high
		8x = curtains, two high
		9x = breakable blocks, two high
		Ax = walk-thru bricks, two high
		Bx = breakable blocks, one wide
		Cx = Column, one wide
		Dx = Bridge, two high
		Ex = Pit, one wide
		Fx = Horizontal Pit, extends to bottom of screen
	Extra Objects
		1x = Lava

Objects: (for Great Palace)
	Great palace contains tiles for the "north castle" used in ending
	Same as above, except:
		09 = Zelda
		0A = Ironknuckle Statue
		1x = Canopy (for final boss room)
		5x = North Castle bricks
		6x = North Castle Steps
		7x = breakable bridge
		8x = bridge, two high
		9x = bricks, two high
		Ax = curtains, two high
		Bx = Walk-thru bricks, two high
		Cx = breakable blocks, two high
		Dx = breakable blocks, one wide
		Ex = electric barrier
		Fx = column

============
Enemy Format
============

Header:
Byte 0 - Length of enemy data
When selecting "Strong Enemy" for random overworld battles, advance that many bytes, data for "strong enemy" follows the first enemy set.  Non-random battles do not have "strong enemy" information

Bytes for enemy data:
0 -
	....xxxx = X coordinate (in tiles)
	xxxx.... = Y coordinate (in tiles)
		Y coordinate 0 maps to row 1, otherwise maps to row 2+x
1 -
	xx...... = Upper bits of X coordinate
	..xxxxxx = Enemy number (0-63)

-----------
Enemy lists
-----------
West Hyrule, Death Mountain:
	00 - Fairy
	01 - Red Jar
	02 - Locked Door
	03 - Myu
	04 - Bot (blue)
	05 - Bit (red)
	06 - Moa
	07 - Ache
	08 - crash
	09 - crash
	0A - Acheman
	0B - Bubble generator
	0C - Rock Generator
	0D - Red Deeler
	0E - Blue Deeler
	0F - Bago Bago Generator
	10 - Bago Bago
	11 - Red Octoroc (Jumping Only)
	12 - Red Octorock (Moving and Jumping)
	13 - Elevator
	14 - Orange Moblin
	15 - Red Moblin
	16 - Blue Moblin
	17 - Orange Diara
	18 - Red Diara
	19 - Orange Goryia
	1A - Red Goryia
	1B - Blue Goryia
	1C - Lowder
	1D - Moby generator
	1E - Moby
	1F - Megmet
	20 - Geldarm
	21 - Dumb Moblin Generator
	22 - Dumb Moblin
	23-FF crash
East Hyrule, Maze Island
	00 - Fairy
	01 - Red Magic Jar
	02 - Locked Door
	03 - Myu
	04 - Bot (blue)
	05 - Bit (red)
	06 - Moa
	07 - Ache
	08 - ???
	09 - ???
	0A - Acheman
	0B - Bubble Generator
	0C - Rock Generator (messed up link-doll sprite in east hyrule)
	0D - Red Deeler
	0E - Blue Deeler
	0F - Bago Bago Generator
	10 - Bago Bago
	11 - Blue Octoroc (Jumping Only)
	12 - Blue Octorock (Moving and Jumping)
	13 - Elevator
	14 - Tektite
	15 - Eye
	16 - Leever
	17 - Boon
	18 - Basilisk
	19 - Scorpion
	1A - Red Lizalfo
	1B - Orange Lizalfo
	1C - Blue Lizalfo
	1D - Boulder Tossing Lizalfos 
	1E-FF - Crash
Towns
	00 - Fairy
	01 - Candle
	02 - Locked Door
	03 - Purple Kees
	04 - Purple Bot
	05 - Bit
	06 - Purple Moa
	07 - Purple Kees (again?)
	08 - Gold colored girl, crashes game if you talk to her
	09-24 - Various townspeople
Palace 1,2,5
	00 - Fairy
	01 - Item in Palace Sprite
	02 - Locked Door
	03 - Myu
	04 - Bot
	05 - Strike for Red Jar
	06 - Slow Magic Stealing Skull
	07 - Orange Moa
	08 - Falling Block Generator
	09 - Single falling block
	0A - Blue Skull Head
	0B - Rathead Generator
	0C - Rathead
	0D - Dripping Column
	0E - Fast Magic Stealing Skull
	0F - Bago Bago Generator
	10 - Bago Bago
	11 - Rope Jumping Only
	12 - Rope Jumping and Moving
	13 - Elevator
	14 - Crystal Slot
	15 - Crystal
	16 - Energy ball shooter (to down-right)
	17 - Energy ball shooter (to down-left)
	18 - Orange Iron Knuckle
	19 - Red Iron Knuckle
	1A - Blue Iron Knuckle
	1B - Wolf Head Generator
	1C - Wolf Head
	1D - Mago
	1E - Hammer Thrower
	1F - Red Stalfos
	20 - Horse Head
	21 - Helmethead/Gooma (5th Palace Boss) 
	22 - Helmethead's floating head
	23 - Blue Stalfos
	24-FF crash
Palace 3,4,6
	00 - Fairy
	01 - Item in Palace sprite
	02 - Locked Door
	03 - Myu
	04 - Bot
	05 - Strike for Red Jar/Ironknuckle
	06 - Slow Magic Stealing Skulls
	07 - Orange Moa
	08 - Falling Blocks Generator
	09 - Single falling block
	0A - Blue Skull Head
	0B - Rathead Generator
	0C - Rathead
	0D - Dripping Column
	0E - Fast Magic Stealing Skulls
	0F - ???
	10 - Flame
	11 - Rope
	12 - ???
	13 - Elevator
	14 - Crystal Slot
	15 - Crystal
	16 - Energy ball shooter (to down-right)
	17 - Energy ball shooter (to down-left)
	18 - Orange Iron Knuckle
	19 - Red Iron Knuckle
	1A - Blue Iron Knuckle
	1B - Wolf Head Generator
	1C - Wolf Head
	1D - Wizrobe
	1E - Red Stalfos Knight
	1F - Doomknocker
	20 - Blue Iron Knuckle on horse
	21 - Dragon (6th palace boss)
	22 - Wizard (4th palace boss)
	23 - Blue Stalfos Knight

	00 - Fairy
	01 - Candle
	02 - Door
	03 - Myu
	04 - Bot
	05 - Strike for Red Jar/Ironknuckle
	06 - Bubble
	07 - Orange Moa
	08 - Falling blocks
	09 - Single falling block
	0A - Unicorn Head
	0B - Rat Head generator
	0C - Rat Head
	0D - Column dripper
	0E - Fast bubble
	0F - ? nothing
	10 - Fire
	11 - snake/octorock thingy
	12 - ? nothing
	13 - elevator
	14 - crystal return
	15 - crystal
	16 - unicorn head shooter (to down-right)
	17 - unicorn head shooter (to down-left)
	18 - Orange Ironknuckle
	19 - Red Ironknuckle
	1A - Blue Ironknuckle
	1B - red wolf head generator
	1C - wolf head
	1D - reflect wizrobe
	1E - Red stalfos
	1F - blue boomerang-club thing
	20 - Ironknuckle on horse
	21 - 6th palace boss
	22 - 4th palace boss
	23 - Blue stalfos
	24-FF crash
Great Palace (NOT VERIFED!)
	00 - Fairy
	01 - Red Magic Jar
	02 - Locked Door
	03 - Myu
	04 - Bot (blue)
	05 - Bit (red)
	06 - Moa
	07 - Ache
	08 - ???
	09 - ???
	0A - Acheman
	0B - Bubble Generator
	0C - Rock Generator
	0D - Red Deeler
	0E - Blue Deeler
	0F - Fire Bago Bago Generator
	10 - Fire Bago Bago
	11 - Fire Rope Jumping Only
	12 - Fire Rope Jumping and Moving
	13 - Elevator
	14 - Slow Magic Stealing Skull
	15 - Fast Magic Stealing Skull
	16 - Orange Skull Head
	17 - Large Magic Stealing Skull
	18 - Orange Dreadhawk
	19 - Red Dreadhawk
	1A - Blue Dreadhawk
	1B - ???
	1C - ???
	1D - Firebird
	1E - King Bot
	1F - ???
	20 - Barrier for Grand Palace
	21 - ???
	22 - Thunder Bird Boss
	23 - Trigger for Dark Link battle 
	24-FF crash

Information about overworld locations, kinda overlaps with the information there, but made by someone who actually understatnds bitfields :) [But does he understand them???]

----------------------------
"Browse Around" information
----------------------------
locations of towns and caves and such:
base addresses

0x462F  west hyrule
0x610C  death mtn
0x862F  east hyrule
0xA10C  maze island

Base address is for "Y"
Add 3F to get "X"
Add 7E to get "Z"
Add BD to get "W"

"Y":
.xxxxxxx - Y position
x....... - Is external to this world?

"X":
..xxxxxx - X position
.x...... - Is second part of a cave?
x....... - ???

"Z":
..xxxxxx - Map number
xx...... - Horizontal position to enter within map
	00 = leftmost
	01 = enter at x=256? or rightmost for 512 pixel wide maps?
	10 = enter at x=512? or rightmost for 768 pixel wide maps?
	11 = enter at rightmost for 1024 pixel wide maps?

"W":
...xxxxx - "world number"?
xxx..... - "flags"?

0x0106B4 - 0x0106EE - side view map area for the map with elevator in center of room with windows on each side and exit on each side (first underground room of Level 1 Palace)


Internal Data for Zelda II: The Adventure of Link

ROM MapRAM MapText TableNotesTutorials