Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GB: fix 32/64 bit save/state incompatibility
The MBC3 and TAMA5 battery formats save the RTC data including a `time_t` field which is the last field. Since `time_t` is 32 bits for 32 bit builds and 64 bits for 64 bit builds, pad it in the two battery structs with a `uint64_t` and detect the 4 byte shorter saves made by older 32 bit builds. Also remove some pointless code in save state reading that also uses `sizeof(time_t)`. Add two new constants for RTC data size in gbMemory.h and use them. Signed-off-by: Rafael Kitover <rkitover@gmail.com>
- Loading branch information
Showing
4 changed files
with
25 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters