From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:BRRES resource archive" |
|---|
| claim | "PLT0 sub file as noclip reads it (big endian): magic PLT0 at 0, u32 version at 0x08 (accepted 1 or 3), u32 palette data offset at 0x10 and u32 name offset at 0x14 (relative to the start of the PLT0), u32 GX palette format at 0x18 (0 IA8, 1 RGB565, 2 RGB5A3), u16 entry count at 0x1C; data size is count * 2. A TEX0 in C4, C8 or C14X2 format is paired with the PLT0 of the same name." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "BRRES resource archive" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "BRRES_PLT0" |
|---|
| size_min | "0x1E" |
|---|
| endianness | "big" |
|---|
| variant | "version 1 or 3 (assert in noclip)" |
|---|
| fields | | offset | "0x0" |
|---|
| size | 4 |
|---|
| type | "char[4]" |
|---|
| name | "magic" |
|---|
|
| offset | "0x8" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "version" |
|---|
|
| offset | "0x10" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "dataOffset" |
|---|
|
| offset | "0x14" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "nameOffset" |
|---|
|
| offset | "0x18" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "format" |
|---|
|
| offset | "0x1C" |
|---|
| size | 2 |
|---|
| type | "uint16_t" |
|---|
| name | "numEntries" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "parsePLT0 and the palette-to-texture pairing in parse() (assertExists: a missing PLT0 throws)" |
|---|
| repo | "https://github.com/magcius/noclip.website" |
|---|
| commit | "fd973ff240233c63883750a557c62baf6ff2a6c7" |
|---|
| path | "src/rres/brres.ts" |
|---|
| lines | "215-232, 2793-2822" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "PLT0 palette sub file" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T17:09:48.965Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T17:36:08.970Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read parsePLT0 and the Palettes/Textures pairing in brres.ts at the cited commit: version asserted [1, 3], dataOffs 0x10, nameOffs 0x14, format u32 0x18, numEntries u16 0x1C, data = numEntries * 2 bytes; a TEX0 with format C4, C8 or C14X2 requires a PLT0 of the same name (assertExists). The 0/1/2 palette format names were not re-read." |
|---|
|
|
|---|