From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "behavior" |
|---|
| subject | "Format:Sega Master System ROM image" |
|---|
| claim | "Codemasters SMS cartridges have no TMR SEGA header: a 16-bit checksum at 0x7FE6 and its complement at 0x7FE8 add up to 0x10000, which is how Mesen2 detects the Codemasters mapper (ROMs over 32 KiB)." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:Sega Master System ROM image" |
|---|
| observed_in | |
|---|
|
|---|
| data | | trigger | "ROM larger than 0x8000 bytes" |
|---|
| effect | "if u16le(0x7FE6) + u16le(0x7FE8) == 0x10000 the ROM uses the Codemasters mapper (page registers at 0x0000, 0x4000, 0x8000)" |
|---|
| condition | "romData.size() > 0x8000" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "SmsConsole::InitCart reads checksum at 7FE6-7FE7 and complement at 7FE8-7FE9" |
|---|
| repo | "https://github.com/SourMesen/Mesen2" |
|---|
| commit | "b9fa69ddc6d0a331fb103fdb5eef6904305703c2" |
|---|
| path | "Core/SMS/SmsConsole.cpp" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Codemasters checksum detection" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-18T19:11:46.565Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T04:02:55.389Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read Mesen2 Core/SMS/SmsConsole.cpp at b9fa69d InitCart lines 85-110: for romData.size() > 0x8000 it reads u16le at 0x7FE6 and 0x7FE8 and picks the Codemasters cart when their sum == 0x10000; otherwise it falls to a CRC list. Did not read the cart class." |
|---|
|
|
|---|