Table of Contents

Levels

Each level loads a struct of areas using function 0x800F78E4. The game uses this structure to find the pointer to the current area in the main stage table. Its located at 0x800be500.

Note: when used to select levels its bytes, but its stored in ram as words.

struct Level
{
/*0X0*/ u8    World;
/*0X1*/ u8    Level;
/*0X2*/ u8    Area;
/*0X3*/ u8    NodeNum;
};

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.


Level List

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   levelType;        // See the next table
  /*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
};

The `levelType` field can be one of these values:

Value Description
0 “Normal” gameplay
1 DDD/Adeleine Boss (1-2-6,1-3-9)
2 End of World Boss
3 End of stage (carpet with prizes)
4 Ride water on log/Log Flume(3-2-4)
5 Ride sled(5-1-3)
6 Minecart stage (4-2-2)
7 unused
8 Ride DDD (4-4-3,2-2-6,5-4-3)
9 0-2 Boss (7-1-3)
10 MiniBoss (enlarged enemy)

Level List Locations

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

LEVEL LOCATION TABLE
StageRAM AddressROM Address
1-1 0x800D01A4 0x783F4
1-2 0x800D027C 0x784CC
1-3 0x800D039C 0x785EC
1-4 0x800D0528 0x78778
2-1 0x800D0570 0x787C0
2-2 0x800D066C 0x788BC
2-3 0x800D078C 0x789DC
2-4 0x800D08F4 0x78B44
2-5 0x800D0A5C 0x78CAC
3-1 0x800D0AA4 0x78CF4
3-2 0x800D0BC4 0x78E14
3-3 0x800D0CE4 0x78F34
3-4 0x800D0E28 0x79078
3-5 0x800D0F48 0x79198
4-1 0x800D0F90 0x791E0
4-2 0x800D10B0 0x79300
4-3 0x800D11F4 0x79444
4-4 0x800D12F0 0x79540
4-5 0x800D1434 0x79684
5-1 0x800D147C 0x796CC
5-2 0x800D159C 0x797EC
5-3 0x800D16BC 0x7990C
5-4 0x800D1824 0x79A74
5-5 0x800D1968 0x79BB8
6-1 0x800D19B0 0x79C00
6-2 0x800D1A64 0x79CB4
6-3 0x800D1B84 0x79DD4
6-4 0x800D1D58 0x79FA8
7-1 0x800D1DA0 0x79FF0
7-2 0x800D1E30 0x7A080
7-3 0x800D1E9C 0x7A0EC
7-4 0x800D1EE4 0x7A134

See also