Use exceptions instead of panic

This commit is contained in:
madmaurice 2023-09-01 15:11:27 +02:00
parent a0377959dc
commit 66c19caaee
8 changed files with 134 additions and 68 deletions
memory/mbc

View file

@ -1,5 +1,5 @@
#include <memory/mbc/mbc1.h>
#include <misc/panic.h>
#include <misc/exception.h>
MBC1::MBC1(Cartridge& cart)
: cart(cart),
@ -35,5 +35,5 @@ void MBC1::write8(u16 addr, u8 data)
else if((addr & 0xE000) == 0x4000)
ram_bankreg = data & 0x03;
else if((addr & 0xE000) == 0x6000)
panic("Banking mode not implemented");
throw EmulatorException("MBC1: banking mode not supported");
}