[Runahead Issue] - Using Runahead with SegaCD/MegaCD Corrupts Internal Saves
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 14.1k
- Forks
- 2.2k
- Avg merge
- 7h 35m
- Merged PRs (30d)
- 51
Description
Description
When you run the Genesis Plus GX 1.7.4 (5055106) core with a SegaCD/MegaCD game in conjunction with runahead the "Internal RAM" saves that the core manages have the chance of being corrupted.
Expected behavior
Ideally the saves are not corrupted, with runahead turned on.
Actual behavior
When you attempt to make a Save, in my case I am playing "Popful Mail," it saves to all available slots with the time being 00:00. When you attempt to Load the Save you just made it does not recognize the Saved data.
Steps to reproduce the bug
- Start with a clean slate, with no saves in the internal memory (Ensure no cart.brm and/or scd_u.brm is present in the retroarch saves folder directory).
- Make sure runahead is enabled.
- Launch the SegaCD/MegaCD game.
- As soon as you enter an area where you are able to save attempt to make a save.
- Try to load the save you just made. (It should not be able to)
- Go back and look at the save you just created. (All Slots are Filled, where only one should be).
- Repeat Step 1-6 but this time have runahead turned off. Everything should work.
- (Optional) Ensure no cart.brm and/or scd_u.brm is present in the retroarch saves folder directory on successive attempts. I think that once a save is successive you are able to play normally, however over time it is possible for it to become corrupted, if runahead is turned on.
Bisect Results
Here is a video demonstrating the issue: https://www.dropbox.com/s/p81ku3lw19xd6dl/Runahead_SegaCD_Corrupts_Saves.mp4?dl=0
First launch in the video shows the bad behavior.
NOTE: I did delete the cart.brm and scd_u.brm between the two play sessions.
Second launch in the video shows expected/normal behavior.
Just a bit more troubleshooting info:
I attempted this using the US 2.21 BIOS and believed my issue was using an unsupported BIOS version. But the same results occurred on supported 2.00 BIOS.
I was also running the game from a CHD format and not a BIN/CUE format. But same issued occurred regardless of format.
I was also using a patched version of a game in CHD format. But playing the original raw unpatched version yielded the same results.
My last attempt was to disable runahead and see if that was causing some odd behavior. And sure enough it was the culprit.
Version/Commit
You can find this information under Information/System Information
- RetroArch: v1.8.6 commit-25be09acd3
Environment information
- OS: Win10-1907 x64
- Compiler: MinGW (9.2.0) 64-bit
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Start by reproducing the SegaCD/MegaCD save failure with RetroArch runahead enabled and disabled, then trace the runahead and internal-save behavior; done means saves remain valid and loadable with runahead enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100