The Legend of Zelda: Link's Awakening (Game Boy)/RAM map

From Data Crystal
Jump to navigation Jump to search

Chip tiny.png The following article is a RAM map for The Legend of Zelda: Link's Awakening (Game Boy).

RAM Purpose
D401 Destination data byte 1: 00 - overworld, 01 - dungeon, 02 - side view area
D402 Destination data byte 2: Values from 00 to 1F accepted. FF is Color Dungeon
D403 Destination data byte 3: Room number. Must appear on map or it will lead to an empty room
D404 - D405 Destination data X and Y co-ordinates
D700 - D79B Interactions for currently loaded map (water, stairs, doorways, etc). Note: the last 4 bytes in each row/address are not used. There is a 1 byte outline of FF surrounding the useable map.

For example, these are the interactions for the SHOP screen right below Marin and Tarin's house. (04 is walkable ground, 0A is grass, 5C is bush, E2 is the shop entrance, etc.)

FF FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00
FF 0A 0A 0A 0A 0A 0A 0A 0A 0A 27 FF 00 00 00 00
FF 04 04 04 04 5C 5C 5C 04 3D 2F FF 00 00 00 00
FF 04 04 04 5C 55 5A 56 5C 38 0E FF 00 00 00 00
FF 04 04 04 5C 40 41 42 5C 38 0E FF 00 00 00 00
FF 04 44 04 5C 5B E2 5B 5C 38 0E FF 00 00 00 00
FF 04 04 04 5C 04 04 04 5C 38 0E FF 00 00 00 00
FF 04 04 04 04 5C 5C 25 26 38 0E FF 00 00 00 00
FF 26 25 26 25 26 25 2A 28 32 2C FF 00 00 00 00
FF FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00
D800 - D8FF World map status

Each screen status is represented by a byte, which is a combination of the following masks :

00 : Unexplored
10 : changed from initial status (for example sword taken on the beach or dungeon opened with key)
20 : owl talked
80 : visited

For example, visiting the first dungeon's screen (80) and opening it with the key (10) would put that byte at 90

DB00 - DB01 Your currently held items.
DB02 - DB0B Inventory
DB0C Flippers (01=have)
DB0D Potion (01=have)
DB0E Current item in trading game (01=Yoshi, 0E=magnifier)
DB0F Number of secret shells
DB10-DB14 Dungeons entrance keys (01=have)
DB15 Number of golden leaves
DB16 - DB3D Beginning of dungeon item flags. 5 bytes fo each dungeon, 5th byte is quantity of keys for that dungeon
DB43 Power bracelet level
DB44 Shield level
DB45 Number of arrows
DB49 Ocarina songs in possession (3 bits mask, 0=no songs, 7=all songs)
DB4A Ocarina selected song
DB4C Magic powder quantity
DB4D Number of bombs
DB4E Sword level
DB4F - DB53 File name during gameplay

00 through FF all work, although you will encounter other text and background tiles outside of normal letter tile ranges.

31 - 3a : Numbers 0-9
41 - 5B : Uppercase A-Z
62 - 7B : Lowercase a-z
DB56-DB58 Number of times the character died for each save slot (one byte per save slot)
DB5A Current health. Each increment of 08h is one full heart, each increment of 04h is one-half heart.
DB5B Maximum health. Simply counts the number of hearts Link has in hex. Max recommended value is 0Eh (14 hearts).
DB5D-DB5E Number of rupees (for 999 put 0999)
DB65-DB6C Instruments for every dungeon, 00=no instrument, 03=have instrument
DB76 Max magic powder
DB77 Max bombs
DB78 Max arrows
DB80 - DB84 File 1 Name
DB85 - DB89 File 2 Name
DB8A - DB8E File 3 Name
DB95 - DB96 Game status

Each pair of bytes tells you which screen/part of the game is currently loaded.

0003 - 000A : Intro Sequence
000B : Title Screen
0207 : File Select
0302 : File Name
0406 : Erase File
0504 : Copy File
0B07 : Normal Gameplay
0704 : Overworld Map
0604 : Save Menu
DBA6 File select cursor position (00 : File 1, 01 : File 2, 02 : File 3, 03 : ERASE/COPY)
DBA9 Position of cursor on lower screen when creating name
DBAA Position of cursor on upper screen when creating name
DBAE Your position on the 8x8 dungeon grid
DBD0 Quantity of keys in posession

Items Ids for "Inventory" and "Currently held items"

Id Item
01 Sword
02 Bombs
03 Power bracelet
04 Shield
05 Bow
06 Hookshot
07 Fire rod
08 Pegasus boots
09 Ocarina
0A Feather
0B Shovel
0C Magic powder
0D Boomrang