# Initialization * Game starts at XXX * ... * Calls `LoadFirstLevel` (PRG15_MIRROR: 0xDE67) * Call `Player_SetInitialState` (PRG15_MIRROR: 0xE0AA) * Set initial player health to 16 # Banks | Bank | Purposes | | ---- | ------------ | | 4 | Tile data | | 8 | ? | | 11 | Palette data | # Level Information ## AREA_ROM_BANKS (0xDF34) Translation table for mapping `CurrentArea` (RAM 0x24) to ROM banks. | CurrentArea | ROM Bank | | ----------- | -------- | | 0 | 0 | | 1 | 1 | | 2 | 0 | | 3 | 0 | | 4 | 2 | | 5 | 1 | | 6 | 2 | | 7 | 2 | ## AREA_BANK_TO_BLOCK_PROPS_TABLE (0xDF3C) Translation table for mapping `CurrentArea `(RAM 0x24) to `TilesIndex` (RAM 0x95). | CurrentArea | TilesIndex | | ----------- | ---------- | | 0 | 0 | | 1 | 2 | | 2 | 3 | | 3 | 5 | | 4 | 6 | | 5 | 1 | | 6 | 4 | | 7 | 4 | ## AREA_TO_MUSIC_TABLE (0xDF5C - 0xDF63) Translation table for mapping `CurrentArea` (RAM 0x24) to `CurrentMusic` (RAM 0xFA). | CurrentArea | CurrentMusic | | ----------- | ------------ | | 0 | 7 | | 1 | 3 | | 2 | 5 | | 3 | 9 | | 4 | 9 | | 5 | 4 | | 6 | 2 | | 7 | 16 | ## TILE_INDEX_TO_ADDR **Location:** PRG15_MIRROR: 0xCF07 - 0xCF17 Translation table for mapping `TilesIndex` to addresses. | TileIndex | Address | Areas | | --------- | ------- | -------------------------- | | 0 | 0x8000 | First town | | 1 | 0x9800 | Tree world | | 2 | 0x8800 | Between first town and fog | | 3 | 0x9000 | Fog | | 4 | 0xB800 | Last world, Final maze | | 5 | 0xA000 | Town | | 6 | 0xA800 | Building | | 7 | 0xAE00 | ? | | 8 | 0xB400 | ? | ## TILE_INDEX_TO_PPU_ADDR_UPPER **Location:** PRG15_MIRROR: 0xCF19 - 0xCF21 Translation table for mapping `TilesIndex` to PPU high bytes (low is always 0). | TilesIndex | Value | Resulting Address | | ---------- | ----- | ----------------- | | 0 | 18 | 0x1800 | | 1 | 18 | 0x1800 | | 2 | 18 | 0x1800 | | 3 | 18 | 0x1800 | | 4 | 18 | 0x1800 | | 5 | 18 | 0x1800 | | 6 | 1a | 0x1A00 | | 7 | 1a | 0x1A00 | | 8 | 1a | 0x1A00 | ## TILE_INDEX_TO_NUM_CHR_PAGES **Location:** PRG15_MIRROR: 0xCF22 - 0xCF2A Translation table for mapping `TilesIndex` to the number of CHR pages to load. | TilesIndex | Number of pages | | ---------- | --------------- | | 0 | 8 | | 1 | 8 | | 2 | 8 | | 3 | 8 | | 4 | 8 | | 5 | 8 | | 6 | 6 | | 7 | 6 | | 8 | 4 |