potatis/nes/tests/common.rs
2023-04-13 13:23:44 +02:00

11 lines
299 B
Rust

use std::path::PathBuf;
use nes::cartridge::Cartridge;
use nes::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
}