feat(core): add whole-machine save states with F5/F9 window slots
Machine::save_state and load_state encode the CPU, every RAM, and every device through Snapshot impls into a versioned, checksummed format. Rejected loads leave the machine unchanged. The ROM window saves to and loads from one state file with F5 and F9.
This commit is contained in:
parent
be9c676476
commit
fd73788735
55 changed files with 5157 additions and 20 deletions
|
|
@ -38,6 +38,11 @@ impl TileDemo {
|
|||
}
|
||||
}
|
||||
|
||||
/// The original Mode 0 scene as a raw ROM, for hosts that drive their own machine.
|
||||
pub fn rom() -> Vec<u8> {
|
||||
program(Scene::Tiles)
|
||||
}
|
||||
|
||||
fn literal(code: &mut Vec<u32>, patches: &mut Vec<(usize, u32, u32)>, reg: u32, value: u32) {
|
||||
patches.push((code.len(), reg, value));
|
||||
code.push(0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue