From 9f88d5f4a180bf9841dc0fbfdcb788bbbe66ce89 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Tue, 19 Feb 2019 23:14:38 -0800 Subject: Fix implementation of halt in new Z80 core --- z80.cpu | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/z80.cpu b/z80.cpu index 7772538..4e422f6 100644 --- a/z80.cpu +++ b/z80.cpu @@ -1545,7 +1545,22 @@ ed 01DDD100 neg 00000000 nop 01110110 halt + cmp nmi_cycle cycles + if >=U + + else + cmp int_cycle cycles + if >=U + + if iff1 + else sub 1 pc pc + end + + else + sub 1 pc pc + end + end 11110011 di mov 0 iff1 -- cgit v1.2.3