Skip to content

libretro: report that states are incomplete - #63

Open
sunlollyking wants to merge 1 commit into
libretro:masterfrom
sunlollyking:serialization-quirks
Open

sunlollyking wants to merge 1 commit into
libretro:masterfrom
sunlollyking:serialization-quirks

Conversation

@sunlollyking

@sunlollyking sunlollyking commented Oct 16, 2026 •

Copy link
Copy Markdown

I play SNES games in Kodi with the run-ahead I'm adding to it, and with bsnes the screen stayed black. Run-ahead loads a state every frame, and loading a state reinitializes the system (power(false) in System::unserialize), so from power-on the game never boots. Loading every frame once a game is already running is fine, and so is an occasional load.

This reports RETRO_SERIALIZATION_QUIRK_INCOMPLETE, which libretro.h describes as states that are fine for normal saves but shouldn't be relied on for frame-sensitive features. RetroArch's core info already lists bsnes as serialized rather than deterministic, so RetroArch doesn't run it ahead, and the Kodi run-ahead holds off for a core that reports the quirk. The core's own run-ahead option is unaffected.

Tested with Super Mario All-Stars + Super Mario World:

  • A small libretro harness loading a state after every frame from power-on: black for all 600 frames. Starting at frame 200, or loading once, the picture is normal.
  • Kodi on Linux with that run-ahead at 2 frames: black before, and with this change run-ahead holds off and the game boots.

Loading a state reinitializes the system. A frontend that loads one
every frame from power-on, as run-ahead does, keeps the game from ever
booting and shows a black screen.

Report RETRO_SERIALIZATION_QUIRK_INCOMPLETE so frontends don't rely on
states for run-ahead or netplay.
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