From 7f9c7706bcc8b9f2b251e4d784e4df8cdda8f122 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sun, 5 Nov 2017 21:05:06 -0800 Subject: [PATCH] GB MBC: Remove erroneous bank 0 wrapping --- CHANGES | 1 + src/gb/mbc.c | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index f624e78ce..a011999cd 100644 --- a/CHANGES +++ b/CHANGES @@ -8,6 +8,7 @@ Bugfixes: - GBA Savedata: Fix crash when resizing flash Misc: - GBA: Improve multiboot image detection + - GB MBC: Remove erroneous bank 0 wrapping 0.6.1: (2017-10-01) Bugfixes: diff --git a/src/gb/mbc.c b/src/gb/mbc.c index 0c51b1a5f..2f2d1216e 100644 --- a/src/gb/mbc.c +++ b/src/gb/mbc.c @@ -39,9 +39,6 @@ void GBMBCSwitchBank(struct GB* gb, int bank) { mLOG(GB_MBC, GAME_ERROR, "Attempting to switch to an invalid ROM bank: %0X", bank); bankStart &= (gb->memory.romSize - 1); bank = bankStart / GB_SIZE_CART_BANK0; - if (!bank) { - ++bank; - } } gb->memory.romBank = &gb->memory.rom[bankStart]; gb->memory.currentBank = bank;