rynorris / nes

NES emulator written in Rust
MIT License
11 stars 0 forks source link

Save States #28

Closed rynorris closed 5 years ago

rynorris commented 5 years ago

Stuff to store

Format

Thinking about going with JSON, with base64 encoded blobs for the memory dumps. Or perhaps a binary format like msgpack?

rynorris commented 5 years ago

By basing the implementation on Serde we should be able to switch out serialization formats at will.

Implementation plan:

rynorris commented 5 years ago

Possibly don't even need to store PPU state for a v0. We don't reset it on reset for example and it always recovers itself. The downside being that if you load a save state with the emulator paused, it's not going to render anything until you unpause.

rynorris commented 5 years ago

Changing my mind on the implementation plan. I think I would prefer to keep the serializable state objects totally separate in a separate package, and then just have methods to convert each thing into serializable form. This will make the save state API easier to track and thus easier to avoid breaking changes to the format.