From afe5a7cd11701e9672a3784c0a542b065762b97c Mon Sep 17 00:00:00 2001 From: alyosha-tas Date: Wed, 22 Nov 2017 13:35:07 -0500 Subject: [PATCH] GBHawk: Fix Amazing Penguin --- .../CPUs/LR35902/Tables_Direct.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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 }; + } }