From ce21b8cd25cf832e5d8b4c16474c2b3b8f421d23 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Mon, 26 Feb 2024 15:34:30 +0100 Subject: Set VF to 1, not some arbitrary N>0 --- src/ahoy/emulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ahoy/emulator.c b/src/ahoy/emulator.c index c805fcd..63d3514 100644 --- a/src/ahoy/emulator.c +++ b/src/ahoy/emulator.c @@ -175,7 +175,7 @@ opexec(uint16_t op) c8.V[x] = c8.V[y] - c8.V[x]; break; case 0xE: - c8.V[0xF] = c8.V[x] & 0x80; + c8.V[0xF] = (bool)(c8.V[x] & 0x80); c8.V[x] <<= 1; break; default: -- cgit v1.2.3