Skip to content

Fix save-state serialization of CPU dataBus and controller state#650

Open
SergioChan wants to merge 2 commits intobfirsh:mainfrom
SergioChan:issue-614-state-serialization
Open

Fix save-state serialization of CPU dataBus and controller state#650
SergioChan wants to merge 2 commits intobfirsh:mainfrom
SergioChan:issue-614-state-serialization

Conversation

@SergioChan
Copy link

@SergioChan SergioChan commented Mar 7, 2026

Summary

  • add dataBus to CPU JSON serialization properties so open-bus state survives save/load
  • add JSON serialization methods for Controller and include both controllers in NES save state payload
  • restore controller state in NES.fromJSON() when present
  • add a regression test ensuring cpu.dataBus and controller turbo/button state round-trip through save/load

Testing

  • node --test test/nes.spec.js
  • full npm test was not runnable in this environment because prettier is not executable (sh: 1: prettier: Permission denied)

Related

Fixes #614

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.

State serialization gaps: CPU dataBus, controller state not saved

1 participant