Overlay Tables
Contents
Particle Overlay Table
The particle overlay table manages the particle effect files (overlays). It defines a particle effect's id, maps the particle's code to a virtual address, and during gameplay is used to find the overlay in ram
Format
xxxxxxxx yyyyyyyy aaaaaaaa bbbbbbbb
rrrrrrrr pppppppp ????????
- x y: Start/End Virtual Rom addresses of the particle effect's file
- a b: Start/End Virtual Ram addresses of the particle effect's file
- r: Ram address of the overlay, when loaded into ram. Set to 0 in Rom
- p: ?, possibly a pointer to the initialization routine
- ?: Unknown, set to 0x01000000 in Rom
Actor Overlay Table
The actor table manages the actor files (overlays). It defines an actor's number, maps the actor to a virtual address, and during gameplay is used to find the overlay in ram.
Format
xxxxxxxx yyyyyyyy aaaaaaaa bbbbbbbb
rrrrrrrr iiiiiiii nnnnnnnn vvvvcc00
This breaks down into-
x y: Start/End Virtual Rom addresses of the actor file
a b: Start/End Virtual Ram addresses of the actor file
r: Ram address of actor file (00000000 if overlay isn't loaded, or if in ROM)
i: Virtual Ram address of the start of the actor instance initialization variables, located within the file
n: Address of actor filename (Debug ROM only, value is 0 in commercial releases)
v: Allocation Type, affects how overlay is allocated. See below for values
c: Number of actor instances of this type currently loaded (ram only)
Allocation Type Values
00 performs a "low to high" address allocation (high address volatility), unloading the overlay if no instances of that actor exist
01 performs a "high to low" address allocation (low address volatility), reserving a fixed space for all overlays of this type until the scene is destructed. Only one overlay of this type can ever be loaded at once.
The pointer to this space is located at Game Play + 0x1C60
02 performs a "high to low" address allocation (low address volatility), keeping the overlay in ram until the scene is destructed
Note: The record for Link's actor in rom (the first record in the table) only sets the vram address that points to the start of the variable info for Link's actor, and the actor file name pointer if it's the Debug Rom.
Game State
Version | Offset | VRom | VRam | ||
---|---|---|---|---|---|
Debug | 1029D0 | 00B969D0 | 00B96AF0 | 8011F830 | 8011F950 |
NTSC 1.0 | 0E02A0 | 00B672A0 | 00B673C0 | 800F1340 | 800F1460 |
PAL MQ | 0DD290 | 00B65290 | 00B653B0 | 800EE190 | 800EE2B0 |
This table defines the top-level states the game can execute in (Map Select, Boot Logo, the playable game itself, etc.), and reserves variable space for each state
Format
/* 0x00 */ uint RamStart; //location of overlay in ram, or 0 in rom /* 0x04 */ int VRomStart; //if applicable /* 0x08 */ int VRomEnd; //if applicable /* 0x0C */ int VRamStart; //if applicable /* 0x10 */ int VRamEnd; //if applicable /* 0x14 */ uint unknown2; /* 0x18 */ ptr VRamInitialization; //initializes and executes the given context /* 0x1C */ ptr VRamDeconstructor; //"deconstructs" the context, and sets the next context to load /* 0x20-0x2B */ //unknown /* 0x2C */ int AllocateSize; //Size of initialized instance of the overlay
Debug Rom
VRom Start | VRom End | VRam Start | VRam End | VRam Initialization |
VRam Deconstructor |
Instance Variables |
File | Description |
---|---|---|---|---|---|---|---|---|
00000000 | 00000000 | 00000000 | 00000000 | 800C4104 | 800C40FC | 000000A4 | N/A | |
00BCFAC0 | 00BD2B20 | 80800B90 | 80803BF0 | 80801E44 | 80801E0C | 00000240 | ovl_select | Map Select |
00BCEF30 | 00BCFAC0 | 80800000 | 80800B90 | 80800878 | 80800858 | 000001E8 | ovl_title | Nintendo Logo (on Boot) |
00000000 | 00000000 | 00000000 | 00000000 | 800BCA64 | 800BC8EC | 00012518 | game_play | Main Game |
00BD2B20 | 00BD2C70 | 80803BF0 | 80803D40 | 80803CAC | 80803CA4 | 000001D0 | ovl_opening | Initializes the game into the title screen |
00BD2C70 | 00BE2730 | 80803D40 | 80813820 | 80811A20 | 80811A18 | 0001CAE0 | ovl_file_choose | File Select |
NTSC 1.0
VRom Start | VRom End | VRam Start | VRam End | VRam Initialization |
VRam Deconstructor |
Instance Variables |
File | Description |
---|---|---|---|---|---|---|---|---|
00000000 | 00000000 | 00000000 | 00000000 | 800A0748 | 800A073C | 000000A4 | N/A | |
00B9E400 | 00BA1160 | 808009C0 | 80803720 | 80801C14 | 80801C08 | 00000240 | ovl_select | Map Select |
00B9DA40 | 00B9E400 | 80800000 | 808009C0 | 808007B0 | 80800750 | 000001E8 | ovl_title | Nintendo Logo (on Boot) |
00000000 | 00000000 | 00000000 | 00000000 | 8009A750 | 8009A5C0 | 00012518 | game_play | Main Game |
00BA1160 | 00BA12C0 | 80803720 | 80803880 | 808037E8 | 808037DC | 000001D0 | ovl_opening | Initializes the game into the title screen |
00BA12C0 | 00BB11E0 | 80803880 | 808137C0 | 80812394 | 80812388 | 0001CAD0 | ovl_file_choose | File Select |
PAL MQ
VRom Start | VRom End | VRam Start | VRam End | VRam Initialization |
VRam Deconstructor |
Instance Variables |
File | Description |
---|---|---|---|---|---|---|---|---|
00000000 | 00000000 | 00000000 | 00000000 | 800A02D8 | 800A02CC | 000000A4 | N/A | |
00B8AA80 | 00B8D700 | 80800850 | 808034D0 | 80801A40 | 80801A34 | 00000240 | ovl_select | Map Select |
00B8A230 | 00B8AA80 | 80800000 | 80800850 | 808006C0 | 808006A0 | 000001E8 | ovl_title | Nintendo Logo (on Boot) |
00000000 | 00000000 | 00000000 | 00000000 | 8009A4CC | 8009A360 | 00012518 | game_play | Main Game |
00B8D700 | 00B8D860 | 808034D0 | 80803630 | 80803598 | 8080358C | 000001D0 | ovl_opening | Initializes the game into the title screen |
00B8D860 | 00B9C470 | 80803630 | 80812260 | 80810C54 | 80810C48 | 0001CAE0 | ovl_file_choose | File Select |
ovl_map_mark_data Overlay
Version | Offset | VRom | VRam | ||
---|---|---|---|---|---|
Debug | 103298 | 00B97298 | 00B972B0 | 801200F8 | 80120110 |
NTSC 1.0 | 0E0B58 | 00B67B58 | 00B67B70 | 800F1BF8 | 800F1C10 |
USA MQ | 0E01E8 | 00B661E8 | 00B66200 | 800F10C8 | 800F10E0 |
PAL MQ | 0DDB48 | 00B65B48 | 00B65B60 | 800EEA48 | 800EEA60 |
Format
/* 0x00 */ void* RamStart; // 0 in rom, or when not loaded /* 0x04 */ int VRomStart; /* 0x08 */ int VRomEnd; /* 0x0C */ int VRamStart; /* 0x10 */ int VRamEnd; /* 0x14 */ void** DungeonMarkData; //Points to array storing start of data for dungeons 0-9
Pause/Player Overlays
Version | Offset | VRom | VRam | ||
---|---|---|---|---|---|
Debug | 110340 | 00BA4340 | 00BA4378 | 8012D1A0 | 8012D1D8 |
NTSC 1.0 | 0ED3E0 | 00B743E0 | 00B74418 | 800FE480 | 800FE4B8 |
PAL MQ | 0EA3E0 | 00B723E0 | 00B72418 | 800FB2E0 | 800FB318 |
To conserve ram, the pause screen and player overlays are loaded into the same start location on the heap.
Format
rrrrrrrr xxxxxxxxx yyyyyyyy aaaaaaaa
bbbbbbbb ???????? ffffffff
- r = Ram Start, when loaded, or 0 in Rom
- x = VRom Start
- y = VRom End
- a = VRam Start
- b = VRam End
- ? = ?, 0 in rom
- f = Ram location of file name
Debug Rom
VRom Start | VRom End | VRam Start | VRam End | Ram Filename | File | Description |
---|---|---|---|---|---|---|
00BE2730 | 00C010B0 | 80813820 | 80832210 | 80143E10 | ovl_kaleido_scope | Pause Screen |
00C010B0 | 00C27940 | 80832210 | 80858B70 | 80143E20 | ovl_player_actor | Link |
NTSC 1.0
VRom Start | VRom End | VRam Start | VRam End | Ram Filename | File | Description |
---|---|---|---|---|---|---|
00BB11E0 | 00BCDB70 | 808137C0 | 808301C0 | 80108CA0 | ovl_kaleido_scope | Pause Screen |
00BCDB70 | 00BF40D0 | 808301C0 | 808567F0 | 80108CB0 | ovl_player_actor | Link |
PAL MQ
VRom Start | VRom End | VRam Start | VRam End | Ram Filename | File | Description |
---|---|---|---|---|---|---|
00B9C470 | 00BB8E30 | 80812260 | 8082EC90 | 801056A0 | ovl_kaleido_scope | Pause Screen |
00BB8E30 | 00BDF540 | 8082EC90 | 80855470 | 801056B0 | ovl_player_actor | Link |