Skip to content

Conversation

@Screwtapello
Copy link
Contributor

When making a save state, all the system components are "fast forwarded" to a safe state that can be serialised. If delayedSync (called "Coprocessor Fast Sync" in the UI) is enabled, this works perfectly. If it is disabled, the accurate coprocessor synching interferes with the save-state creation, leading to the game crashing or (worse) the emulator freezing.

Star Fox is a good test case - repeatedly saving state and loading it will very quickly cause the game to run super-slowly, hang, or crash.

Ideally, somebody should dig into exactly what coprocessor syncing is doing that breaks the assumptions of the state-saving code, but given how complex the whole thing is, and given that it doesn't affect hardware emulation accuracy (real hardware can't save states at all), it's easiest to just force- enable delayedSync while a save-state is in progress.

Fix from the jgemu bsnes fork:
https://gitlab.com/jgemu/bsnes/-/commit/8b4d1b8ae5b360bbb31aad260da0a160b5a5a758

When making a save state, all the system components are "fast forwarded" to a
safe state that can be serialised. If delayedSync (called "Coprocessor Fast
Sync" in the UI) is enabled, this works perfectly. If it is disabled, the
accurate coprocessor synching interferes with the save-state creation, leading
to the game crashing or (worse) the emulator freezing.

Star Fox is a good test case - repeatedly saving state and loading it will very
quickly cause the game to run super-slowly, hang, or crash.

Ideally, somebody should dig into exactly what coprocessor syncing is doing
that breaks the assumptions of the state-saving code, but given how complex
the whole thing is, and given that it doesn't affect hardware emulation
accuracy (real hardware can't save states at all), it's easiest to just force-
enable delayedSync while a save-state is in progress.

Fix from the jgemu bsnes fork:
https://gitlab.com/jgemu/bsnes/-/commit/8b4d1b8ae5b360bbb31aad260da0a160b5a5a758
@Screwtapello Screwtapello merged commit 710d92c into bsnes-emu:master Sep 18, 2024
4 of 5 checks passed
@Screwtapello Screwtapello deleted the fix-coprocessor-save-states branch September 18, 2024 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant