aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ahoy/emulator.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ahoy/emulator.c b/src/ahoy/emulator.c
index 980a0a7..04816cf 100644
--- a/src/ahoy/emulator.c
+++ b/src/ahoy/emulator.c
@@ -212,6 +212,7 @@ opexec(uint16_t op)
unsigned y = (op & 0x00F0) >> 4;
unsigned n = (op & 0x000F) >> 0;
+ c8.V[0xF] = 0;
c8.needs_redraw = true;
if (c8.I + n > lengthof(mem))
diex("%s: attempted to draw sprite beyond bounds of RAM", filename);
@@ -224,7 +225,7 @@ opexec(uint16_t op)
break;
msk = ((uint64_t)spr_row << (64 - 8)) >> c8.V[x];
- c8.V[0xF] = (bool)(c8.screen[scr_row] & msk);
+ c8.V[0xF] |= (bool)(c8.screen[scr_row] & msk);
c8.screen[scr_row] ^= msk;
}