summaryrefslogtreecommitdiff
path: root/emu/6502.c
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2020-12-25 21:00:58 +0100
committerAndreas Baumann <mail@andreasbaumann.cc>2020-12-25 21:00:58 +0100
commitc0e01bce21b06bf9e62d9f2bf436ad93914512e8 (patch)
treeb965bdc30952ce318d5c5e6ea703117baad6f49b /emu/6502.c
parentcc9c81e4fef6938ec0b8a29c040b174b6c29daa8 (diff)
download6502-c0e01bce21b06bf9e62d9f2bf436ad93914512e8.tar.gz
6502-c0e01bce21b06bf9e62d9f2bf436ad93914512e8.tar.bz2
more testing
Diffstat (limited to 'emu/6502.c')
-rw-r--r--emu/6502.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/emu/6502.c b/emu/6502.c
index ff178f9..cab72b3 100644
--- a/emu/6502.c
+++ b/emu/6502.c
@@ -372,7 +372,7 @@ void cpu_6502_step( cpu_6502_t *cpu )
case SBC_IMM:
operand8 = cpu_6502_read_byte( cpu, cpu->PC );
cpu->PC++;
- tmp = cpu->A - operand8 - ( cpu_6502_is_carry( cpu ) ? 0 : 1 );
+ tmp = cpu->A - operand8 - ( cpu_6502_is_carry( cpu ) ? 1 : 0 );
update_negative_and_sign( cpu, tmp );
if( tmp & 0xFF00 ) {
cpu->PS |= PS_C;