Closed spjewkes closed 6 months ago
Looking further back, it looks like there may be something going wrong in the call to "LINE_SCAN" at 0x12b4. Returning from this call seems to show a difference in register DE. Stepping through both side by side should hopefully highlight the issue.
Issue was due to incorrectly implemented djnz instruction. It was jumping on zero rather than if NOT zero. Pretty embarrassing considering the name of the project...
I think this was resolved and can be closed for now.
Simple test: type '10 run' fails with an error on this program. Initial debug shows a divergence at 0x12da (when compared to another emulator). It looks like a number of registers aren't correct at this point so the code would've diverged earlier (possibly due to a flag issue). Need to dig further...