From 11693d83816f624e38b98b5535d27bdad6c6a926 Mon Sep 17 00:00:00 2001 From: Rafael Kitover Date: Fri, 4 Sep 2020 17:33:25 +0000 Subject: [PATCH] Clean up GB MBC30 check. Based on feedback from @negativeExponent. Signed-off-by: Rafael Kitover --- src/gb/gbMemory.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/gb/gbMemory.cpp b/src/gb/gbMemory.cpp index 9b01122d..1650d091 100644 --- a/src/gb/gbMemory.cpp +++ b/src/gb/gbMemory.cpp @@ -362,13 +362,8 @@ void mapperMBC3ROM(uint16_t address, uint8_t value) gbDataMBC3.mapperRAMEnable = ((value & 0x0a) == 0x0a ? 1 : 0); break; case 0x2000: { // ROM bank select - // 4MiB, MBC30 - bool mbc30 = gbRomSize == 0x00400000; - - if (mbc30) - value = value & 0xff; // 4MiB - else - value = value & 0x7f; // 2MiB + if (gbRomSize != 0x00400000) + value = value & 0x7f; // Assume 2MiB, unless MBC30. if (value == 0) value = 1;