Skip to content

PVR Texture

Nick Woronekin edited this page Jun 12, 2013 · 1 revision

A PVR texture is the native texture format of the Dreamcast.

Format Description

GBIX Header

This header is optional and may not be present in the texture.

Offset Length (bytes) Description
0x0 4 "GBIX" magic code
0x4 4 8
0x8 4 Global index
0xC 4 Filled with 0
or
Filled with 0x20

PVRT Header

Offset Length (bytes) Description
0x0 4 "PVRT" magic code
0x4 4 Length of the PVRT chunk minus 24
0x8 1 Pixel format
0x9 1 Data format
0xA 2 0
0xC 2 Texture width
0xE 2 Texture height

Palette Data

For textures that contain an internal palette (which is only the case for VQ based textures), the palette will be located after the PVRT header.

Offset Length (bytes) Description
0x0 Varies Palette data

Texture Data

The texture data is the last thing stored in a PVR texture. For textures that contains mipmaps, the textures will be stored from smallest to largest. That is, the 1x1 mipmap will be stored first, and the base texture will be stored last.

Offset Length (bytes) Description
0x0 Varies Texture data

Pixel and Data Formats

Pixel Format

These are the pixel formats that are currently supported by Puyo Tools.

Value Name
0x0 ARGB1555
0x1 RGB565
0x2 ARGB4444

ARGB1555

This pixel format supports 1-bit alpha, followed by 5-bits each for the red, green, and blue components. This pixel format is best for textures that contain alpha that is either opaque or fully transparent.

RGB565

This pixel format supports 5-bits for both the red and blue components, and 6-bits for the green component. This pixel format is best for textures that do not contain transparency.

ARGB4444

This pixel format supports 4-bit alpha for the alpha, red, green, and blue components. This pixel format is best for textures that contain partial transparency.

Data Format

These are the data formats that are currently supported by Puyo Tools.

Value Name
0x01 Square twiddled
0x02 Square twiddled with mipmaps
0x03 VQ
0x04 VQ with mipmaps
0x05 4-bit indexed with external palette
0x07 8-bit indexed with external palette
0x09 Rectangle
0x0D Rectangle twiddled
0x10 Small VQ
0x11 Small VQ with mipmaps
0x12 Square twiddled with mipmaps (alternate)

Square Twiddled

This format requires a square texture (that is, the width and height are the same), and the contents are twiddled.

Square Twiddled with Mipmaps

This format requires a square texture (that is, the width and height are the same), and the contents are twiddled. This format contains mipmaps. There are 2 bytes filled with 0 before the 1x1 mipmap.