Hack64 Wiki
Other Titles
Hack64 Wiki
Other Titles
This is an old revision of the document!
Each level loads a struct of areas using function 0x800F78E4. I uses this structure to find the pointer to the current area in the main stage table.
Level struct (800be500): { /*0X0*/ U32 WORLD /*0X4*/ U32 LEVEL /*0X8*/ U32 AREA /*0XC*/ U32 WARP/DIRECTION }
The pointer to the main stage table is gotten by using this formula:
WORLD*48+LEVEL*4 loaded from offset 0x800d1f98(table of ptrs)
Each Area is then just an additional 0x24 from that level pointer.
The table at 0x000783F4 in ROM (0x800D01A4 in RAM) references data for each stage in the game. For each stage there is an array of area structs. Each array is terminated with an empty struct.
struct StageArea { /*0x00*/ u32 liGeoBlockA; // List-index of primary Geometry Block /*0x04*/ u32 liGeoBlockB; // List-index of secondary Geometry Block /*0x08*/ u16 skyboxId; // Skybox ID /*0x0A*/ u16 background color; // BG color (loaded from color table at 800D478C) /*0x0C*/ int musicId; // Music ID /*0x10*/ u32 biAreaSetup; // Bank-index of area stup block /*0x14*/ u16 Death Camera; // Determines how far the camera follows kirby when falling into void/death /*0x16*/ u16 unk16; // Cutscene related? /*0x18*/ u32 biDustSettings; // Bank-index of Dust particle settings /*0x1C*/ u32 biDustImg; // Bank-index of Dust particle image /*0x20*/ char *areaName; // Pointer to developer ASCII level name };
These are the locations of each level in RAM and ROM. Each area in these levels goes in sequential order. Meaning to get to Level 1-1 Area 2 you need to add 0x24 to 0x800d01a4.
The Table that has these locations is located at 0x7A1E8 in the ROM and 0x800d1f98 in RAM
* World 1-1: 0x800D01A4 World 1-2: 0x800D027C World 1-3: 0x800D039C World 1-4: 0x800D0528 World 1-5: 0x * World 2-1: 0x800D0570 World 2-2: 0x800D066C World 2-3: 0x800D078C World 2-4: 0x800D08F4 World 2-5: 0x800D0A5C * World 3-1: 0x800D0AA4 World 3-2: 0x800D0BC4 World 3-3: 0x800D0CE4 World 3-4: 0x800D0E28 World 3-5: 0x800D0F48 * World 4-1: 0x800D0F90 World 4-2: 0x800D10B0 World 4-3: 0x800D11F4 World 4-4: 0x800D12F0 World 4-5: 0x800D1434 * World 5-1: 0x800D147C World 5-2: 0x800D159C World 5-3: 0x800D16BC World 5-4: 0x800D1824 World 5-5: 0x800D1968 * World 6-1: 0x800D19B0 World 6-2: 0x800D1A64 World 6-3: 0x800D1B84 World 6-4: 0x800D1D58 World 6-5: 0x * World 7-1: 0x800D1DA0 World 7-2: 0x800D1E30 World 7-3: 0x800D1E9C World 7-4: 0x800D1EE4 World 7-5: 0x
* World 1-1: 0x783F4 World 1-2: 0x784CC World 1-3: 0x785EC World 1-4: 0x78778 World 1-5: 0x * World 2-1: 0x787C0 World 2-2: 0x788BC World 2-3: 0x789DC World 2-4: 0x78B44 World 2-5: 0x78CAC * World 3-1: 0x78CF4 World 3-2: 0x78E14 World 3-3: 0x78F34 World 3-4: 0x79078 World 3-5: 0x79198 * World 4-1: 0x791E0 World 4-2: 0x79300 World 4-3: 0x79444 World 4-4: 0x79540 World 4-5: 0x79684 * World 5-1: 0x796CC World 5-2: 0x797EC World 5-3: 0x7990C World 5-4: 0x79A74 World 5-5: 0x79BB8 * World 6-1: 0x79C00 World 6-2: 0x79CB4 World 6-3: 0x79DD4 World 6-4: 0x79FA8 World 6-5: 0x * World 7-1: 0x79FF0 World 7-2: 0x7A080 World 7-3: 0x7A0EC World 7-4: 0x7A134 World 7-5: 0x