all repos — mgba @ 35200b6c7ae59841b429dbd196d7a2f9661df88f

mGBA Game Boy Advance Emulator

GB: Fix HALT when IE and IF unused bits are set (fixes #1349)
Vicki Pfau vi@endrift.com
Mon, 20 May 2019 23:57:48 -0700
commit

35200b6c7ae59841b429dbd196d7a2f9661df88f

parent

fd6948da4d5c066ecbb298081ed5a8cb661c9c86

2 files changed, 2 insertions(+), 1 deletions(-)

jump to
M CHANGESCHANGES

@@ -26,6 +26,7 @@ - GBA Memory: Fix writing to OBJ memory in modes 3 and 5

- GBA: Fix RTC on non-standard sized ROMs (fixes mgba.io/i/1400) - GBA Memory: Prevent writing to mirrored BG VRAM (fixes mgba.io/i/743) - GBA Video: Fix sprite mosaic clamping (fixes mgba.io/i/1008) + - GB: Fix HALT when IE and IF unused bits are set (fixes mgba.io/i/1349) Other fixes: - Qt: More app metadata fixes - Qt: Fix load recent from archive (fixes mgba.io/i/1325)
M src/gb/gb.csrc/gb/gb.c

@@ -723,7 +723,7 @@ }

void GBHalt(struct LR35902Core* cpu) { struct GB* gb = (struct GB*) cpu->master; - if (!(gb->memory.ie & gb->memory.io[REG_IF])) { + if (!(gb->memory.ie & gb->memory.io[REG_IF] & 0x1F)) { cpu->cycles = cpu->nextEvent; cpu->halted = true; } else if (gb->model < GB_MODEL_CGB) {