Skip to content

PVM Archive

Nick Woronekin edited this page May 26, 2013 · 1 revision

A PVM archive is an archive that contains only PVR textures.

Format Description

Header

Offset Length (bytes) Description
0x0 4 "PVMH" magic code
0x4 4 Offset of the first texture in the archive minus 8
0x8 2 Flags:
  • 0x1: Global Index
  • 0x2: Texture Dimensions
  • 0x4: Pixel & Data Format
  • 0x8: Filenames
0xA 2 Number of textures in the archive

Entries

  • The entry table starts at 0xC in the archive.
  • The following is repeated for every entry in the archive.
Offset Length (bytes) Description Only present if ...
0x0 2 Entry number in the archive (starts at 0) Always
Varies 28 Filename Filename flag is set
Varies 2 The texture's pixel format, followed by its data format Pixel & Data Format flag is set
Varies 2 The texture's width (lower 4 bits) and height (upper 4 bits).
Only the lower byte is used.
Retrieve dimension using (1 << (value + 2)).
Texture Dimensions flag is set
Varies 4 Global Index Global Index flag is set

Data

  • Each texture is always aligned at a 16 byte offset.
  • Each texture never contains a GBIX chunk (as its global index is defined above in the entry table), and as such always starts with a PVRT chunk.
Offset Length (bytes) Description
0x0 4 "PVRT" magic code
0x4 4 Length of the texture minus 8
0x8 ... PVR texture data not relevant to the archive
Clone this wiki locally