Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GB: use upstream MBC2 savedata (saving/loading) handling. #474

Merged
merged 1 commit into from
Apr 19, 2024

Conversation

saulfabregwiivc
Copy link
Contributor

@saulfabregwiivc saulfabregwiivc commented Apr 18, 2024

I've taken again some MBC2 savedata handling code from upstream VisualBoyAdvance-M code (instead of that hacky gbRam for MBC2 since gbMemoryMap for MBC2 doesn't get deleted at reset) before they changed everything to gbCartData, which isn't present in VBA-GX.
MemgbWriteSave and MemgbReadSave for MBC2, specific functions used on VBA-GX, also have been changed for reflect the new changes.
(See https://github.com/visualboyadvance-m/visualboyadvance-m/blob/9889ef4fa8dfc50fd15591c066f0b9df9411240f/src/gb/GB.cpp for see where did i took this)

I retested F-1 Race, Kirby's Pinball Land, Golf, and a few other MBC2 games, and seems saving/loading is still working since last time i digged into MBC2 savedata handling on VBA-GX.

Currently in further testing, but i will leave this PR as a draft meanwhile.

Taken from upstream VisualBoyAdvance-M code.
Hope i didn't break MBC2 saving this time...
@saulfabregwiivc saulfabregwiivc marked this pull request as ready for review April 19, 2024 00:34
@saulfabregwiivc
Copy link
Contributor Author

After further testing, i can confirm MBC2 games with this update from upstream it can still save and load savedata on MBC2 games correctly.

@dborth dborth merged commit 9655bf6 into dborth:master Apr 19, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants