summaryrefslogtreecommitdiff
path: root/emu/6502.c
diff options
context:
space:
mode:
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;