GB MBC: Fix MBC30 SRAM

This commit is contained in:
Vicki Pfau 2019-01-16 11:46:16 -08:00
parent 08f10b2d73
commit eee29545b6
2 changed files with 3 additions and 2 deletions

View File

@ -147,6 +147,7 @@ Bugfixes:
- Libretro: Fix adding codes with hooks - Libretro: Fix adding codes with hooks
- GBA: Fix GB Player features - GBA: Fix GB Player features
- Qt: Ensure FATAL logs reach log view - Qt: Ensure FATAL logs reach log view
- GB MBC: Fix MBC30 SRAM
Misc: Misc:
- mGUI: Add SGB border configuration option - mGUI: Add SGB border configuration option
- mGUI: Add support for different settings types - mGUI: Add support for different settings types

View File

@ -510,10 +510,10 @@ void _GBMBC3(struct GB* gb, uint16_t address, uint8_t value) {
GBMBCSwitchBank(gb, bank); GBMBCSwitchBank(gb, bank);
break; break;
case 0x2: case 0x2:
if (value < 4) { if (value < 8) {
GBMBCSwitchSramBank(gb, value); GBMBCSwitchSramBank(gb, value);
memory->rtcAccess = false; memory->rtcAccess = false;
} else if (value >= 8 && value <= 0xC) { } else if (value <= 0xC) {
memory->activeRtcReg = value - 8; memory->activeRtcReg = value - 8;
memory->rtcAccess = true; memory->rtcAccess = true;
} }