-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
I tested this emulator using https://github.com/Timendus/chip8-test-suite , and found some issues in the Flags Test :
- Unable to use vF as the vY operand:The issue arises because the code modifies the value of vF before performing the arithmetic operation. This causes vF to no longer hold the original input value at the time of calculation, which results in incorrect computation when that register is used as an operand.
- Incorrect flag setting for subtraction (8xy5 and 8xy7):According to the specification, the flag vF should be set to 1 if no borrow occurs during subtraction (i.e., if vX >= vY). However, the current implementation uses:
(self.V[x] > self.V[y]) and 1 or 0. It should be(self.V[x] >= self.V[y]) and 1 or 0
This issue causes the CaveExplorer and RPS games from the CHIP-8 Archive to fail to run properly. After fixing the flag behavio, these programs can run normally(ps: should also consider the shifting(8xy6 and 8xyE) quirk to run them).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels