Drive server: savestates, ff6cli --serve, ff6_drive MCP plugin #13
Loading…
Reference in a new issue
No description provided.
Delete branch "drive-server"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Drive server and MCP adapter (brief §8.3), first version.
Content
ff6_debug.h):ff6_debug_state_save/load(in-memory savestate of the whole core: LakeSnes state + frame counter + picture buffer + audio ring buffer and last frame audio, so a loaded state shows and plays exactly as saved; version-checked header, invalid states rejected with the core unchanged),ff6_debug_memory_write(poke WRAM/VRAM/CGRAM/OAM/SRAM),ff6_debug_frame_output(current picture without running a frame). Port modes and counters are not part of a state; a pending shadow call is cancelled and counted as skipped on save and on load.ff6cli --serve(hosts/cli/serve.c): line protocol on stdin/stdout, oneok/errreply per command,key=valuepairs:info,run,peek,poke,save/load(slots 0-9),shot,port,ports,quit. Errors never stop the server. Documented indocs/build.md.tools/mcp/tools/ff6_drive.py(stdlib only):ff6_start/stop/info/run/screenshot/peek/poke/save_state/load_state/port/ports, one ff6cli process kept inctx.state; screenshot returned as an MCP image. Clear errors for missing binary/ROM/session.rom.savestate.{US,JP}_V10(save at frame 690, run 150 frames across the A press, load, replay: identical per-frame picture+audio hashes on the same core and on a second core; invalid state rejected; poke checks),rom.serve.{US,JP}_V10(CMake script feeds a command file toff6cli --serve, checks all 17 replies and that the picture afterloadequals the one atsave; runs under wine too).tools/mcp/tests/test_ff6_drive.pydrives the MCP host over stdio (exit 77 when host/build/ROM missing).Validation
ctest: 9/9 passed, slow included (687.9 s; rom.ports 311.6 s US / 308.6 s JP, savestate 11.4 s, serve 5.8 s).ctest -LE slow: 7/7 passed (245.9 s).ctest -LE slowunder wine: 7/7 passed (79.6 s).Not covered
Fixes #6
🤖 Generated with Claude Code