From 53569267c59204f56e4c0fddb669536d28706e5c Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Tue, 29 Dec 2020 11:08:58 +0100 Subject: - testing of correct cycles - fixed some SDL includes --- emu/6502.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'emu/6502.c') diff --git a/emu/6502.c b/emu/6502.c index 53af7a0..98af83a 100644 --- a/emu/6502.c +++ b/emu/6502.c @@ -182,7 +182,7 @@ static const int cycles[NOF_OPCODES] = { /* B */ 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* C */ 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, /* D */ 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - /* E */ 3, 0, 0, 0, 0, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, + /* E */ 2, 0, 0, 0, 0, 0, 5, 0, 0, 2, 2, 0, 0, 0, 0, 0, /* F */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; @@ -427,6 +427,7 @@ void cpu_6502_step( cpu_6502_t *cpu ) cpu->PC++; if( !cpu_6502_is_zero( cpu ) ) { cpu->PC += (int8_t)operand8; + cpu->cycles++; } break; @@ -435,6 +436,7 @@ void cpu_6502_step( cpu_6502_t *cpu ) cpu->PC++; if( !cpu_6502_is_carry( cpu ) ) { cpu->PC += (int8_t)operand8; + cpu->cycles++; } break; @@ -443,6 +445,7 @@ void cpu_6502_step( cpu_6502_t *cpu ) cpu->PC++; if( cpu_6502_is_carry( cpu ) ) { cpu->PC += (int8_t)operand8; + cpu->cycles++; } break; -- cgit v1.2.3-54-g00ecf