MBC2 battery save format

Back to main page

MBC2 ram consists of 256 bytes which are accessible as the low 4 bits of a 512 bytes address range, $a000-$a1ff. the upper 4 bits always read high ($f0).

BGB saves this as a 512 bytes file, which directly maps to this address area. the upper 4 bits in the file are undefined. other emulators may save 256 bytes, packing the bits. i chose to not do this, because this allows for ambiguity between emulators: which bits go in the low bits/high bits? a 512 bytes file can only be interpreted in one way. i also choose to save in this 512 byte format for compatibility with generic sram emulation (not emulating MBC2 correctly)

i've seen sav files circulating that were saved by an old BGB, possibly version 1.02 (the files are from 2005), here: final fantasy legend save files.
they are 8192 bytes in size, because the BGB from that time did not accurately implement MBC2 ram. they work in current BGB because it ignores save data past the size it expects.