fix: picodrive crash when enabling cheats in SMS mode#719
Open
nborodikhin wants to merge 1 commit into
Open
Conversation
retro_cheat_set and retro_cheat_reset called m68k_read16/m68k_write16 for patch addresses outside ROM range without checking for SMS mode. In SMS mode the M68K memory map is uninitialised, causing a SIGSEGV. Add PAHW_SMS guard so the M68K accessors are only used for Genesis/MD. RAM patching on SMS was never correctly implemented anyway since the SMS uses a Z80, not an M68K.
Member
|
Im not going to start patching around in cores (more than necessary), please contribute fixes to the upstream core repos. |
Member
|
Leaving this open as a reminder so we can pull the latest core when this lands. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Using Action Replay cheats for Sega Master System causes a SIGSEGV crash in picodrive core.
The issue is that Action Replay hardware patches RAM region, but picodrive only supports RAM patching (customary for Game Genie hardware).
Changes
!(PicoIn.AHW & PAHW_SMS)guard so the M68K accessors are only reached when actually emulating a Genesis/Mega DriveThe same fix is also posted to upstream: irixxxx/picodrive#218
Test plan