fix(cart): keep Action Replay chipmem hooks installed - #42
Merged
Merged
Conversation
check_prefs_changed_custom() unconditionally restored the plain chipmem put handlers, wiping the chipmem_*put_actionreplay23 hooks that action_replay_setbanks() installs. Without them the cart never advanced past ACTION_REPLAY_WAITRESET, so the freeze button did nothing for Action Replay 1/2/3 while HRTMon (no chipmem hooks) kept working. The restore is a leftover from the 2021 fast-copper work: it originally swapped the _fc handler variants in and out; a later cleanup removed the variants but kept the reset. Full amiberry has no equivalent block. Fixes #3
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Fixes #3
Root cause
Since the 5.x line, selecting an Action Replay MK I/II/III ROM cartridge loads the ROM but the freeze button does nothing (HRTMon keeps working).
action_replay_setbanks()installschipmem_*put_actionreplay23handlers that watch for the first Kickstart chipmem write to move the cart out ofACTION_REPLAY_WAITRESET(chipmem_lput_actionreplay23→action_replay_chipwrite()→DORESET).check_prefs_changed_custom()then ran right after startup and unconditionally restored the plain handlers:With the hooks gone, the cart stayed in
WAITRESETforever, soaction_replay_freeze()returned 0 on every press.The block is a leftover of the 2021 "Fast copper improvements" work (486db89): it originally swapped the
_fcchipmem variants in and out; a later cleanup removed the variants but kept the reset. Upstream amiberry (and WinUAE) has no equivalent block — deleting it restores parity.Verification
A500 + KS 1.3 + AR MK III v3.17, no disks:
action_replay_freeze()showsar_flag = -1(WAITRESET) on every freeze press; no menu.AR2/3: reset), freeze (F8) opens the Action Replay menu, exit/re-enter stable.chipmem_*put_actionreplay1) is equally affected and fixed by the same deletion.