You can always create a thread to talk about stuff not related to the thread at hand, like I did just nowhcf said:By the way, I would like to ask you another thing. I saw that in the gpu.cpp file, in the SUBC routine, you replaced this:
SET_ZNC_SUB(RN - borrow, RM, res);
SET_ZNC_SUB(RN, RM + borrow, res);
(to avoid a problem with the carrier). But, don't you think that this fix may be done too in the dsp.cpp (also in the SUBC routine)? It still has the old SET_ZNC_SUB(RN - borrow, RM, res);
Please, excuse me if this is not the correct place to talk about this kind of things. I don't know what the best place is...
Now getting back to your question: the treatment of the carry flag on the SUBC opcode. In looking it over, it would indeed seem to cause problems. But it also seems that in the case of SUBC, that the C flag would mirror the N flag, and I'm not convinced that this is right. So I need to run a few tests on real H/W to settle the question. Thanks for pointing this out! :thumb: