ref: 656b427bda6774ca1f4f5b309c1568cbec231f7f
parent: f2f46f4a33ee9ccb4f0475163408b8a699ec4f7f
author: aiju <aiju@phicode.de>
date: Mon Mar 17 10:57:37 EDT 2014
games/snes: SPC ADDW/SUBW fix
--- a/sys/src/games/snes/spc.c
+++ b/sys/src/games/snes/spc.c
@@ -581,6 +581,7 @@
case 0x79: cmp(spcread(sX|dp), spcread(sY|dp)); return 5;
case 0x7A:
b = memd16(azp());
+ sP &= ~SPCC;
sA = adc(sA, b);
sY = adc(sY, b >> 8);
if(sA != 0)
@@ -625,6 +626,7 @@
case 0x99: spcwrite(sX|dp, adc(spcread(sX|dp), spcread(sY|dp))); return 5;
case 0x9A:
b = memd16(azp());
+ sP |= SPCC;
sA = sbc(sA, b);
sY = sbc(sY, b >> 8);
if(sA != 0)