Dev Diary
Sorry I indicated possible alpha release and then didn't follow through. This SBC discrepancy needs to be solved, first.
It's been on my mind, but haven't actively worked on it until now.
Figured since I didn't get the opportunity to do any programming at my programming job today, I'd do some when I got home.
Turns out I was wrong in initially reporting redpower bug where 0 - 0 = 255. This is actually correct when carry flag is clear (part of 2's complement support or whatnot).
Instead, the RPC bug is the fact that the overflow flag is set as a result, whereas another 6502 simulator clears it.
Considering the following instruction is a BVC (branch if overflow clear), and the RPC does not take the branch when it really should, I think is proof this is the legitimate problem.
The theory is also backed up by
an article which states there is some misinformation about handling of V flag in a couple of instructions; including SBC.
So I guess my next task is to fully understand the scenarios in which V is supposed to be set or reset by SBC, inject some workarounds, THEN release an alpha