This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
banjo_kazooie_gruntys_revenge:rooms [2018/04/22 10:18] jesse [Room header] |
banjo_kazooie_gruntys_revenge:rooms [2018/04/22 12:43] (current) jesse [Room header] |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ======== Rooms ======== | ======== Rooms ======== | ||
| - | Every data in a room block is uncompressed except for the tile data. | + | Every data in a room block is uncompressed except for tiles. |
| ===== Room index ===== | ===== Room index ===== | ||
| Line 62: | Line 62: | ||
| ^ Offset ^ Length ^ Description ^ | ^ Offset ^ Length ^ Description ^ | ||
| - | | 0x00 | 2 | Tiles 1 count | | + | | 0x00 | 2 | Tile data 1 count | |
| - | | 0x02 | 2 | Meta tiles 1 count | | + | | 0x02 | 2 | Tile set 1 count | |
| - | | 0x04 | 2 | Tiles 2 count | | + | | 0x04 | 2 | Tile data 2 count | |
| - | | 0x06 | 2 | Meta tiles 2 count | | + | | 0x06 | 2 | Tile set 2 count | |
| | 0x08 | 2 | Enabled backgrounds | | | 0x08 | 2 | Enabled backgrounds | | ||
| - | | 0x0A | 2 | Map X length (in meta tiles) | | + | | 0x0A | 2 | Map X length (in tiles) | |
| - | | 0x0C | 2 | Map Y length (in meta tiles) | | + | | 0x0C | 2 | Map Y length (in tiles) | |
| | 0x0E | 1 | | | | 0x0E | 1 | | | ||
| | 0x0F | 1 | Compression method used (0 = no compression, 1 = LZ77, 2 = huff) | | | 0x0F | 1 | Compression method used (0 = no compression, 1 = LZ77, 2 = huff) | | ||
| | 0x10 | 4 | | | | 0x10 | 4 | | | ||
| - | | 0x14 | 1 | BG0 Meta tiles (00 = set 1, 01 = set 2) | | + | | 0x14 | 1 | BG0 tile set (00 = set 1, 01 = set 2) | |
| - | | 0x15 | 1 | BG1 Meta tiles (00 = set 1, 01 = set 2) | | + | | 0x15 | 1 | BG1 tile set (00 = set 1, 01 = set 2) | |
| - | | 0x16 | 1 | BG2 Meta tiles (00 = set 1, 01 = set 2) | | + | | 0x16 | 1 | BG2 tile set (00 = set 1, 01 = set 2) | |
| - | | 0x17 | 1 | BG3 Meta tiles (00 = set 1, 01 = set 2) | | + | | 0x17 | 1 | BG3 tile set (00 = set 1, 01 = set 2) | |
| | 0x18 | 4 | Background palette pointer | | | 0x18 | 4 | Background palette pointer | | ||
| - | | 0x1C | 4 | Tiles 1 pointer | | + | | 0x1C | 4 | Tile data 1 pointer | |
| - | | 0x20 | 4 | Meta tiles 1 pointer | | + | | 0x20 | 4 | Tile set 1 pointer | |
| - | | 0x24 | 4 | Tiles 2 pointer | | + | | 0x24 | 4 | Tile data 2 pointer | |
| - | | 0x28 | 4 | Meta tiles 2 pointer | | + | | 0x28 | 4 | Tile set 2 pointer | |
| | 0x2C | 4 | Tile animations 1 pointer | | | 0x2C | 4 | Tile animations 1 pointer | | ||
| | 0x30 | 4 | Tile animations 2 pointer | | | 0x30 | 4 | Tile animations 2 pointer | | ||
| Line 104: | Line 104: | ||
| ===== Room data ===== | ===== Room data ===== | ||
| - | ==== 20: Tileset 1 ==== | + | ==== 1C: Tile data 1 ==== |
| - | Each tile is a collection of 16 blocks of 8x8 tiledata. For each block entry is 2 bytes long. | + | Tile data is compressed pixel data which is directly transferred to VRAM. The tile data is 4bpp. |
| + | |||
| + | ==== 20: Tile set 1 ==== | ||
| + | |||
| + | Each tile in the tile set is a collection of 16 entries. Each entry refers to tile data in ram and is 2 bytes in size. | ||
| ''[<color darkred><sub>PP PP</sub></color>] [<color darkgreen><sub>X</sub></color>] [<color darkblue><sub>Y</sub></color>] [<color purple><sub>TTTTTTTTTT</sub></color>]'' | ''[<color darkred><sub>PP PP</sub></color>] [<color darkgreen><sub>X</sub></color>] [<color darkblue><sub>Y</sub></color>] [<color purple><sub>TTTTTTTTTT</sub></color>]'' | ||
| Line 113: | Line 117: | ||
| | <color darkgreen>X</color> | X mirror boolean | | | <color darkgreen>X</color> | X mirror boolean | | ||
| | <color darkblue>Y</color> | Y mirror boolean | | | <color darkblue>Y</color> | Y mirror boolean | | ||
| - | | <color purple>T</color> | The block of tiledata it uses. | | + | | <color purple>T</color> | The tile data it uses. | |
| - | ==== 28: Tileset 2 ==== | + | ==== 28: Tile set 2 ==== |
| - | See Tileset 1 | + | See Tile set 1 |
| ==== 2C: Tile animations ==== | ==== 2C: Tile animations ==== | ||
| - | Tile animations store its own tiledata. In game the animated tiledata is first put in VRAM and then the other tile data. | + | Tile animations store its own tiles. In game the animated tiles is put in VRAM first and then the other tiles. |
| Block structure | Block structure | ||
| Line 127: | Line 131: | ||
| | 4 | Number of tile animations | | | 4 | Number of tile animations | | ||
| | 8 * n | Tile animation index | | | 8 * n | Tile animation index | | ||
| - | | 16 * n | Tiledata | | + | | 16 * n | Tile data | |
| === Tile animation index === | === Tile animation index === | ||
| Line 137: | Line 141: | ||
| | <color darkred>F</color> | Number of frames | | | <color darkred>F</color> | Number of frames | | ||
| | <color darkgreen>S</color> | Frames per second | | | <color darkgreen>S</color> | Frames per second | | ||
| - | | <color darkblue>P</color> | tiledata pointer | | + | | <color darkblue>P</color> | Tiles pointer | |
| - | === Tiledata === | + | === Tile data === |
| - | Each entry is 1 block 8x8 of tiledata. | + | Tile data is transferred to VRAM at intervals to make the animation effect. |
| - | See Tileset 1 | + | See Tile data 1. |
| ==== 34: Collision ==== | ==== 34: Collision ==== | ||
| ==== 38: Textbar NPC ==== | ==== 38: Textbar NPC ==== | ||
| + | |||
| + | The textbar consists of Y * X tile entries. | ||
| + | |||
| + | ^ Size ^ Description ^ | ||
| + | | 1 | X size | | ||
| + | | 1 | Y size | | ||
| + | | 2 * (X * Y) | Tile entries | | ||
| ==== 3C: Textbar bozzeye ==== | ==== 3C: Textbar bozzeye ==== | ||