Dragon Warrior/ROM map: Difference between revisions

From Data Crystal
Jump to navigation Jump to search
m (simplified template declarations)
 
(32 intermediate revisions by 10 users not shown)
Line 1: Line 1:
{{rommap|game=Dragon Warrior}}
{{rommap}}
==Miscellaneous==
0x00000 to 0x0000F = iNES header
0x0002A to 0x000C0 = Map metadata (See [[#Metadata_Format|Metadata Format]])


==Maps==
===Castles===
0x000C1 to 0x00188 = Charlock Castle
0x00189 to 0x00250 = Hauksness Ruins
0x00251 to 0x00412 = Tantegel Castle
0x00413 to 0x00444 = Tantegel Throne Room
0x00445 to 0x00606 = Dragonlord's Throne Room


0-F Rom Header
===Towns===
2A-C0 Map Headers (see 1)
0x00607 to 0x00726 = Kol
===Maps===
0x00727 to 0x008E8 = Brecconary
====Castles====
0x008E9 to 0x00AAA = Cantlin
C1-188 Charlock Castle
0x00AAB to 0x00B72 = Garinham
0x00B73 to 0x00D34 = Rimuldar


189-250 Hawksness Ruins
===Shrines===
0x00D35 to 0x00D66 = Sunlight Shrine
0x00D67 to 0x00D98 = Rain Shrine
0x00D99 to 0x00DCA = Rainbow Shrine


251-412 Tantagel Castle
===Dragonlord Cavern===
0x00DCB to 0x00E92 = Dragonlord Cavern B1
0x00E93 to 0x00EC4 = Dragonlord Cavern B2
0x00EC5 to 0x00EF6 = Dragonlord Cavern B3
0x00EF7 to 0x00F28 = Dragonlord Cavern B4
0x00F29 to 0x00F5A = Dragonlord Cavern B5
0x00F5B to 0x00F8C = Dragonlord Cavern B6


413-444 Tantagel Throne Room
===Other Caves===
0x00F8D to 0x00FE6 = Rimuldar Passage
0x00FE7 to 0x01048 = Cave west of Tantegel B1
0x01049 to 0x010AA = Cave west of Tantegel B2
0x010AB to 0x01172 = Garin's Grave B1
0x01173 to 0x0123A = Garin's Grave B3
0x0123B to 0x0136C = Garin's Grave B4
0x0126D to 0x012C0 = Garin's Grave B2
0x012C1 to 0x012F2 = Erdrick's Cave B1
0x012F3 to 0x01324 = Erdrick's Cave B2


445-606 Dragonlord's Throne Room
==Music Data==
====Towns====
0x44DB to 0x44DD = Silence, Pulse-1 & Pulse-2
607-726 Kol
0x44DE to 0x44E2 = Silence, Triangle
0x44E3 to 0x454D = Throne Room, Pulse-1
0x454E to 0x45B9 = Throne Room, Triangle
0x45BA to 0x45C3 = Courtyard, Pulse-1
0x45C4 to 0x4639 = Courtyard, Triangle
0x463A to 0x464F = Level-Up, Pulse-1
0x4650 to 0x4662 = Level-Up, Pulse-2
0x4663 to 0x468A = Gwaelin's Love, Pulse-1
0x468B to 0x46BB = Gwaelin's Love, Pulse-2
0x46BD to 0x46DB = Gwaelin's Love, Triangle
0x46DC to 0x46FA = Inn, Pulse-1
0x46FB to 0x4716 = Inn, Pulse-2
0x4717 to 0x471D = Battle Over, Pulse-2
0x471E to 0x473E = Battle Over, Pulse-1
0x473F to 0x47B1 = Town, Pulse-1
0x47B2 to 0x4826 = Town, Triangle
0x4827 to 0x4853 = Overworld, Triangle
0x4854 to 0x489A = Overworld, Pulse-1
0x489B to 0x492C = Caverns #1-8, Pulse-1
0x492D to 0x49B8 = Cavern #1, Triangle
0x4934 to 0x49B8 = Cavern #2, Triangle
0x493B to 0x49B8 = Cavern #3, Triangle
0x4942 to 0x49B8 = Cavern #4, Triangle
0x4947 to 0x49B8 = Cavern #5, Triangle
0x494E to 0x49B8 = Cavern #6, Triangle
0x4955 to 0x49B8 = Cavern #7, Triangle
0x495C to 0x49B8 = Cavern #8, Triangle
0x49B9 to 0x4ADE = Battle Theme, Pulse-1
0x49CF to 0x4ADE = Battle Theme (sans intro), Pulse-1
0x4ADF to 0x4B71 = Battle Theme, Triangle
0x4AF1 to 0x4B71 = Battle Theme (sans intro), Triangle
0x4B72 to 0x4BF5 = Final Battle, Pulse-1
0x4BF6 to 0x4C29 = Final Battle, Pulse-2
0x4C2A to 0x4C4D = Final Battle, Triangle
0x4C4E to 0x4CA9 = Silver Harp, Pulse-2
0x4C4F to 0x4CA9 = Silver Harp, Pulse-2
0x4CAA to 0x4CF0 = Fairy Flute, Triangle
0x4CF1 to 0x4D32 = Rainbow Drop, Pulse-2
0x4CF2 to 0x4D32 = Rainbow Drop, Pulse-1
0x4D33 to 0x4D59 = "Thou Art Dead", Pulse-2
0x4D34 to 0x4D59 = "Thou Art Dead", Pulse-1
0x4D5A to 0x4D7C = Cursed!, Pulse-2
0x4D5B to 0x4D7C = Cursed!, Pulse-1
0x4D7D to 0x4E4C = Title Theme, Pulse-1
0x4E4D to 0x4F15 = Title Theme, Pulse-2
0x4F16 to 0x4F71 = Title Theme, Triangle
0x4F72 to 0x50C1 = Ending Theme, Pulse-1
0x50C2 to 0x523D = Ending Theme, Pulse-2
0x523E to 0x5363 = Ending Theme, Triangle


727-8E8 Breconary
==Text==
0x03DDC to 0x03FD9 = Title Screen data (See [[#Title_Screen_End_Credits_Data_Format|Title Screen / End Credits Data Format]])
0x0549D to 0x0595E = End Credits
0x05DDD to 0x05E58 = Chest data (See [[#Chest_Data_Format|Chest Data Format]])
0x06842 = Spell list pointer
0x06844 = Item list part 1, line 1 pointer
0x06846 = Item list part 1, line 2 pointer
0x06848 = Item list part 2, line 1 pointer
0x0684A = Item list part 2, line 2 pointer
0x0684C = Price list pointer
0x0684E = Monster list, line 1 pointer
0x06850 = Monster list, line 2 pointer
0x06F7C to 0x06FBF = Menu pointers
0x06FC0 to 0x0752C = Menu text (See [[#Menu_Format|Menu Format]])
0x07AC7 to 0x07B9E = Item list part 1, line 1 text
0x07B9F to 0x07BC6 = Item list part 2, line 1 text
0x07BC7 to 0x07C5E = Item list part 1, line 2 text
0x07C5F to 0x07C7F = Item list part 2, line 2 text
0x07C80 to 0x07DB1 = Monster list, line 1 text
0x07DB2 to 0x07E1D = Monster list, line 2 text
0x07E1E to 0x07E65 = Price list values (2 byte little endian)
0x07E66 to 0x07EAE = Spell list text
0x08012 to 0x08037 = Dialogue pointers
0x08038 to 0x0BCBF = Dialogue text


8E9-AAA Cantlin
==Other==
0x01C9F to 0x01D62 = Graphic layout data for the overworld fight background
0x01D63 to 0x01D6C = MP Requirements for the ten Magic Spells
0x01D6D to 0x02662 = Overworld map (RLE encoded by nibbles, 1st nibble is tile, 2nd how many - 1)
{{note|The overworld map uses a strange system of pointers/auto-adjusts for offsetting the land
from the start of the row. It can't be viewed simply by working out the RLE runs.}}
0x031BE to 0x031DB = [[Dragon Warrior:Music Pointers|Music Pointers]] (See [[#Song_Bytes|Song Bytes]])
0x0F3D8 to 0x0F471 = Warp data (Stairs Down)
0x0F472 to 0x0F50B = Warp data (Stairs Up)
0x10010 to 0x1400F = Game graphics
{{note|Much of the first CHR bank (0x10010 to 0x1056F, used for the title screen, final battle, and end credits) stores 2 different overlapping 1bpp graphics; palette changes make either one set of graphics or the other visible at a time.}}


AAB-B72 Garinham
==Graphics==
===Sprite Tile Definitions===
Tile definitions for Townspeople/Hero Sprites: 0x1344


B73-D34 Rimuldar
For the four tiles that make up the sprite (Top-left, Top-right, Bottom-left, Bottom-right), contains tile number byte, tile attributes byte (palette number 0x00-0x03, horizontal flip +0x40) for 8 bytes total.
====Shrines====
D35-D66 Sunlight Shrine


D67-D98 Rain Shrine
To calculate the sprite number, add these bits:
* Direction: 0x00 Facing Up, 0x20 Facing Right, 0x40 Facing Down, 0x60 Facing Left
* Animation Frame: 0x00 or 0x01
* Character:
** 0x00 = Man
** 0x02 = Adventurer
** 0x04 = Guard
** 0x06 = Merchant
** 0x08 = King Lorik (always facing Down)
** 0x0A = Old Man
** 0x0C = Woman
** 0x0D = Ending Guard with Trumpet (always facing Right)
** 0x10 = Hero (No equipment)
** 0x12 = Hero (Sword only)
** 0x14 = Hero (Shield only)
** 0x16 = Hero (Sword + Shield)
** 0x18 = Hero (Carrying Gwaelin)
** 0x1A = Princess Gwaelin
** 0x1C = Dragonlord
** 0x1E = Ending Guard with Trumpet (always facing Left)


D99-DCA Rainbow Shrine
Multiply sprite number by 8 and add to base address 0x1344.
====Dragonlord Cavern====
DCB-E92 Dragonlord Cavern B1


E93-EC4 Dragonlord Cavern B2
For example, Tile Definitions for "Hero (Sword + Shield) facing Down" = 0x1344 + 8 * (0x16 + 0x40) = 0x15F4


EC5-EF6 Dragonlord Cavern B3
Gwaelin and Dragonlord normally do not face left, so they have glitched data in there.


EF7-F28 Dragonlord Cavern B4
==Data Formats==
===<span id="Metadata_Format"></span>Metadata Format===
Metadata entries are {{hex|5}} bytes long:
01 = Pointer to map data
02 = Pointer to map data
03 = X size
04 = Y size
05 = Border tile


F29-F5A Dragonlord Cavern B5
===<span id="Song_Bytes"></span>Song Bytes===
Song bytes are in the same order as maps.
(Byte {{hex|1}} plays for map 1, byte {{hex|2}} plays for map 2, etc.)
00 = Nothing
01 = Title Fanfare
02 = Throne Room
03 = Castle
04 = Town
05 = Overworld
06 = Cave 1
07 = Cave 2
08 = Cave 3
09 = Cave 4
0A = Cave 5
0B = Cave 6
0C = Cave 7
0D = Cave 8
0E = Battle
0F = Dragonlord
10 = End Theme
11 = Silver Harp
12 = Fairy Flute
13 = Rainbow Drop
14 = Death
15 = Inn Rest
16 = Princess Gwaelin
17 = Curse
18 = Battle (without intro)
19 = Victory
1A = Level Up


F5B-F8C Dragonlord Cavern B6
===<span id="Title_Screen_End_Credits_Data_Format"></span>Title Screen / End Credits Data Format===
====Other Caves====
String format is 2 byte PPU address followed by the bytes to write to that address, terminated by $FC.
F8D-FE6 Rimuldar Passage
Both the title screen and the end credits use a slightly different table from the rest of the game with:
60=!
61=.
62=©
63=-
FC=[end of string]
/FD=[end of screen]


FE7-1048 Cave west of Tangerel B1
Control code {{hex|F7}} takes 2 byte parameters (let's call them A and B) and means "repeat byte B A times" so e.g. {{hex|F7 08 05}} results in writing {{hex|05 05 05 05 05 05 05 05}} to the PPU.


1049-10AA Cave west of Tangerel B2


10AB-1172 Garin's Grave B1
===<span id="Chest_Data_Format"></span>Chest Data Format===
Chest data entries are {{hex|5}} bytes long:
01 = Map number
02 = X coordinate
03 = Y coordinate
04 = Chest contents


1173-123A Garin's Grave B3
===<span id="Menu_Format"></span>Menu Format===
Menu string format is menu setup parameters + menu text, where the menu setup parameters are:
* 1 byte menu type: bit 7 controls whether the menu has a cursor (1) or not (0), bit 5 controls line spacing (1 = single spacing, 0 = double spacing); the game code also checks bit 6 which then requires 1 extra setup parameter when set, but no menu ever sets bit 6
* 1 byte menu height: total height is this number of tiles x 2
* 1 byte menu width: number of tiles x 1
* 1 byte menu screen position: high nybble sets vertical position x 2, low nybble sets horizontal position x 2
If the menu has a cursor, then an additional two parameters are present:
* 1 byte horizontal offset of second column cursor position relative to left edge of menu
* 1 byte initial cursor position relative to top left menu corner; high nybble sets vertical position x 1, low nybble sets horizontal position x 1
The menu text uses a slightly different table from the rest of the game with (highlight to see trailing spaces):
80=[newline]
81=
82= 
83= 
84=   
85=   
86=     
87=     
and lots of other control codes for each of the different data to display.
{{note|There is no dedicated end token for menu text; the game keeps printing data until the menu space (width x height as modified by line spacing) has been completely filled!}}


123B-136C Garin's Grave B4
{{Internal Data}}
 
126D-12C0 Garin's Grave B2
 
12C1-12F2 Eldrick's Cave B1
 
12F3-1324 Eldrick's Cave B2
 
==Music==
31BE-31DB What music plays on what map (Note 2)
 
== Other ==
* <tt>1C9F-1D62</tt> - Graphic layout data for the overworld fight background.
* <tt>3F30-3FB8</tt> - Title screen data.
* <tt>549F-58D9</tt> - Ending text.
* <tt>6FC7-752B</tt> - Menu text.
* <tt>7AC0-7EAD</tt> - Item, enemy, and spell menu text.
* <tt>8039-BCBA</tt> - Dialogue text.
 
== Notes ==
1. Each header has five bytes
 
01 = Pointer to Map
 
02 = Pointer to Map
 
03 = X
 
04 = Y
 
05 = Border Tile
 
2. Song bytes are in the same order as maps (byte 1 plays for map 1, byte 2 plays for map 2 etc.)
00 = Nothing
 
01 = Title Fanfare
 
02 = Throne Room
 
03 = Castle
 
04 = Town
 
05 = Overworld
 
06 = Cave 1
 
07 = Cave 2
 
08 = Cave 3
 
09 = Cave 4
 
0A = Cave 5
 
0B = Cave 6
 
0C = Cave 7
 
0D = Cave 8
 
0E = Battle Music
 
0F = Dragonlord
 
10 = End Theme
 
11 = Silver harp
 
12 = Fairy flute
 
13 = Rainbow drop
 
14 = Death
 
15 = Inn rest
 
16 = Princess Gwaelin
 
17 = Curse
 
18 = Battle without intro
 
19 = Battle victory
 
1A = Level up

Latest revision as of 04:57, 18 April 2024

Chip tiny.png The following article is a ROM map for Dragon Warrior.

Miscellaneous

0x00000 to 0x0000F = iNES header
0x0002A to 0x000C0 = Map metadata (See Metadata Format)

Maps

Castles

0x000C1 to 0x00188 = Charlock Castle
0x00189 to 0x00250 = Hauksness Ruins
0x00251 to 0x00412 = Tantegel Castle
0x00413 to 0x00444 = Tantegel Throne Room
0x00445 to 0x00606 = Dragonlord's Throne Room

Towns

0x00607 to 0x00726 = Kol
0x00727 to 0x008E8 = Brecconary
0x008E9 to 0x00AAA = Cantlin
0x00AAB to 0x00B72 = Garinham
0x00B73 to 0x00D34 = Rimuldar

Shrines

0x00D35 to 0x00D66 = Sunlight Shrine
0x00D67 to 0x00D98 = Rain Shrine
0x00D99 to 0x00DCA = Rainbow Shrine

Dragonlord Cavern

0x00DCB to 0x00E92 = Dragonlord Cavern B1
0x00E93 to 0x00EC4 = Dragonlord Cavern B2
0x00EC5 to 0x00EF6 = Dragonlord Cavern B3
0x00EF7 to 0x00F28 = Dragonlord Cavern B4
0x00F29 to 0x00F5A = Dragonlord Cavern B5
0x00F5B to 0x00F8C = Dragonlord Cavern B6

Other Caves

0x00F8D to 0x00FE6 = Rimuldar Passage
0x00FE7 to 0x01048 = Cave west of Tantegel B1
0x01049 to 0x010AA = Cave west of Tantegel B2
0x010AB to 0x01172 = Garin's Grave B1
0x01173 to 0x0123A = Garin's Grave B3
0x0123B to 0x0136C = Garin's Grave B4
0x0126D to 0x012C0 = Garin's Grave B2
0x012C1 to 0x012F2 = Erdrick's Cave B1
0x012F3 to 0x01324 = Erdrick's Cave B2

Music Data

0x44DB to 0x44DD = Silence, Pulse-1 & Pulse-2 
0x44DE to 0x44E2 = Silence, Triangle 
0x44E3 to 0x454D = Throne Room, Pulse-1 
0x454E to 0x45B9 = Throne Room, Triangle 
0x45BA to 0x45C3 = Courtyard, Pulse-1 
0x45C4 to 0x4639 = Courtyard, Triangle 
0x463A to 0x464F = Level-Up, Pulse-1 
0x4650 to 0x4662 = Level-Up, Pulse-2 
0x4663 to 0x468A = Gwaelin's Love, Pulse-1 
0x468B to 0x46BB = Gwaelin's Love, Pulse-2
0x46BD to 0x46DB = Gwaelin's Love, Triangle 
0x46DC to 0x46FA = Inn, Pulse-1
0x46FB to 0x4716 = Inn, Pulse-2
0x4717 to 0x471D = Battle Over, Pulse-2 
0x471E to 0x473E = Battle Over, Pulse-1 
0x473F to 0x47B1 = Town, Pulse-1 
0x47B2 to 0x4826 = Town, Triangle
0x4827 to 0x4853 = Overworld, Triangle
0x4854 to 0x489A = Overworld, Pulse-1
0x489B to 0x492C = Caverns #1-8, Pulse-1
0x492D to 0x49B8 = Cavern #1, Triangle
0x4934 to 0x49B8 = Cavern #2, Triangle
0x493B to 0x49B8 = Cavern #3, Triangle
0x4942 to 0x49B8 = Cavern #4, Triangle
0x4947 to 0x49B8 = Cavern #5, Triangle
0x494E to 0x49B8 = Cavern #6, Triangle
0x4955 to 0x49B8 = Cavern #7, Triangle
0x495C to 0x49B8 = Cavern #8, Triangle
0x49B9 to 0x4ADE = Battle Theme, Pulse-1 
0x49CF to 0x4ADE = Battle Theme (sans intro), Pulse-1
0x4ADF to 0x4B71 = Battle Theme, Triangle
0x4AF1 to 0x4B71 = Battle Theme (sans intro), Triangle 
0x4B72 to 0x4BF5 = Final Battle, Pulse-1 
0x4BF6 to 0x4C29 = Final Battle, Pulse-2
0x4C2A to 0x4C4D = Final Battle, Triangle 
0x4C4E to 0x4CA9 = Silver Harp, Pulse-2
0x4C4F to 0x4CA9 = Silver Harp, Pulse-2
0x4CAA to 0x4CF0 = Fairy Flute, Triangle 
0x4CF1 to 0x4D32 = Rainbow Drop, Pulse-2
0x4CF2 to 0x4D32 = Rainbow Drop, Pulse-1
0x4D33 to 0x4D59 = "Thou Art Dead", Pulse-2
0x4D34 to 0x4D59 = "Thou Art Dead", Pulse-1
0x4D5A to 0x4D7C = Cursed!, Pulse-2
0x4D5B to 0x4D7C = Cursed!, Pulse-1
0x4D7D to 0x4E4C = Title Theme, Pulse-1
0x4E4D to 0x4F15 = Title Theme, Pulse-2
0x4F16 to 0x4F71 = Title Theme, Triangle
0x4F72 to 0x50C1 = Ending Theme, Pulse-1
0x50C2 to 0x523D = Ending Theme, Pulse-2
0x523E to 0x5363 = Ending Theme, Triangle

Text

0x03DDC to 0x03FD9 = Title Screen data (See Title Screen / End Credits Data Format)
0x0549D to 0x0595E = End Credits
0x05DDD to 0x05E58 = Chest data (See Chest Data Format)
0x06842 = Spell list pointer
0x06844 = Item list part 1, line 1 pointer
0x06846 = Item list part 1, line 2 pointer
0x06848 = Item list part 2, line 1 pointer
0x0684A = Item list part 2, line 2 pointer
0x0684C = Price list pointer
0x0684E = Monster list, line 1 pointer
0x06850 = Monster list, line 2 pointer
0x06F7C to 0x06FBF = Menu pointers
0x06FC0 to 0x0752C = Menu text (See Menu Format)
0x07AC7 to 0x07B9E = Item list part 1, line 1 text
0x07B9F to 0x07BC6 = Item list part 2, line 1 text
0x07BC7 to 0x07C5E = Item list part 1, line 2 text
0x07C5F to 0x07C7F = Item list part 2, line 2 text
0x07C80 to 0x07DB1 = Monster list, line 1 text
0x07DB2 to 0x07E1D = Monster list, line 2 text
0x07E1E to 0x07E65 = Price list values (2 byte little endian)
0x07E66 to 0x07EAE = Spell list text
0x08012 to 0x08037 = Dialogue pointers
0x08038 to 0x0BCBF = Dialogue text

Other

0x01C9F to 0x01D62 = Graphic layout data for the overworld fight background
0x01D63 to 0x01D6C = MP Requirements for the ten Magic Spells
0x01D6D to 0x02662 = Overworld map (RLE encoded by nibbles, 1st nibble is tile, 2nd how many - 1)
Note for template.png
Note:
The overworld map uses a strange system of pointers/auto-adjusts for offsetting the land from the start of the row. It can't be viewed simply by working out the RLE runs.
0x031BE to 0x031DB = Music Pointers (See Song Bytes)
0x0F3D8 to 0x0F471 = Warp data (Stairs Down)
0x0F472 to 0x0F50B = Warp data (Stairs Up)
0x10010 to 0x1400F = Game graphics
Note for template.png
Note:
Much of the first CHR bank (0x10010 to 0x1056F, used for the title screen, final battle, and end credits) stores 2 different overlapping 1bpp graphics; palette changes make either one set of graphics or the other visible at a time.


Graphics

Sprite Tile Definitions

Tile definitions for Townspeople/Hero Sprites: 0x1344

For the four tiles that make up the sprite (Top-left, Top-right, Bottom-left, Bottom-right), contains tile number byte, tile attributes byte (palette number 0x00-0x03, horizontal flip +0x40) for 8 bytes total.

To calculate the sprite number, add these bits:

  • Direction: 0x00 Facing Up, 0x20 Facing Right, 0x40 Facing Down, 0x60 Facing Left
  • Animation Frame: 0x00 or 0x01
  • Character:
    • 0x00 = Man
    • 0x02 = Adventurer
    • 0x04 = Guard
    • 0x06 = Merchant
    • 0x08 = King Lorik (always facing Down)
    • 0x0A = Old Man
    • 0x0C = Woman
    • 0x0D = Ending Guard with Trumpet (always facing Right)
    • 0x10 = Hero (No equipment)
    • 0x12 = Hero (Sword only)
    • 0x14 = Hero (Shield only)
    • 0x16 = Hero (Sword + Shield)
    • 0x18 = Hero (Carrying Gwaelin)
    • 0x1A = Princess Gwaelin
    • 0x1C = Dragonlord
    • 0x1E = Ending Guard with Trumpet (always facing Left)

Multiply sprite number by 8 and add to base address 0x1344.

For example, Tile Definitions for "Hero (Sword + Shield) facing Down" = 0x1344 + 8 * (0x16 + 0x40) = 0x15F4

Gwaelin and Dragonlord normally do not face left, so they have glitched data in there.

Data Formats

Metadata Format

Metadata entries are 5 bytes long:

01 = Pointer to map data
02 = Pointer to map data
03 = X size
04 = Y size
05 = Border tile

Song Bytes

Song bytes are in the same order as maps. (Byte 1 plays for map 1, byte 2 plays for map 2, etc.)

00 = Nothing
01 = Title Fanfare
02 = Throne Room
03 = Castle
04 = Town
05 = Overworld
06 = Cave 1
07 = Cave 2
08 = Cave 3
09 = Cave 4
0A = Cave 5
0B = Cave 6
0C = Cave 7
0D = Cave 8
0E = Battle
0F = Dragonlord
10 = End Theme
11 = Silver Harp
12 = Fairy Flute
13 = Rainbow Drop
14 = Death
15 = Inn Rest
16 = Princess Gwaelin
17 = Curse
18 = Battle (without intro)
19 = Victory
1A = Level Up

Title Screen / End Credits Data Format

String format is 2 byte PPU address followed by the bytes to write to that address, terminated by $FC. Both the title screen and the end credits use a slightly different table from the rest of the game with:

60=!
61=.
62=©
63=-
FC=[end of string]
/FD=[end of screen]

Control code F7 takes 2 byte parameters (let's call them A and B) and means "repeat byte B A times" so e.g. F7 08 05 results in writing 05 05 05 05 05 05 05 05 to the PPU.


Chest Data Format

Chest data entries are 5 bytes long:

01 = Map number
02 = X coordinate
03 = Y coordinate
04 = Chest contents

Menu Format

Menu string format is menu setup parameters + menu text, where the menu setup parameters are:

  • 1 byte menu type: bit 7 controls whether the menu has a cursor (1) or not (0), bit 5 controls line spacing (1 = single spacing, 0 = double spacing); the game code also checks bit 6 which then requires 1 extra setup parameter when set, but no menu ever sets bit 6
  • 1 byte menu height: total height is this number of tiles x 2
  • 1 byte menu width: number of tiles x 1
  • 1 byte menu screen position: high nybble sets vertical position x 2, low nybble sets horizontal position x 2

If the menu has a cursor, then an additional two parameters are present:

  • 1 byte horizontal offset of second column cursor position relative to left edge of menu
  • 1 byte initial cursor position relative to top left menu corner; high nybble sets vertical position x 1, low nybble sets horizontal position x 1

The menu text uses a slightly different table from the rest of the game with (highlight to see trailing spaces):

80=[newline]
81= 
82=  
83=   
84=    
85=     
86=      
87=       

and lots of other control codes for each of the different data to display.

Note for template.png
Note:
There is no dedicated end token for menu text; the game keeps printing data until the menu space (width x height as modified by line spacing) has been completely filled!