Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign up3ds savestates #851
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
endrift
Aug 8, 2017
Member
The former isn't fixable for very specific reasons:
Some GB/C games use the save RAM as an additional work RAM buffer since it can be fairly sizable compared to the built-in RAM on the Game Boy. As a result, not bundling or loading with a savestate leads to bugs like #834.
My solution is to only write the reloaded save data back to the file if it gets written to again. This solves issues wherein games DON'T use them as a work buffer, but leads to the side effect where games that do do it will get the save file written back to disk after loading a savestate and playing the game more.
Moreover, not writing back anything after loading a savestate would break saving after loading a savestate entirely. There is unfortunately no middle ground that will work in all cases without overwriting savedata (unless you build a gigantic database of regions used as work buffers in various games, but that is a humongous amount of effort) so I settled with one that works all of the time but overwrites savedata in a minority of cases. I can try to make it possible to override this per game but it will be very difficult, so it's not a priority right now.
As for the RTC issue that sounds like an actual bug. I'll look into it hopefully soon.
|
The former isn't fixable for very specific reasons: Some GB/C games use the save RAM as an additional work RAM buffer since it can be fairly sizable compared to the built-in RAM on the Game Boy. As a result, not bundling or loading with a savestate leads to bugs like #834. My solution is to only write the reloaded save data back to the file if it gets written to again. This solves issues wherein games DON'T use them as a work buffer, but leads to the side effect where games that do do it will get the save file written back to disk after loading a savestate and playing the game more. Moreover, not writing back anything after loading a savestate would break saving after loading a savestate entirely. There is unfortunately no middle ground that will work in all cases without overwriting savedata (unless you build a gigantic database of regions used as work buffers in various games, but that is a humongous amount of effort) so I settled with one that works all of the time but overwrites savedata in a minority of cases. I can try to make it possible to override this per game but it will be very difficult, so it's not a priority right now. As for the RTC issue that sounds like an actual bug. I'll look into it hopefully soon. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Remobit
Aug 8, 2017
Sure, I just assumed it was a bug so reported it. It will be no problem to get used to this system, cheers.
Remobit
commented
Aug 8, 2017
|
Sure, I just assumed it was a bug so reported it. It will be no problem to get used to this system, cheers. |
Remobit
closed this
Aug 8, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
PS, RTC issue has now been fixed too |
Remobit commentedAug 8, 2017
•
edited
Edited 1 time
-
Remobit
edited Aug 8, 2017 (most recent)
(mGBA-build-2017-08-06-3ds-4786, tested only with gbc games, as I'm away from a New 3DS currently)
Loading a savestate causes tha save file (.sav) to be overwritten by the save file present during creation of the savestate.
+a small request if it's not too much trouble. Could we get the rtc running off a separate file? Loading a savestate sets the clock back to when it was taken (again, tested only with gbc games).