diff --git a/BizHawk.Emulation.Cores/CPUs/LR35902/Tables_Direct.cs b/BizHawk.Emulation.Cores/CPUs/LR35902/Tables_Direct.cs index 5979671599..1bbcf8e86c 100644 --- a/BizHawk.Emulation.Cores/CPUs/LR35902/Tables_Direct.cs +++ b/BizHawk.Emulation.Cores/CPUs/LR35902/Tables_Direct.cs @@ -76,15 +76,7 @@ namespace BizHawk.Emulation.Common.Components.LR35902 private void HALT_() { - if (!FlagI) - { - cur_instr = new ushort[] - {IDLE, - IDLE, - IDLE, - HALT }; - } - else + if (FlagI && (EI_pending == 0)) { // if interrupts are disabled, // a glitchy decrement to the program counter happens @@ -94,6 +86,14 @@ namespace BizHawk.Emulation.Common.Components.LR35902 IDLE, OP_G}; } + else + { + cur_instr = new ushort[] + {IDLE, + IDLE, + IDLE, + HALT }; + } }