potatis/nes/tests/common.rs
2022-09-27 21:30:23 +02:00

10 lines
No EOL
291 B
Rust

use std::path::PathBuf;
use nes::{cartridge::Cartridge, nes::Nes};
pub fn setup(path: PathBuf, verbose: bool) -> Nes {
let cartridge = Cartridge::blow_dust(path).expect("failed to map rom");
let mut nes = Nes::insert_headless_host(cartridge);
nes.debugger().verbose(verbose);
nes
}