From 6b1363e96eaa47b2830dae83b4553b084c20be6d Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Thu, 16 Feb 2017 23:13:55 +0200 Subject: [PATCH] Fixed: Writing to 3XXX in MBC5 before writing to 2XXX no longer switches to the wrong bank. --- Core/mbc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Core/mbc.c b/Core/mbc.c index 4928edb1..40673005 100644 --- a/Core/mbc.c +++ b/Core/mbc.c @@ -137,4 +137,9 @@ void GB_configure_cart(GB_gameboy_t *gb) gb->mbc1_wiring = GB_MBC1M_WIRING; } } + + /* Set MBC5's bank to 1 correctly */ + if (gb->cartridge_type->mbc_type == GB_MBC5) { + gb->mbc5.rom_bank_low = 1; + } }