fix for EI insn in cz80 (partial revert of 43e1401)
authorkub <derkub@gmail.com>
Wed, 26 Feb 2020 19:36:46 +0000 (20:36 +0100)
committerkub <derkub@gmail.com>
Wed, 26 Feb 2020 19:36:46 +0000 (20:36 +0100)
cpu/cz80/cz80_op.c

index 317e958..b152008 100644 (file)
@@ -712,6 +712,8 @@ OP_EI:
                        if (CPU->IRQState)\r
                        {\r
                                afterEI = 1;\r
+                               CPU->ExtraCycles += 1 - CPU->ICount;\r
+                               CPU->ICount = 1;\r
                        }\r
                }\r
                else zIFF2 = (1 << 2);\r