NSBTX Files (NITRO-System Binary Texture) store a set of 3D textures. It follows the NNS G3D Binary File Format with the signature "BTX0". An NSBTX file must contain only a TEX0 block.

TEX0 Block#

The TEX0 block stores the texture data. It takes the following structure:

OffsetTypeMeaning
0x00 u32 Texture VRAM key (set at load time)
0x04 u16 Size of texture data, right-shifted 3 places
0x06 u16 Offset to the texture dictionary relative to the beginning of this structure.
0x08 u16 Texture flags. Set to 0 in file, gets set to 1 when loaded.
0x0A u16
0x0C u32 Offset to texture data.
0x10 u32 Compressed texture VRAM key (set at load time).
0x14 u16 Size of compressed texel data, shifted right 3 places.
0x16 u16 Offset to the compressed texture dictionary. Set to 0 if not present.
0x18 u16 Compressed texture flags. Set to 0 in file, set to 1 when loaded.
0x1A u16
0x1C u32 Offset to compressed texture data.
0x20 u32 Offset to compressed texture index data.
0x24 u32 Texture palette VRAM key (set at load time).
0x28 u16 Size of texture palette data, right-shifted 3 places.
0x2A u16 Texture palette flags. Set to 0x8000 if there exists palettes for palette4 textures (since this imposes new position requirements in VRAM).
0x2C u16 Offset to texture palette dictionary. Set to 0 if not present.
0x2E u16
0x30 u32 Offset to texture palette data.
0x34 ... Texture dictionary
... ... Texture palette dictionary
... ... Texture data
... ... Compressed texture data
... ... Texture index data
... ... Texture palette data

Texture Dictionary#

Each entry of the texture dictionary takes the following structure:

OffsetTypeMeaning
0x00 u32 Teximage_Param
0x04 u32 Extra texture parameters. The lowest 11 bits are the texture's source width. The next 11 bits are the texture's source height. These may be smaller than the real texture dimensions. The most significant bit is set when the real dimensions (in the Teximage_Param) match these.

Texture Palette Dictionary#

Each entry of the palette dictionary has an entry of the following structure:

OffsetTypeMeaning
0x00 u16 Offset, right-shifted 3 places.
0x00 u16 Flags. Least significant bit set marks a palette for a palette4 texture.

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-1) was last changed on 02-May-2024 17:57 by Garhoogin