From c0e01bce21b06bf9e62d9f2bf436ad93914512e8 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Fri, 25 Dec 2020 21:00:58 +0100 Subject: more testing --- emu/6502.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'emu/6502.c') 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; -- cgit v1.2.3-54-g00ecf