From 98dd41e2ce7dedb81ab91342eed29da017006ea4 Mon Sep 17 00:00:00 2001 From: alekseiplusplus Date: Thu, 7 Dec 2023 02:19:48 +1100 Subject: about to rip apart my code, so saving progress --- src/cpu/6502.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cpu/6502.c') diff --git a/src/cpu/6502.c b/src/cpu/6502.c index e7c1669..595cd4e 100644 --- a/src/cpu/6502.c +++ b/src/cpu/6502.c @@ -36,7 +36,7 @@ void SetFlagN(byte x){ //Perform prior to any changes TODO: FIX THIS! WTF WERE YOU THINKING? void SetFlagV(byte x, byte y){ address z = (address)x + (address)y; - if (z > 0xFF) + if ((x & 0x80) != (y & 0x80)) SetFlag(flag_V, 1); else SetFlag(flag_V, 0); -- cgit v1.2.3