A Mega Drive ROM image is the cartridge ROM byte for byte, as the console’s 68000 processor sees it from address 0. The header follows Plutiedev’s ROM header guide, a community reference; Sega’s own documents were not among the sources read for this page. Numbers are big-endian, as on the 68000, and text fields are ASCII padded with spaces.
68000 vector table (0x000–0x0FF)
Sixty-four 32-bit addresses. On reset the processor loads its stack pointer and program counter from the first two, then jumps to the program counter. The others are where it goes on errors, traps and interrupts.
| Offset | Vector | Use |
|---|---|---|
0x000 | 0 | Initial stack pointer, loaded at reset. |
0x004 | 1 | Initial program counter: the game’s entry point, loaded at reset. |
0x008 | 2 | Bus error. |
0x00C | 3 | Address error. |
0x010 | 4 | Illegal instruction. |
0x014 | 5 | Division by zero. |
0x018 | 6 | CHK instruction. |
0x01C | 7 | TRAPV instruction. |
0x020 | 8 | Privilege violation. |
0x024 | 9 | Trace. |
0x028 | 10 | Line 1010 emulator (unimplemented A-line opcode). |
0x02C | 11 | Line 1111 emulator (unimplemented F-line opcode). |
0x030–0x038 | 12–14 | Reserved, unused on the 68000. |
0x03C | 15 | Uninitialised interrupt vector. |
0x040–0x05C | 16–23 | Reserved. |
0x060 | 24 | Spurious interrupt. |
0x064 | 25 | Level 1 interrupt: not used by the Mega Drive. |
0x068 | 26 | Level 2 interrupt: the external interrupt, raised through the TH pin of the I/O ports and enabled in a VDP register. |
0x06C | 27 | Level 3 interrupt: not used. |
0x070 | 28 | Level 4 interrupt: horizontal blank (H-INT) from the video chip. |
0x074 | 29 | Level 5 interrupt: not used. |
0x078 | 30 | Level 6 interrupt: vertical blank (V-INT) from the video chip. |
0x07C | 31 | Level 7 interrupt: not used. |
0x080–0x0BC | 32–47 | TRAP #0 to TRAP #15. |
0x0C0–0x0FC | 48–63 | Reserved, unused on the 68000. |
ROM header (0x100–0x1FF)
| Offset | Size | Field | Meaning |
|---|---|---|---|
0x100 | 16 | System type | The console the cartridge is for; see system type. |
0x110 | 16 | Copyright and release date | (C)XXXX YYYY.MMM: a four-character publisher code, the year and an upper-case three-letter month, for example (C)ABCD 2024.JAN. Sega’s original publisher codes are no longer assigned. |
0x120 | 48 | Domestic title | The name used in Japan, usually in capitals. With the overseas title, the only field that may hold Shift JIS as well as ASCII. |
0x150 | 48 | Overseas title | The name used elsewhere; the same as the domestic title when it does not change. |
0x180 | 14 | Serial number | TT NNNNNNNN-RR; see serial number. |
0x18E | 2 | Checksum | 16-bit sum of the ROM from 0x200; see checksum. |
0x190 | 16 | Device support | One letter per supported input or peripheral; see device codes. |
0x1A0 | 4 | ROM start | Always 0x00000000. |
0x1A4 | 4 | ROM end | Address of the last ROM byte: the ROM size minus one (0x0007FFFF for 512 KiB, 0x000FFFFF for 1 MiB, 0x001FFFFF for 2 MiB, 0x003FFFFF for 4 MiB), or for a cartridge with a mapper the last address the console sees. |
0x1A8 | 4 | RAM start | Always 0x00FF0000, the start of the console’s 64 KiB work RAM. |
0x1AC | 4 | RAM end | Always 0x00FFFFFF. |
0x1B0 | 12 | Extra memory | Save RAM or EEPROM on the cartridge, or spaces when there is none; see extra memory. |
0x1BC | 12 | Modem support | Spaces, or the Mega Modem details; see modem. |
0x1C8 | 40 | Reserved | Spaces. |
0x1F0 | 3 | Region support | Letters or a hexadecimal digit; see region codes. |
0x1F3 | 13 | Reserved | Spaces. |
System type
Text at 0x100 | Meaning |
|---|---|
SEGA MEGA DRIVE | Mega Drive. |
SEGA GENESIS | Mega Drive (the North American name). |
SEGA 32X | A game for the 32X add-on. |
SEGA EVERDRIVE | Mega Drive game that uses Everdrive flash-cartridge extensions. |
SEGA SSF | Mega Drive game that uses Mega Everdrive extensions. |
SEGA MEGAWIFI | Mega Drive game that uses the MegaWiFi cartridge. |
SEGA PICO | Sega Pico. |
SEGA TERA68K | Tera Drive, starting from the 68000 side. |
SEGA TERA286 | Tera Drive, starting from the x86 side. |
The console itself checks only the first four characters. Later models, with the
Trademark Security System (TMSS), look for SEGA there and refuse to start
the cartridge otherwise. The other values matter only to flash cartridges and emulators.
Serial number
Fourteen characters, TT NNNNNNNN-RR: the software type, a space, the
product number, a hyphen and the revision.
| Software type | Meaning |
|---|---|
GM | Game. |
AI | Aid: educational or utility software. |
OS | The TMSS boot ROM inside the console. |
BR | A Mega-CD (Sega CD) boot ROM. |
The product number is eight characters unique to the product. The revision is two
digits, 00 for the first release, raised by one for each corrected
version.
Checksum
Treat the ROM from 0x200 to its end as 16-bit big-endian words, add them,
and keep the low 16 bits. The vectors and header are not included. Some games and
emulators check it; otherwise it has no effect.
sum = 0
for offset = 0x200 to (ROM size − 2), step 2:
sum = (sum + (rom[offset] × 256 + rom[offset + 1])) AND 0xFFFF
header[0x18E] = sum
Example: if the bytes from 0x200 were only 4E 71 4E 75 FF FF,
the words would be 0x4E71 + 0x4E75 + 0xFFFF = 0x19CE5, and the
checksum 0x9CE5.
Device codes
Letters in any order, padded with spaces. Most games give J, or
J6 when they use the six-button pad’s extra buttons.
| Code | Device |
|---|---|
J | 3-button control pad. |
6 | 6-button control pad. |
0 | Master System control pad. |
A | Analogue joystick. |
4 | Multitap. |
G | Light gun. |
L | Activator. |
M | Mouse. |
B | Trackball. |
T | Tablet. |
V | Paddle. |
K | Keyboard or keypad. |
R | RS-232 serial port. |
P | Printer. |
C | CD-ROM (Mega-CD). |
F | Floppy disk drive. |
D | Meaning uncertain (“download” has been suggested). |
Extra memory
Spaces when the cartridge has no save memory. Otherwise:
| Offset | Size | Field | Meaning |
|---|---|---|---|
0x1B0 | 2 | Marker | RA. |
0x1B2 | 1 | Type | Kind of memory and how it is wired; see below. |
0x1B3 | 1 | — | 0x20 for RAM, 0x40 for EEPROM. |
0x1B4 | 4 | Start address | First address of the memory in the 68000’s address space. |
0x1B8 | 4 | End address | Last address of the memory. |
| Type | Memory | Kept when off | Access |
|---|---|---|---|
0xA0 | RAM | no | 16-bit. |
0xB0 | RAM | no | 8-bit, even addresses. |
0xB8 | RAM | no | 8-bit, odd addresses. |
0xE0 | RAM (battery or FRAM) | yes | 16-bit. |
0xF0 | RAM (battery or FRAM) | yes | 8-bit, even addresses. |
0xF8 | RAM (battery or FRAM) | yes | 8-bit, odd addresses. |
0xE8 | EEPROM | yes | Serial; the start and end addresses give the range it is reached through. How its lines are wired is not recorded and differs between publishers. |
Modem support
For games that used the Japanese Mega Modem, twelve characters
MOxxxxyy,zww: MO, the four-character publisher code (as in
the copyright field), a two-digit game number, a comma (some games use a full stop), a
one-digit version (0 for the original), and two digits for region and
microphone. Games with the same number can talk to each other, even from different
publishers. Spaces otherwise.
| Last two digits | Meaning |
|---|---|
00 | Japan, no microphone. |
10 | Japan, microphone. |
20 | Overseas, no microphone. |
30 | Overseas, microphone. |
40 | Both, no microphone. |
50 | Both, microphone. |
60 | Japan without, overseas with microphone. |
70 | Japan with, overseas without microphone. |
80, 90 | Listed in the community’s sources without a known meaning. |
Region codes
Three bytes, in one of two styles. The older style lists letters in any order, with spaces anywhere, so a reader should look at all three bytes:
| Letter | Region |
|---|---|
J | Japan. |
U | The Americas. |
E | Europe. |
The newer style is a single hexadecimal digit (0–9,
A–F) at 0x1F0, whose bits name the regions:
| Bit | Value | Region |
|---|---|---|
| 0 | 1 | Domestic, 60 Hz: Japan, South Korea, Taiwan. |
| 1 | 2 | Domestic, 50 Hz: no console was sold this way. |
| 2 | 4 | Overseas, 60 Hz: the Americas and Brazil. |
| 3 | 8 | Overseas, 50 Hz: Europe and Hong Kong. |
So 4 is the Americas only, 5 Japan and the Americas,
F everywhere. E is ambiguous: as a letter it means Europe; as
a digit, everywhere except Japan. Plutiedev advises assuming Europe, and recommends the
letters for new homebrew.
Worked example
0100 SEGA MEGA DRIVE system type
0110 (C)ABCD 2024.JAN publisher ABCD, January 2024
0120 MY GAME … domestic title, spaces to 48 bytes
0150 MY GAME … overseas title
0180 GM 00000001-00 game, product 00000001, first release
018E 9C E5 checksum 0x9CE5
0190 J6 3- and 6-button pads
01A0 00 00 00 00 00 0F FF FF ROM 0x000000–0x0FFFFF (1 MiB)
01A8 00 FF 00 00 00 FF FF FF work RAM
01B0 52 41 F8 20 00 20 00 01 00 20 3F FF "RA", battery RAM on odd bytes,
0x200001–0x203FFF (8 KiB)
01BC (12 spaces) no modem
01C8 (40 spaces) reserved
01F0 JUE all regions
01F3 (13 spaces) reserved
Sources
- ROM header reference – Plutiedev: every header field, the system types, serial format, checksum, device, extra memory, modem and region codes
- 68k vector table – NeoGeo Development Wiki: the 68000’s vector numbers and addresses
- Sega Mega Drive/Interrupts and VDP register notes – via search results: the Mega Drive uses only interrupt levels 2 (external), 4 (horizontal) and 6 (vertical)
The checksum example and the worked header are made up for this page.