Hack64 Wiki
Other Titles
Hack64 Wiki
Other Titles
This is an old revision of the document!
This page documents the binary layout of sprite files found in the Banjo-Kazooie ROM (Nintendo 64). These files contain image data composed of one or more frames, each composed of a series of image chunks.
All multi-byte values are stored in big endian. Unless otherwise stated, all examples use sprite ID `06EB`.
A sprite file is divided into the following sections:
The header occupies the first 0x10 bytes of the file and contains basic metadata about the sprite.
Offset | Size | Description |
---|---|---|
0x00 | 2 bytes | Frame count (`0x0001`) |
0x02 | 2 bytes | Format ID (`0x0100`) |
0x04 | 4 bytes | Unknown or sentinel (`0xFFFFFFFF`) |
0x08 | 2 bytes | Default width? (`0x00BE` = 190) |
0x0A | 2 bytes | Default height? (`0x00BE` = 190) |
0x0C | 4 bytes | Padding or flags (`0x00000000`) |
Immediately following the header is the frame offset table. This table contains 32-bit pointers to each frame's data section, relative to the start of the offset table.
For a file with 1 frame:
Offset | Size | Description |
---|---|---|
0x10 | 4 bytes | Frame 0 offset: `0x00000004` (points to 0x18 from file start) |
Total size of this section = `4 × frame_count`
Each frame starts with a 12-byte header.
Offset | Size | Description |
---|---|---|
0x00 | 2 bytes | X position (`0x0000`) |
0x02 | 2 bytes | Y position (`0x0000`) |
0x04 | 2 bytes | Width in pixels (`0x0391` = 913) |
0x06 | 2 bytes | Height in pixels (`0x0013` = 19) |
0x08 | 2 bytes | Chunk count (`0x003E` = 62) |
0x0A | 2 bytes | Unknown or padding (`0x0000`) |
Following the frame header, chunk data begins at offset `0x24`.
This format is still under investigation. If you have additional samples or insights, please contribute.