1
FXPAK (SD2SNES) / Re: SD2SNES mysteriously deleting save files
« on: November 06, 2019, 12:44 AM »
The problem is a MVN executed on the SA1 at instruction address $C0AAE1. The destinations starts at $408000 which wraps the 32KB SA1 work RAM and overwrites the save slots that happen to be at the beginning. It has something to do with the different state stored at $4F0-$4FF in SA1 work RAM as compared to the vanilla ROM. That's probably a result of the ROM changes in the randomizer. Maybe check that the boss or boss sprites change the randomizer makes on that screen are compatible. I know next to nothing about SMRPG so that's all I can help with.
Both bsnes-plus and mesen-s also have the same failure. Put a breakpoint on a write to $408000 "SA-1 Bus" in bsnes-plus to find it on the screen transition.
The match of the ROM CRC in firmware does not affect the running game's use of work RAM.
EDIT: Looks like newer versions of bsnes-plus implement the cart work RAM write protection feature which hides the bug. That's probably why most emulators don't overwrite the save RAM region at the beginning of work RAM. It's possible some of them may also NOP memory overflows rather than masking the address and having it wrap.
Both bsnes-plus and mesen-s also have the same failure. Put a breakpoint on a write to $408000 "SA-1 Bus" in bsnes-plus to find it on the screen transition.
The match of the ROM CRC in firmware does not affect the running game's use of work RAM.
EDIT: Looks like newer versions of bsnes-plus implement the cart work RAM write protection feature which hides the bug. That's probably why most emulators don't overwrite the save RAM region at the beginning of work RAM. It's possible some of them may also NOP memory overflows rather than masking the address and having it wrap.