diff --git a/lib/src/processor/memory/rom/mbcs/mbc1.rs b/lib/src/processor/memory/rom/mbcs/mbc1.rs index 7677105..a8b57e3 100644 --- a/lib/src/processor/memory/rom/mbcs/mbc1.rs +++ b/lib/src/processor/memory/rom/mbcs/mbc1.rs @@ -68,7 +68,7 @@ impl Mbc1 { } 0xA000..0xC000 => panic!("passed ram address to rom address function"), - _ => panic!("address {address} incompatible with MBC1"), + _ => panic!("address {address} incompatible with MBC"), } % self.rom_len) } @@ -85,7 +85,7 @@ impl Mbc1 { + (self.upper_banks as usize * 16 * KB) } }, - _ => panic!("address {address} incompatible with MBC1"), + _ => panic!("address {address} incompatible with MBC"), } } diff --git a/lib/src/processor/memory/rom/mbcs/mbc3.rs b/lib/src/processor/memory/rom/mbcs/mbc3.rs index 613c85a..92b1022 100644 --- a/lib/src/processor/memory/rom/mbcs/mbc3.rs +++ b/lib/src/processor/memory/rom/mbcs/mbc3.rs @@ -134,7 +134,7 @@ impl Mbc3 { let internal_addr = address as usize - 0x4000; internal_addr + (ROM_BANK_SIZE * self.rom_bank as usize) } - _ => panic!("address {address} incompatible with MBC5"), + _ => panic!("address {address} incompatible with MBC"), } % self.rom_size) } diff --git a/lib/src/processor/memory/rom/mbcs/mbc5.rs b/lib/src/processor/memory/rom/mbcs/mbc5.rs index 55a0b32..7feb182 100644 --- a/lib/src/processor/memory/rom/mbcs/mbc5.rs +++ b/lib/src/processor/memory/rom/mbcs/mbc5.rs @@ -65,7 +65,7 @@ impl Mbc5 { let internal_addr = address as usize - 0x4000; internal_addr + (ROM_BANK_SIZE * self.rom_bank as usize) } - _ => panic!("address {address} incompatible with MBC5"), + _ => panic!("address {address} incompatible with MBC"), } % self.rom_size) } @@ -121,7 +121,7 @@ impl Mbc for Mbc5 { } } 0x6000..0x8000 => {} - _ => panic!("address {address} incompatible with MBC5"), + _ => panic!("address {address} incompatible with MBC"), } }