Some r4k regression tests currently fail in the rabbit branch. I tracked the issue down to the simulation of the carry flag for neg hl:
Stop at 0x00140d: (109) stepped 5 ticks
A= 0x01 1 . F= 00000000 0x00 0 . Mode:10
SZxxxVxC
XPC= 0x000 IP= 0xff IIR= 0x02 EIR= 0x01
BC= 0xffff 00 .
DE= 0xffff 00 .
HL= 0xffce 00 00 00 00 00 00 00 00 ........
IX= 0xdfec f8 df b6 09 19 00 00 00 ........
IY= 0x0000 3e 80 d3 32 20 04 3e 02 >..2 .>.
JK= 0x0000 3e 80 d3 32 20 04 3e 02 >..2 .>.
SP= 0xdfe6 01 64 00 00 00 01 f8 df .d......
aAF= 0x00-00 aBC= 0x00-00 aDE= 0x00-00 aHL= 0x00-00 aJK= 0x00-00
PW= 0x0000-0000 PX= 0x0000-0000 PY= 0x0000-0000 PZ= 0x0000-0000
aPW= 0x0000-0000 aPX= 0x0000-0000 aPY= 0x0000-0000 aPZ= 0x0000-0000
0x140d ? 7f 4d NEG HL
F 0x00140d
0>
Stop at 0x00140f: (109) stepped 2 ticks
A= 0x01 1 . F= 00000000 0x00 0 . Mode:10
SZxxxVxC
XPC= 0x000 IP= 0xff IIR= 0x02 EIR= 0x01
BC= 0xffff 00 .
DE= 0xffff 00 .
HL= 0x0032 00 00 00 00 00 00 00 00 ........
IX= 0xdfec f8 df b6 09 19 00 00 00 ........
IY= 0x0000 3e 80 d3 32 20 04 3e 02 >..2 .>.
JK= 0x0000 3e 80 d3 32 20 04 3e 02 >..2 .>.
SP= 0xdfe6 01 64 00 00 00 01 f8 df .d......
aAF= 0x00-00 aBC= 0x00-00 aDE= 0x00-00 aHL= 0x00-00 aJK= 0x00-00
PW= 0x0000-0000 PX= 0x0000-0000 PY= 0x0000-0000 PZ= 0x0000-0000
aPW= 0x0000-0000 aPX= 0x0000-0000 aPY= 0x0000-0000 aPZ= 0x0000-0000
0x140f ? 3e 00 LD A,0x00
F 0x00140f
0>
[r16221]
Related
Commit: [r16221]
Looks like the fix for the carry on
neg hlbroke the carry onsbc a, #n(maybe other instructions are affected -sbc a, #nis the first I found); lots of regression tests are failing:Sorry of the bug, reverted in [r16223].
Related
Commit: [r16223]