From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:CHD (MAME Compressed Hunks of Data)" |
|---|
| claim | "The CHD v3 header is 120 bytes (big-endian): flags, one compression id, totalhunks, logicalbytes, metaoffset, MD5, parent MD5, hunkbytes, SHA-1, parent SHA-1." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "CHD version 3" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "ChdHeaderV3" |
|---|
| size | "120" |
|---|
| endianness | "big" |
|---|
| fields | | offset | "0x0" |
|---|
| size | 8 |
|---|
| type | "char[8]" |
|---|
| name | "tag" |
|---|
|
| offset | "0x8" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "length" |
|---|
| notes | "120" |
|---|
|
| offset | "0xC" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "version" |
|---|
| notes | "3" |
|---|
|
| offset | "0x10" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "flags" |
|---|
|
| offset | "0x14" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "compression" |
|---|
|
| offset | "0x18" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "totalhunks" |
|---|
|
| offset | "0x1C" |
|---|
| size | 8 |
|---|
| type | "uint64_t" |
|---|
| name | "logicalbytes" |
|---|
|
| offset | "0x24" |
|---|
| size | 8 |
|---|
| type | "uint64_t" |
|---|
| name | "metaoffset" |
|---|
|
| offset | "0x2C" |
|---|
| size | 16 |
|---|
| type | "uint8_t[16]" |
|---|
| name | "md5" |
|---|
|
| offset | "0x3C" |
|---|
| size | 16 |
|---|
| type | "uint8_t[16]" |
|---|
| name | "parentmd5" |
|---|
|
| offset | "0x4C" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "hunkbytes" |
|---|
|
| offset | "0x50" |
|---|
| size | 20 |
|---|
| type | "uint8_t[20]" |
|---|
| name | "sha1" |
|---|
|
| offset | "0x64" |
|---|
| size | 20 |
|---|
| type | "uint8_t[20]" |
|---|
| name | "parentsha1" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "V3 header comment table ending with [120]" |
|---|
| repo | "https://github.com/rtissera/libchdr" |
|---|
| commit | "47d794151b2b64f6aba60304e6480f4f5a2bc24b" |
|---|
| path | "include/libchdr/chd.h" |
|---|
| lines | "90-105" |
|---|
|
| type | "source" |
|---|
| detail | "case 3 of header_read" |
|---|
| repo | "https://github.com/rtissera/libchdr" |
|---|
| commit | "47d794151b2b64f6aba60304e6480f4f5a2bc24b" |
|---|
| path | "src/libchdr_chd.c" |
|---|
| lines | "2869-2886" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Version 3 header" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T11:59:03.107Z" |
|---|
| verifications | |
|---|