io.rs: Dump memory to file (already used by main, oops!)

This commit is contained in:
John 2023-03-25 18:33:05 -05:00
parent edd2b60665
commit 5520d4ab69

View File

@ -134,3 +134,11 @@ pub fn get_keys(window: &mut Window, cpu: &mut CPU) {
.iter() .iter()
.for_each(|key| cpu.press(identify_key(*key))); .for_each(|key| cpu.press(identify_key(*key)));
} }
pub fn debug_dump_screen(bus: &Bus) -> Result<()> {
Ok(std::fs::write(
"screen_dump.bin",
bus.get_region(Region::Screen)
.expect("Screen should exist, but does not"),
)?)
}