feat(desktop): run ROM files in a window with keypad input
Add --rom PATH --window with optional bounded --frames execution. Capture from BIOS boot, pump native events between bounded machine slices, retain frames during STOP, and sample keypad input for wake-up. Share final machine reports with terminal mode. Add an original file-exportable input ROM, controller and CLI regressions, and opt-in native window tests. Document controls, frame limits, STOP behavior, and compatibility limits. Verified on Darwin arm64: debug/release workspace and core tests, Clippy, rustdoc, native ROM diagnostics, all ten demo smoke tests, and a 60-frame release ROM run.
This commit is contained in:
parent
c256bf8ccd
commit
109c1ffe81
19 changed files with 919 additions and 57 deletions
31
crates/desktop/examples/write_rom_demo.rs
Normal file
31
crates/desktop/examples/write_rom_demo.rs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
//! Export original input-test instructions, never game or firmware content.
|
||||
use std::{
|
||||
error::Error,
|
||||
fs::OpenOptions,
|
||||
io::{self, Write},
|
||||
};
|
||||
|
||||
fn main() -> Result<(), Box<dyn Error>> {
|
||||
let mut args = std::env::args_os().skip(1);
|
||||
let path = args.next().filter(|path| !path.is_empty()).ok_or_else(|| {
|
||||
io::Error::new(
|
||||
io::ErrorKind::InvalidInput,
|
||||
"usage: write_rom_demo OUTPUT_PATH",
|
||||
)
|
||||
})?;
|
||||
if args.next().is_some() {
|
||||
return Err(io::Error::new(
|
||||
io::ErrorKind::InvalidInput,
|
||||
"usage: write_rom_demo OUTPUT_PATH",
|
||||
)
|
||||
.into());
|
||||
}
|
||||
let mut file = OpenOptions::new()
|
||||
.write(true)
|
||||
.create_new(true)
|
||||
.open(&path)?;
|
||||
file.write_all(&gba_demos::input_rom())?;
|
||||
file.flush()?;
|
||||
println!("Wrote original input-test ROM to {path:?}. Blue: idle; Z: red; Right: green.");
|
||||
Ok(())
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue