GB I/O: Read back proper SVBK value after writing 0 (fixes #2921)

This commit is contained in:
Vicki Pfau 2023-05-09 14:50:57 -07:00
parent 4f58f85572
commit b1f991bf94
2 changed files with 2 additions and 1 deletions

View File

@ -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

View File

@ -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;