diff --git a/CHANGES b/CHANGES index adaecc937..9f517ed2c 100644 --- a/CHANGES +++ b/CHANGES @@ -13,6 +13,7 @@ Other fixes: - mGUI: Fix FPS counter after closing menu - VFS: Failed file mapping should return NULL on POSIX Misc: + - GB MBC: Filter out MBC errors when cartridge is yanked (fixes mgba.io/i/2488) - Qt: Enable -b for Boot BIOS menu option (fixes mgba.io/i/2074) 0.9.3: (2021-12-17) diff --git a/src/gb/mbc.c b/src/gb/mbc.c index 3cb9a1a5d..8f4cbea52 100644 --- a/src/gb/mbc.c +++ b/src/gb/mbc.c @@ -17,11 +17,12 @@ const uint32_t GB_LOGO_HASH = 0x46195417; mLOG_DEFINE_CATEGORY(GB_MBC, "GB MBC", "gb.mbc"); static void _GBMBCNone(struct GB* gb, uint16_t address, uint8_t value) { - UNUSED(gb); UNUSED(address); UNUSED(value); - mLOG(GB_MBC, GAME_ERROR, "Wrote to invalid MBC"); + if (!gb->yankedRomSize) { + mLOG(GB_MBC, GAME_ERROR, "Wrote to invalid MBC"); + } } static void _GBMBC1(struct GB*, uint16_t address, uint8_t value);