This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
banjo_kazooie_gruntys_revenge:rooms [2018/04/15 19:44] trenavix created |
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 | Tiledata 1 count | | + | | 0x00 | 2 | Tile data 1 count | |
- | | 0x02 | 2 | Tileset 1 count | | + | | 0x02 | 2 | Tile set 1 count | |
- | | 0x04 | 2 | Tiledata 2 count | | + | | 0x04 | 2 | Tile data 2 count | |
- | | 0x06 | 2 | Tileset 2 count | | + | | 0x06 | 2 | Tile set 2 count | |
- | | 0x08 | 2 | Amount of layers on | | + | | 0x08 | 2 | Enabled backgrounds | |
- | | 0x0A | 2 | Tilemap X length | | + | | 0x0A | 2 | Map X length (in tiles) | |
- | | 0x0C | 2 | Tilemap Y length | | + | | 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 | Layer 1 Tileset (00 = set 1, 01 = set 2) | | + | | 0x14 | 1 | BG0 tile set (00 = set 1, 01 = set 2) | |
- | | 0x15 | 1 | Layer 2 Tileset (00 = set 1, 01 = set 2) | | + | | 0x15 | 1 | BG1 tile set (00 = set 1, 01 = set 2) | |
- | | 0x16 | 1 | Layer 3 Tileset (00 = set 1, 01 = set 2) | | + | | 0x16 | 1 | BG2 tile set (00 = set 1, 01 = set 2) | |
- | | 0x17 | 1 | Layer 4 Tileset (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 | Tiledata 1 pointer | | + | | 0x1C | 4 | Tile data 1 pointer | |
- | | 0x20 | 4 | Tileset 1 pointer | | + | | 0x20 | 4 | Tile set 1 pointer | |
- | | 0x24 | 4 | Tiledata 2 pointer | | + | | 0x24 | 4 | Tile data 2 pointer | |
- | | 0x28 | 4 | Tileset 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 | | ||
| 0x34 | 4 | Collision pointer | | | 0x34 | 4 | Collision pointer | | ||
- | | 0x38 | 4 | Textbar NPC | | + | | 0x38 | 4 | Textbar NPC pointer | |
- | | 0x3C | 4 | Textbar bozzeye | | + | | 0x3C | 4 | Textbar bozzeye pointer | |
| 0x40 | 4 | Entities pointer | | | 0x40 | 4 | Entities pointer | | ||
| 0x44 | 4 | Sprite palette pointer | | | 0x44 | 4 | Sprite palette pointer | | ||
| 0x48 | 4 | ?? pointer | | | 0x48 | 4 | ?? pointer | | ||
- | | 0x4C | 4 | Tilemap layer 1 pointer | | + | | 0x4C | 4 | Map 1 pointer | |
- | | 0x50 | 4 | Tilemap layer 2 pointer | | + | | 0x50 | 4 | Map 2 pointer | |
- | | 0x54 | 4 | Tilemap layer 3 pointer | | + | | 0x54 | 4 | Map 3 pointer | |
- | | 0x58 | 4 | Tilemap layer 4 pointer | | + | | 0x58 | 4 | Map 4 pointer | |
- | | 0x5C | 1 | Layer 1 Stationary (0 = not stationary, 1 = stationary) | | + | | 0x5C | 1 | BG0 stationary (0 = not stationary, 1 = stationary) | |
- | | 0x5D | 1 | Layer 2 Stationary (0 = not stationary, 1 = stationary) | | + | | 0x5D | 1 | BG1 stationary (0 = not stationary, 1 = stationary) | |
- | | 0x5E | 1 | Layer 3 Stationary (0 = not stationary, 1 = stationary) | | + | | 0x5E | 1 | BG2 stationary (0 = not stationary, 1 = stationary) | |
- | | 0x5F | 1 | Layer 4 Stationary (0 = not stationary, 1 = stationary) | | + | | 0x5F | 1 | BG3 stationary (0 = not stationary, 1 = stationary) | |
- | | 0x60 | 4 | | | + | | 0x60 | 1 | BG0 control (If these booleans are true, some functions have control over the background control registers.) | |
+ | | 0x61 | 1 | BG1 control | | ||
+ | | 0x62 | 1 | BG2 control | | ||
+ | | 0x63 | 1 | BG3 control | | ||
===== 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 110: | 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 124: | 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 134: | 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 ==== |