Hack64 Wiki
Other Titles
Hack64 Wiki
Other Titles
This page documents the binary sprite format derived from Banjo-Kazooieโs N64 rom. It supports both single-chunk and multi-frame layouts, with support for various pixel formats and chunk-based rendering.
All integers are big-endian unless stated otherwise.
This format is used for static or animated sprite graphics in the ROM. Depending on frame count, it can store a simple image or a complex animation.
Field | Offset | Type | Description |
---|---|---|---|
Frame Count | 0x00 | `uint16_t` | Number of frames |
Format ID | 0x02 | `uint16_t` | Format identifier |
Format ID | Enum | Description | Bits per Pixel |
---|---|---|---|
0x0001 | CI4 | 4-bit color indexed | 4 |
0x0004 | CI8 | 8-bit color indexed | 8 |
0x0020 | I4 | 4-bit intensity | 4 |
0x0040 | I8 | 8-bit intensity | 8 |
0x0400 | RGBA16 | 16-bit RGBA (5-5-5-1 format) | 16 |
0x0800 | RGBA32 | 32-bit RGBA | 32 |
Used if `frameCount > 256` (`0x0100`).
Field | Offset | Type | Description |
---|---|---|---|
X | 0x08 | `int16_t` | X position |
Y | 0x0A | `int16_t` | Y position |
Width | 0x0C | `uint16_t` | Width in pixels |
Height | 0x0E | `uint16_t` | Height in pixels |
Data Offset | ~0x10+ | โ | 8-byte aligned after header |
Data Size | โ | computed | Width ร Height ร bpp รท 8 |
Used if `frameCount โค 256` (`0x0100`).
Starts at: `0x10 + (frameCount ร 4)`
Field | Offset | Type | Description |
---|---|---|---|
X | 0x00 | `int16_t` | Frame X offset |
Y | 0x02 | `int16_t` | Frame Y offset |
Width | 0x04 | `uint16_t` | Frame width |
Height | 0x06 | `uint16_t` | Frame height |
Chunk Count | 0x08 | `uint16_t` | Number of chunks |
Field | Offset | Size | Description |
---|---|---|---|
Palette Data | aligned after 0x14 | 32 or 512B | 16ร2 or 256ร2 bytes, depending on format |
Each chunk entry is 8 bytes:
Field | Offset | Type | Description |
---|---|---|---|
Chunk X | 0x00 | `int16_t` | Chunk X position |
Chunk Y | 0x02 | `int16_t` | Chunk Y position |
Chunk Width | 0x04 | `uint16_t` | Width of chunk |
Chunk Height | 0x06 | `uint16_t` | Height of chunk |
Use the following to verify whether a file matches this format:
This documentation is a work in progress based on reverse engineering efforts. Contributions welcome!