spjewkes / jrnz

A work-in-progress ZX Spectrum emulator
MIT License
1 stars 0 forks source link

Overflow is completely broken #31

Closed spjewkes closed 6 months ago

spjewkes commented 6 months ago

We seem to have lots of issues with the overflow flag.

This article might be worth checking out: https://stackoverflow.com/questions/8034566/overflow-and-carry-flags-on-z80

I think I used this to generate some of the unit tests and we should really look at what this is doing to make sure we calculate the flag correctly. I suspect the main issue is when dealing with the carry flag but I could be completely wrong.

spjewkes commented 6 months ago

I'm closing this for now. I think the issues have been cleared up since I found out that the SBC command was using addition. The z80doc tests now pass and so do are small amount of unit tests.