MBC3 RTC save format
Back to main page
the RTC data is appended after the sav file, 44 or 48 bytes. you can detect its presence by the save data being 44 or 48 bytes bigger than the cart's ram size, or 44 or 48 bytes bigger than a multiple of 8192.
old VBA (from 2005) saves the 44 bytes version, and can load both the 44 and 48 bytes version.
VBA-M saves the 48 bytes version, and can *only* load the 48 bytes version.
one should load both types, and always save the 48 bytes version.
the data consists entirely of little endian (intel order) dwords. as the registers are bytes, it's in the first byte of the field, the other bytes should always be 0.
time is the internal "hidden" version. latched time is what you're reading from the registers.
the unix timestamp is UTC seconds since 1970-01-01 00:00, a very common standard on internet. again, the lowest byte goes first.
offset size desc
0 4 time seconds
4 4 time minutes
8 4 time hours
12 4 time days
16 4 time days high
20 4 latched time seconds
24 4 latched time minutes
28 4 latched time hours
32 4 latched time days
36 4 latched time days high
40 4 unix timestamp when saving
44 4 0 (probably the high dword of 64 bits time), absent in the 44 bytes version