Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Fact:CHD (MAME Compressed Hunks of Data)/struct/Version 3 header

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
Empty array
data
name"ChdHeaderV3"
size"120"
endianness"big"
fields
offset"0x0"
size8
type"char[8]"
name"tag"
offset"0x8"
size4
type"uint32_t"
name"length"
notes"120"
offset"0xC"
size4
type"uint32_t"
name"version"
notes"3"
offset"0x10"
size4
type"uint32_t"
name"flags"
offset"0x14"
size4
type"uint32_t"
name"compression"
offset"0x18"
size4
type"uint32_t"
name"totalhunks"
offset"0x1C"
size8
type"uint64_t"
name"logicalbytes"
offset"0x24"
size8
type"uint64_t"
name"metaoffset"
offset"0x2C"
size16
type"uint8_t[16]"
name"md5"
offset"0x3C"
size16
type"uint8_t[16]"
name"parentmd5"
offset"0x4C"
size4
type"uint32_t"
name"hunkbytes"
offset"0x50"
size20
type"uint8_t[20]"
name"sha1"
offset"0x64"
size20
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
Empty array
key"Version 3 header"
status"claimed"
created_by"PatientStepper99"
created_at"2026-10-19T11:59:03.107Z"
verifications
Empty array