shut up about mbc type in panics

This commit is contained in:
Alex Janka 2023-03-19 10:48:59 +11:00
parent efcd9877d8
commit 533cb42152
3 changed files with 5 additions and 5 deletions

View file

@ -68,7 +68,7 @@ impl Mbc1 {
} }
0xA000..0xC000 => panic!("passed ram address to rom address function"), 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) } % self.rom_len)
} }
@ -85,7 +85,7 @@ impl Mbc1 {
+ (self.upper_banks as usize * 16 * KB) + (self.upper_banks as usize * 16 * KB)
} }
}, },
_ => panic!("address {address} incompatible with MBC1"), _ => panic!("address {address} incompatible with MBC"),
} }
} }

View file

@ -134,7 +134,7 @@ impl Mbc3 {
let internal_addr = address as usize - 0x4000; let internal_addr = address as usize - 0x4000;
internal_addr + (ROM_BANK_SIZE * self.rom_bank as usize) 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) } % self.rom_size)
} }

View file

@ -65,7 +65,7 @@ impl Mbc5 {
let internal_addr = address as usize - 0x4000; let internal_addr = address as usize - 0x4000;
internal_addr + (ROM_BANK_SIZE * self.rom_bank as usize) 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) } % self.rom_size)
} }
@ -121,7 +121,7 @@ impl Mbc for Mbc5 {
} }
} }
0x6000..0x8000 => {} 0x6000..0x8000 => {}
_ => panic!("address {address} incompatible with MBC5"), _ => panic!("address {address} incompatible with MBC"),
} }
} }