From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:TIM2 (PlayStation 2 texture)" |
|---|
| claim | "A TIM2 picture header is 0x30 bytes: total_size, clut_size, image_size (u32), header_size u16, clut_colors u16, pict_format u8, mipmap_textures u8, clut_type u8, image_type u8, width u16, height u16, gs_tex0 u64 at 0x18, gs_tex1 u64 at 0x20, gs_regs u32 at 0x28, gs_tex_clut u32 at 0x2C." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:TIM2 (PlayStation 2 texture)" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "Tim2PictureHeader" |
|---|
| size | "0x30" |
|---|
| endianness | "little" |
|---|
| fields | | offset | "0x0" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "total_size" |
|---|
|
| offset | "0x4" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "clut_size" |
|---|
|
| offset | "0x8" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "image_size" |
|---|
|
| offset | "0xC" |
|---|
| size | 2 |
|---|
| type | "uint16_t" |
|---|
| name | "header_size" |
|---|
|
| offset | "0xE" |
|---|
| size | 2 |
|---|
| type | "uint16_t" |
|---|
| name | "clut_colors" |
|---|
|
| offset | "0x10" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "pict_format" |
|---|
|
| offset | "0x11" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "mipmap_textures" |
|---|
|
| offset | "0x12" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "clut_type" |
|---|
|
| offset | "0x13" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "image_type" |
|---|
|
| offset | "0x14" |
|---|
| size | 2 |
|---|
| type | "uint16_t" |
|---|
| name | "image_width" |
|---|
|
| offset | "0x16" |
|---|
| size | 2 |
|---|
| type | "uint16_t" |
|---|
| name | "image_height" |
|---|
|
| offset | "0x18" |
|---|
| size | 8 |
|---|
| type | "uint64_t" |
|---|
| name | "gs_tex0" |
|---|
|
| offset | "0x20" |
|---|
| size | 8 |
|---|
| type | "uint64_t" |
|---|
| name | "gs_tex1" |
|---|
|
| offset | "0x28" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "gs_regs" |
|---|
|
| offset | "0x2C" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "gs_tex_clut" |
|---|
|
|
|---|
| notes | "0x30 bytes is the fixed part. The source pattern has a commented-out MipMap header after gs_tex_clut (gs_miptbp1 u64, gs_miptbp2 u64, then u32 size[]) for pictures with mipmaps (the note says its sample, God Hand, has none); use header_size, not 0x30, to find the data when mipmap_textures > 1. Image data then CLUT data follow." |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "ImHex pattern struct Picture (MIT licensed repository)" |
|---|
| repo | "anasrar/chihuahua" |
|---|
| commit | "83bb54e34991030ff224639159dd1c62568e9a98" |
|---|
| path | "pkg/tim2/tim2.hexpat" |
|---|
| lines | "24-46" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Picture header" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T02:08:45.593Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T08:51:07.413Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read pkg/tim2/tim2.hexpat struct Picture at the cited commit: u32 x3, u16 header_size, u16 clut_colors, u8 x4, u16 width, u16 height, u64 tex0, u64 tex1, u32 regs, u32 tex_clut = 0x30 with the offsets given; the MipMap member is commented out (God Hand sample without mipmaps). Matches; the pattern is third-party, so the mipmap-header caveat rests on the commented-out struct only." |
|---|
|
|
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T08:16:31.101Z" |
|---|
| summary | "Header_size is the real picture header length: the source pattern comments out a MipMap header (gs_miptbp1 u64, gs_miptbp2 u64, u32 size[]) that follows gs_tex_clut when mipmap_textures > 1, so 0x30…" |
|---|
| changed | |
|---|
|
|
|---|