SM83: HALT should not consume an extra T-state
Vicki Pfau vi@endrift.com
Wed, 17 Mar 2021 18:19:44 -0700
2 files changed,
5 insertions(+),
1 deletions(-)
M
CHANGES
→
CHANGES
@@ -65,6 +65,7 @@ - GBA Video: Emulate sprite cycle limits in OpenGL renderer (fixes mgba.io/i/1635)
- 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)
M
src/sm83/isa-sm83.c
→
src/sm83/isa-sm83.c
@@ -761,7 +761,10 @@ cpu->f.c = low;)
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, \