diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2020-12-29 11:08:58 +0100 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2020-12-29 11:08:58 +0100 |
commit | 53569267c59204f56e4c0fddb669536d28706e5c (patch) | |
tree | 0c358de956e824d6c47f4820fdc8013ae3fa3089 /emu/6502.c | |
parent | dd4174bb32973d1212235dc8e262c23013b88912 (diff) | |
download | 6502-53569267c59204f56e4c0fddb669536d28706e5c.tar.gz 6502-53569267c59204f56e4c0fddb669536d28706e5c.tar.bz2 |
- testing of correct cycles
- fixed some SDL includes
Diffstat (limited to 'emu/6502.c')
-rw-r--r-- | emu/6502.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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; |