wip
/ build (push) Successful in 24s Details

This commit is contained in:
45Tatami 2024-05-07 19:41:25 +02:00
parent 34de965cd5
commit 032b5868da
1 changed files with 6 additions and 3 deletions

View File

@ -141,9 +141,12 @@ impl GameBoy {
Err(e) => panic!("{e}"), Err(e) => panic!("{e}"),
}; };
let mut bios = fs::File::open("DMG_ROM.bin").expect("could not open bios"); let bios_filename = "DMG_ROM.bin";
bios.read_exact(&mut self.boot_rom) if let Ok(mut bios) = fs::File::open(bios_filename) {
.expect("fail to read rom"); bios.read_exact(&mut self.boot_rom).expect("fail to read rom {bios_filename}");
} else {
println!("could not find bios file; continuing without");
}
} }
pub fn register_breakpoint(&mut self, adr: &str) { pub fn register_breakpoint(&mut self, adr: &str) {