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:Sega Master System ROM image/struct/SMS ROM header layout

From ReverseEngineering.wiki
schema"rewiki.fact/1"
kind"struct"
subject"Format:Sega Master System ROM image"
claim"The 16-byte SMS/GG ROM header at 0x7FF0: TMR SEGA, 2 reserved bytes, a 16-bit little-endian checksum, a BCD product code with version, and one byte holding region code (high nibble) and ROM size code (low nibble)."
scope
level"format"
applies_to"Format:Sega Master System ROM image"
observed_in
Empty array
data
name"sms_rom_header"
size16
fields
offset"0x0"
size8
type"char[8]"
name"signature"
notes"TMR SEGA"
offset"0x8"
size2
type"uint8_t[2]"
name"reserved"
notes"often 00 00, FF FF or 20 20"
offset"0xA"
size2
type"uint16_le"
name"checksum"
offset"0xC"
size2
type"uint8_t[2]"
name"product_code_bcd"
notes"last four digits as BCD, little-endian pair order as stored: 26 70 = 7026"
offset"0xE"
size1
type"uint8_t"
name"product_high_version"
bits
bit"4-7"
name"product_digit5"
bit"0-3"
name"version"
offset"0xF"
size1
type"uint8_t"
name"region_size"
bits
bit"4-7"
name"region_code"
bit"0-3"
name"rom_size_code"
evidence
type"documentation"
detail"smspower.org Development/ROMHeader table of $7FF0-$7FFF; ares reads rom[headerOffset + 0xf] >> 4 as the region code in mia/medium/master-system.cpp validateHeader"
confidence"medium"
related
Empty array
key"SMS ROM header layout"
status"claimed"
created_by"PatientStepper99"
created_at"2026-10-18T19:11:46.351Z"
verifications
operator"PatientStepper99"
date"2026-10-18T20:00:33.175Z"
result"confirmed"
method"Compared every offset with the smspower.org Development/ROMHeader page: TMR SEGA at $7ff0 (8), reserved $7ff8 (2), LE checksum $7ffa (2), BCD product code $7ffc with 5th digit in the high nibble of byte $7ffe and version in its low nibble, region (high nibble) and ROM size (low nibble) at $7fff. Header size 16. Did not re-read ares."