https://gitlab.synchro.net/main/sbbs/-/commit/4b2108614de42f5a56532ae1
Added Files:
exec/tests/syncretro_state_test.js src/doors/syncretro/syncretro_state.c syncretro_state.h test_statekey.c
Modified Files:
exec/load/syncretro_lib.js src/doors/syncretro/CMakeLists.txt
Log Message:
syncretro: pin the suspend/resume snapshot staleness key
A libretro save-state blob carries no version stamp, so restoring one
into a core, romset or option set it was not taken from feeds the
emulator garbage. Add sr_state_key() (C) and syncretro_state_key() / syncretro_state_opts() (JS), which independently compute the same
8-hex-digit key from core_md5 + rom_md5 + flattened options: MD5 of "core_md5\nrom_md5\nopts", first 8 hex digits.
The lobby will use this key to decide which cartridges show as
resumable; the door will use it to name the snapshot file. If the two
halves ever computed it differently, the lobby would mark a game as
resumable and the door would then silently decline to resume it, with
nothing reporting an error. test_statekey.c and exec/tests/syncretro_state_test.js pin both halves to the same golden
value (38ed1f37) for identical fixed inputs, so any future drift
between the two recipes fails a test instead of failing silently in
production.
Co-Authored-By: Claude Opus 5 (1M context) <
noreply@anthropic.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net