Core::save_state and load_state work and are covered by tests, and run-ahead uses them every frame — but there is no way for a player to reach them.
What's needed
- Slots (say 1–8) plus a quick-save/quick-load on a hotkey.
- A thumbnail per slot, which is free: we already have the framebuffer.
- Refuse a state written by a different core build.
load_state already rejects a length mismatch, but a same-length state from another version is accepted and produces a corrupted game rather than a clean failure. Record the core name and version alongside each state and check it.
- Respect
state_persistence_blocker() — cores that report SINGLE_SESSION or the endian/platform-dependent quirks must not offer persistent slots at all, because those states genuinely cannot be reloaded later.
Core::save_stateandload_statework and are covered by tests, and run-ahead uses them every frame — but there is no way for a player to reach them.What's needed
load_statealready rejects a length mismatch, but a same-length state from another version is accepted and produces a corrupted game rather than a clean failure. Record the core name and version alongside each state and check it.state_persistence_blocker()— cores that reportSINGLE_SESSIONor the endian/platform-dependent quirks must not offer persistent slots at all, because those states genuinely cannot be reloaded later.