Closed ghost closed 6 years ago
Nice! I'm taking your fixes. I had not tried any Z80 conformance tests. I wonder if it's worth emulating undocumented instructions? My impression is that they are not as widely used as say the 6502 ones were.
Ah, the undocumented instructions. We hear a lot about them but we do not see them often.
It could be worth to optimise the emulator. The test suite runs in ~3 minutes with cpm but only 1 with z80pack. I also feel the difference when assembling a 1500 lines program with M80, which take 2.5s against <1s.
This is a follow up for PR #2 where I fix a bug in overflow flag handling. This time, I've fixed bugs in the handling of the half carry flag, and even the carry flag for one instruction.
Here is a summary of the new fixes:
The emulator now pass all the ZEXDOC tests (the version in z80pack, without the undocumented instructions) with the exception of DAA, but, I think that is because the undocumented behaviours are not emulated.