Repository navigation
0.8.0
This release adds save states and rewind (Issue #40).
- Save states: four slots. They survive restarting the app and can be copied to another platform, within the same version of the game.
- Keyboard: F8 saves, F9 loads, F10 picks the slot.
- Pause menu: STATES has SAVE STATE, LOAD STATE, SLOT and REWIND, so they also work on touch screens.
- Gamepad: save and load have no button by default. You can give them one in CONTROLS > STATES AND REWIND, where all of these can be rebound.
- Loading a state never rolls back the DATA slots: the game's own save is kept as it is.
- A state saved with another ROM, another set of ROM patches or another version of the game is refused with a message.
- States are kept in
States/in your data folder.
- Rewind: hold Backspace or the gamepad's left trigger to go back in time; let go to play on from there.
- It keeps up to 60 seconds (less in the special stage, which changes more each frame).
- It is on by default on Windows, Linux and macOS, and off on Android and iOS to save battery and memory: turn it on with REWIND on the pause menu's STATES page or in CONTROLS > STATES AND REWIND. On touch screens there is an optional rewind button (CONTROLS > STATES AND REWIND > TOUCH REWIND).
- Taking the snapshots costs about 0.1–0.2 ms per frame.
- Fair play: save states and rewind are off during TIME ATTACK runs, and the rewind history is cleared when a stage starts. Awards can still be earned after a load or a rewind, but a jump in time can't count toward one.
- Fix: returning to the title could leave the recompiled code's caches in a stale state. They are now reset, as a load does.
- Details: docs/SAVE_STATES.md.
Validation:
- Windows: all 60 CTest cases pass. New tests:
- a state saved and loaded in a level, the special stage, a widescreen level and the widescreen bonus stage carries on with identical pictures and an identical machine for 300 frames, and in lockstep for 300 more;
- rewinding restores each of 1200 snapshots exactly, and keeps to its memory budget;
- states from another ROM, patch set or version, and damaged files, are refused;
- the DATA slots are never rolled back.
- Lockstep: all 33 sweep runs with random input are bit-identical.
- macOS (M1): all 57 CTest cases pass and lockstep is bit-identical on arm64.
- Linux: all 57 Linux CTest cases pass.
- Packages: the packaged Windows and Linux builds pass the startup tests.
- Android: the APKs have not been tested on a device for this release.
Downloads: the Windows x64 zip, the Linux x64 tar.gz, the macOS arm64 zip, the iOS .ipa, and two Android APKs: arm64-v8a/x86_64 (the usual one) and armeabi-v7a (32-bit ARM). Both APKs use version code 31 and the same signing certificate as 0.7.1, so they update in place.
You must supply your own Knuckles' Chaotix (Japan, USA) ROM. No ROM image or game assets are included.