Skip to content

Commit

Permalink
Fix a quirk flag check
Browse files Browse the repository at this point in the history
  • Loading branch information
leonmavr committed Aug 20, 2024
1 parent e8db4ef commit 5e04c25
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion roms/Space_Invaders.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Author: David Winter
# Controls:
0x4: Left
0x5: Shoot
0x5: Shoot/start
0x6: Right

400
Expand Down
2 changes: 1 addition & 1 deletion src/chip8.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ void Chip8::Exec(const opcode_t& opc) {
X("ADD Vx Vy" , prefix == 0x8 && n == 0x4 , uint16_t sum = Vx + Vy; Vx = sum & 0xFF; Vf = sum > 0xFF;) \
X("SUB Vx Vy" , prefix == 0x8 && n == 0x5 , Vf = Vx >= Vy; Vx = (Vx - Vy) & 0xFF;) \
X("SHR Vx Vy" , prefix == 0x8 && n == 0x6 , Vf = Vx & 0x1; \
if (!use_quirks_) \
if (use_quirks_) \
Vx >>= 1; \
else \
Vx = Vy >> 1;) \
Expand Down

0 comments on commit 5e04c25

Please sign in to comment.