SM83: HALT should not consume an extra T-state

This commit is contained in:
Vicki Pfau 2021-03-17 18:19:44 -07:00
parent 039a64ee62
commit dd850b8d33
2 changed files with 5 additions and 1 deletions

View File

@ -65,6 +65,7 @@ Emulation fixes:
- GBA Video: Fix OBJWIN erratic rendering in OpenGL renderer - GBA Video: Fix OBJWIN erratic rendering in OpenGL renderer
- SM83: Emulate HALT bug - SM83: Emulate HALT bug
- SM83: Improve mid-M-cycle interrupts - SM83: Improve mid-M-cycle interrupts
- SM83: HALT should not consume an extra T-state
Other fixes: Other fixes:
- 3DS: Fix thread cleanup - 3DS: Fix thread cleanup
- All: Improve export headers (fixes mgba.io/i/1738) - All: Improve export headers (fixes mgba.io/i/1738)

View File

@ -761,7 +761,10 @@ DEFINE_INSTRUCTION_SM83(RRCA_,
DEFINE_INSTRUCTION_SM83(DI, cpu->irqh.setInterrupts(cpu, false)); DEFINE_INSTRUCTION_SM83(DI, cpu->irqh.setInterrupts(cpu, false));
DEFINE_INSTRUCTION_SM83(EI, cpu->irqh.setInterrupts(cpu, true)); 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 DEFINE_RST_INSTRUCTION_SM83(VEC) \
DEFINE_INSTRUCTION_SM83(RST ## VEC ## UpdateSPL, \ DEFINE_INSTRUCTION_SM83(RST ## VEC ## UpdateSPL, \