Sega Master System / Mark III / Game Gear
This is a conversion of an old document. See SDSC Header for a shorter, snappier version.
August 29, 2001
This document serves as the specification for the SDSC ROM tag. The SDSC ROM tag provides information about a program in addition to any information already included in the standard SMS/GG header. This specification also serves to document what is currently known about the standard SMS/GG header.
It should be noted that many commercial ROMs don't conform to the standard SMS/GG header - many Japanese roms have other data in the header area, since they don't need a checksum; some don't even have the TMR SEGA (Loletta No Shozou has FFs instead). A lot of games don't have the part number, some even have different values there for alternate versions. (Courtesy Maxim)
To maintain compatibility with previous versions of the SDSC ROM Tag, both the value 0x0000 (the reserved setting in previous specifications) and 0xFFFF are used to indicate a NULL (no string present) program author string.
The 16-bit addresses imply that the program author, program name and release notes strings must reside in one of the first four pages of ROM. These pages do not necessarily need to be mapped into addressable space at run-time. Also, an address of 0xFFFF indicates a NULL string (no string present).
The 16-bit word at 0x7FF8 (and 0x7FF9) contains an unknown value. It is often 0x0000, 0x2020 or 0xFFFF, all of which are "nothing" values (0x20 being ASCII space). ROMs with values there seem to be ones without full headers, for example Japanese SMS games. This area should be considered reserved. Recommended data is 0xFFFF. (Courtesy Maxim and Zoop)
The 16-bit word at 0x7FFA (and 0x7FFB) contains the checksum, in big endian format. It is a 16-bit accumulator, you start at 0 and sum the bytes over the checksummed range, dropping the 17th bit whenever it appears (ie. FFFF + 1 = 0000). The range depends on the byte at 0x7FFF, see Note #7 below. (Courtesy Maxim)
The 16-bit word at 0x7FFC (and 0x7FFD) contain the part number - the game number as on the side of the box. It's big-endian BCD. The part number can be used to find what type the cartridge was:
A second digit of 5 indicates a Plus cartridge, ie. one with battery-backed ram. There's a more complete list in my program's readme, and as I mentioned GG games are different. (Courtesy Maxim)
The byte at 0x7FFE is apparently a version byte. The high nibble is nearly always 2 when the game number begins with a 2, ie. for 3rd-party releases. The low nibble can vary, but it is nearly always 0. (Courtesy Maxim and Zoop)
The byte at 0x7FFF is split into two nibbles, where a value of 0xXY has a high nibble of 0xX and a low nibble of 0xY. The high nibble is the country code, again taken from Zoop's checksummer source:
Export, of course, means outside Japan. The low nibble defines the range over which to checksum the file:
The checksum range is always less than or (usually) equal to the rom size. 4-mega and larger roms are never checksummed over 256KB. (Courtesy Maxim and Zoop)