diff --git a/CHANGES b/CHANGES index 66518239f..e8a40834c 100644 --- a/CHANGES +++ b/CHANGES @@ -65,6 +65,7 @@ Emulation fixes: - GBA Video: Fix OBJWIN erratic rendering in OpenGL renderer - SM83: Emulate HALT bug - SM83: Improve mid-M-cycle interrupts + - SM83: HALT should not consume an extra T-state Other fixes: - 3DS: Fix thread cleanup - All: Improve export headers (fixes mgba.io/i/1738) diff --git a/src/sm83/isa-sm83.c b/src/sm83/isa-sm83.c index 50b86407a..8e026215e 100644 --- a/src/sm83/isa-sm83.c +++ b/src/sm83/isa-sm83.c @@ -761,7 +761,10 @@ DEFINE_INSTRUCTION_SM83(RRCA_, DEFINE_INSTRUCTION_SM83(DI, cpu->irqh.setInterrupts(cpu, false)); DEFINE_INSTRUCTION_SM83(EI, cpu->irqh.setInterrupts(cpu, true)); -DEFINE_INSTRUCTION_SM83(HALT, cpu->irqh.halt(cpu)); +DEFINE_INSTRUCTION_SM83(HALT, + cpu->irqh.halt(cpu); + // XXX: Subtract the cycles that will be added later in the tick function + cpu->cycles -= cpu->tMultiplier;); #define DEFINE_RST_INSTRUCTION_SM83(VEC) \ DEFINE_INSTRUCTION_SM83(RST ## VEC ## UpdateSPL, \