# HG changeset patch # User Michael Pavone # Date 1550646878 28800 # Node ID 7e97d820b49194f93f2000e5b299cc212bddf515 # Parent 05719805819690a2ea056a502eadb1862b211240 Fix implementation of halt in new Z80 core diff -r 057198058196 -r 7e97d820b491 z80.cpu --- a/z80.cpu Tue Feb 19 22:59:30 2019 -0800 +++ b/z80.cpu Tue Feb 19 23:14:38 2019 -0800 @@ -1545,7 +1545,22 @@ 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