Skip to main content

PCMP ("PMCP") - Palette Compression

Author(s): Gonhex
Research: NOCASH

The palette compression is an optional component for the color runtime. It reduces the number of palettes, if the palette section allows 16 of them. Useful to save memory but not often used.

Table of Contents


Data Structure

Section Container

struct ContainerSectionPCMP
{
/* 0x0 */ struct NitroSectionHeader sectionHeader;
/* 0x8 */ struct ContainerPCMP sectionData;
}; // entry size = sectionHeader.lengthSection
Field NameDescriptionData Type
sectionHeaderHeader of this section. sectionHeader.signature = "PMCP".NitroSectionHeader
sectionDataContent of this section.ContainerPCMP

PCMP Container

struct ContainerPCMP
{
// header
/* 0x0 */ uint16_t numberPalettes;
/* 0x2 */ uint16_t unknown0;
/* 0x4 */ uint32_t offsetDataIndices;

// data
/* offsetDataIndices */ uint16_t dataIndices[numberPalettes];
}; // entry size = numberPalettes * 2 + offsetDataIndices
Field NameDescriptionData Type
numberPalettesLimits the number of palettes used in the PLTT section.uint16_t
unknown0Always 0xBEEF.uint16_t
offsetDataIndicesOffset to the index table relative to ContainerPCMP.uint32_t
dataIndicesIndex table, incrementing from 0. The data may have no effect on the palettes.uint16_t[]

Specification

Files