-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Labels
accuracyThe emulator is not accurateThe emulator is not accuratebugSomething isn't workingSomething isn't working
Description
I have used your code in a simulator project of mine which simulates the Acorn Atom home computer.
I tracked down some faulty behaviour to the first use of a SBC #immediate instruction, which was setting the carry bit incorrectly.
I tried an online interactive simulator just executing SBC #$3F and setting the initial value of A ($0D). It calculated that the carry would be clear whereas your code sets the carry.
I modified the code to calculate the new carry bit using code found in another simulator. This fixed the faulty behaviour, however the simulator has further problems possibly pointing to other issues. I will try a test suite next.
In summary the carry bit calculation for sbc_J appears to be buggy.
Metadata
Metadata
Assignees
Labels
accuracyThe emulator is not accurateThe emulator is not accuratebugSomething isn't workingSomething isn't working