diff --git a/CHANGES b/CHANGES index ca460464c..d45c14d5e 100644 --- a/CHANGES +++ b/CHANGES @@ -6,6 +6,7 @@ Features: - Debugger: Add range watchpoints Emulation fixes: - GB Audio: Fix channels 1/2 staying muted if restarted after long silence + - GB I/O: Read back proper SVBK value after writing 0 (fixes mgba.io/i/2921) - GB Serialize: Add missing Pocket Cam state to savestates - GB SIO: Disabling SIO should cancel pending transfers (fixes mgba.io/i/2537) - GB Video: Implement DMG-style sprite ordering diff --git a/src/gb/io.c b/src/gb/io.c index ba4473550..560ad7e62 100644 --- a/src/gb/io.c +++ b/src/gb/io.c @@ -491,7 +491,7 @@ void GBIOWrite(struct GB* gb, unsigned address, uint8_t value) { return; case GB_REG_SVBK: GBMemorySwitchWramBank(&gb->memory, value); - value = gb->memory.wramCurrentBank; + value &= 7; break; default: goto failed;