Prevent panic on adding or sub with overflow on CPU

This commit is contained in:
2021-10-19 13:17:14 -05:00
parent f928207a8d
commit 6b1d50ba76
3 changed files with 21 additions and 19 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ pub struct Bus {
impl Bus {
pub fn new() -> Self {
let game_rom = match ROM::load_file("roms/cpu_instrs_individual/02-interrupts.gb".to_string()) {
let game_rom = match ROM::load_file("roms/cpu_instrs_individual/03-op sp,hl.gb".to_string()) {
Ok(rom) => rom,
_ => ROM::from_bytes(&[0; 0xFFFF])
};