!!Introduction Codemasters games for the [[Hardware/Master System]] and [[Hardware/Game Gear]] include an extra header and internal checksum routines. This is useful to check the ROM for errors because the normal [[BIOS#checksum|BIOS checksum routine]] does not work due to the different [[mapper(s#codemasters)]]. It also stores the date and time the game was last compiled and displays this on the host system. !! Accessing For most games, the checksum routine can be activated by holding a key combination at startup. Holding [U]+[1]+[2] on controller 1 will work in most cases. !!Format The header is found at offset @@$7fe0@@ in the file. ||border=1 ||! Offset||! Size ||!Meaning || || @@$7fe0@@ || Byte ||Number of 16KB banks over which to calculate the checksum || || @@$7fe1@@ || Byte ||Day || || @@$7fe2@@ || Byte ||Month || || @@$7fe3@@ || Byte ||Year || || @@$7fe4@@ || Byte ||Hour (24 hour clock) || || @@$7fe5@@ || Byte ||Minute || || @@$7fe6@@ || Word ||Checksum || || @@$7fe8@@ || Word ||$10000 - checksum || || @@$7fea-$7fef@@ are all zero. |||||| * The date and time bytes are BCD. For Cosmic Spacehead they are @@31 08 93 10 59@@ for 31st August, 1993, 10:59 am. * The checksum is found by summing (little-endian) 16-bit values over the entire file to a 16-bit accumulator, except for the Sega header at $7ff0 to $7fff. The checksum word and the word after it sum to zero, allowing the checksum to be added to the file without changing the value that will be calculated. Both are stored in [[little-endian]] format.