From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:Mega Drive ROM image" |
|---|
| claim | "The external RAM definition of a Mega Drive header sits at 0x1B0: ASCII 'RA', then two flag bytes (0xF8 0x20 style: bit 6 of the first = non-volatile backup, bits 4-3 = 10 even only / 11 odd only / 00 both / 01 other such as serial EEPROM, bits 7-5 of the second = 001 SRAM / 010 EEPROM), then 32-bit big-endian start (0x1B4) and end (0x1B8) addresses; Genesis Plus GX masks both to 24 bits and treats start >= 0x800000 as invalid (forces 0x200000-0x20FFFF), start 0xFF0000 as internal RAM (disabled) and caps size at 64 KiB." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:Mega Drive ROM image" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "md_header_ram_info" |
|---|
| size | 12 |
|---|
| fields | | offset | "0x0" |
|---|
| size | 2 |
|---|
| type | "char[2]" |
|---|
| name | "ram_magic" |
|---|
| notes | "'RA' (0x52 0x41); 'FL' (0x46 0x4C) is also checked by Genesis Plus GX for flash" |
|---|
|
| offset | "0x2" |
|---|
| size | 2 |
|---|
| type | "u8[2]" |
|---|
| name | "ram_type" |
|---|
| notes | "%1x1yz000, %abc00000 per the source comment" |
|---|
|
| offset | "0x4" |
|---|
| size | 4 |
|---|
| type | "u32be" |
|---|
| name | "ram_start" |
|---|
|
| offset | "0x8" |
|---|
| size | 4 |
|---|
| type | "u32be" |
|---|
| name | "ram_end" |
|---|
|
|
|---|
| endianness | "big" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "comment block describing 1B0h layout, then detection of 0x52 0x41 and address fixups" |
|---|
| repo | "ekeeke/Genesis-Plus-GX" |
|---|
| commit | "49c584764893b0505ac7f768a754f97330fa4392" |
|---|
| path | "core/cart_hw/sram.c" |
|---|
| lines | "45-62, 86-97, 138" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Backup RAM header at 0x1B0" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T00:08:07.561Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T06:25:42.221Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read core/cart_hw/sram.c at 49c584764893 lines 45-135: comment '1B0h: dc.b RA, %1x1yz000, %abc00000; 1B4h start; 1B8h end', detection of 0x52 0x41 at 0x1b0/0x1b1, start/end masked with 0xffffff, start==0xff0000 disables, start>=0x800000 forces 0x200000-0x20ffff, size capped at 64 KiB, 'FL' check at line 138. Matches (plus a few per-game header fixups the fact omits)." |
|---|
|
|
|---|