dborth / vbagx

Visual Boy Advance GX
http://wiibrew.org/wiki/Visual_Boy_Advance_GX
292 stars 36 forks source link

Fix MBC2 data saving (F-1 Race, Kirby's Pinball Land, etc.) #460

Closed saulfabregwiivc closed 10 months ago

saulfabregwiivc commented 10 months ago

Today i've just KO'ed the MBC2 savedata saving issue that was also plaguing VBA-GX, exactly like MBC7 until a day ago.

The old MBC2 saving routine based on gbMemory caused the savedata generated/stored on mapper MBC2 to not saved/stored correctly.

The affected games by this includes F-1 Race (Grand Prix mode progress), Kirby's Pinball Land (high scores), etc.

This fixes said issue, by replacing the save routine from gbMemory to gbRam, like the rest of the mapper saving routines. Also changes the savefile size from 256 kB to 512 kB for avoid saving issues with all MBC2 games.

Based on my MBC7 saving fix https://github.com/dborth/vbagx/commit/51702bb545de762773430147ea92b97db16f1af1, which is also based in the same fix by Steelskin.

dborth commented 10 months ago

You're on a roll!