GB I/O: Filter IE top bits properly (fixes #1329)

This commit is contained in:
Vicki Pfau 2019-03-03 17:56:33 -08:00
parent 1a007f6d28
commit 3a313a6133
2 changed files with 3 additions and 2 deletions

View File

@ -3,6 +3,7 @@ Bugfixes:
- Qt: More app metadata fixes - Qt: More app metadata fixes
- Qt: Fix load recent from archive (fixes mgba.io/i/1325) - Qt: Fix load recent from archive (fixes mgba.io/i/1325)
- GB Video: Delay LYC STAT check (fixes mgba.io/i/1331) - GB Video: Delay LYC STAT check (fixes mgba.io/i/1331)
- GB Video: Fix window being enabled mid-scanline (fixes mgba.io/i/1328)
Misc: Misc:
- Qt: Add missing HEVC NVENC option (fixes mgba.io/i/1323) - Qt: Add missing HEVC NVENC option (fixes mgba.io/i/1323)

View File

@ -465,7 +465,7 @@ void GBIOWrite(struct GB* gb, unsigned address, uint8_t value) {
} }
break; break;
case REG_IE: case REG_IE:
gb->memory.ie = value; gb->memory.ie = value & 0x1F;
GBUpdateIRQs(gb); GBUpdateIRQs(gb);
return; return;
default: default:
@ -578,7 +578,7 @@ uint8_t GBIORead(struct GB* gb, unsigned address) {
case REG_JOYP: case REG_JOYP:
return _readKeysFiltered(gb); return _readKeysFiltered(gb);
case REG_IE: case REG_IE:
return gb->memory.ie; return gb->memory.ie | 0xE0;
case REG_WAVE_0: case REG_WAVE_0:
case REG_WAVE_1: case REG_WAVE_1:
case REG_WAVE_2: case REG_WAVE_2: