2 Commits
Author SHA1 Message Date
Thomas MartinandClaude Opus 5.5 b73692ed37 Save states: the whole runtime saved and loaded at the dispatcher's safe point
A state is taken at the top of Dispatcher::run's loop, where no guest code is on
the host stack: memory, the dispatcher, the kernel (threads, frames, queues,
deadlines), every library's state, the native IOP host (memory, tasks, kernel
objects, RPC servers, mixer, libsd) and sections ports add (state::Sections).

Parked library lambdas become data: Resume records and native deadline kinds,
rebuilt from tables on load; ports can add their own kinds. FreeHost serves
requestSave / requestLoad from any thread, rolls back a failed load, and takes
FreeOptions (gameTag, loadState[Frame], saveState[Frame]). Windows get ten slots:
F5 save, F7 load, F6 / Shift+F6 select, and a Save states tab in F2.

989SND's engine and a playing movie are not covered: a save waits, saying why.
docs/save-states.md tells a port how to use and check it; tests/runtime/state_tests.cpp
covers the archive, files and a dispatcher round trip.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-18 18:22:15 +01:00
ArzarothandClaude Opus 5.5 6ed186a363 [sc3/libs] feat(timer): libkernel's timer library and DelayThread by name, on deadlines, with no timer interrupt
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 21:40:43 +01:00