diff --git a/source/core/Nes_Cpu.cpp b/source/core/Nes_Cpu.cpp index 06a103e..eff8ba0 100644 --- a/source/core/Nes_Cpu.cpp +++ b/source/core/Nes_Cpu.cpp @@ -109,7 +109,7 @@ imm##op: \ pc++; \ int offset = (int8_t) data; \ int extra_clock = (pc & 0xFF) + offset; \ - if ( !(cond) ) goto dec_clock_loop; \ + if ( !(cond) ) {clock_count--; goto loop; } \ pc += offset; \ pc = uint16_t( pc ); \ clock_count += (extra_clock >> 8) & 1; \ @@ -239,11 +239,6 @@ Nes_Cpu::result_t Nes_Cpu::run( nes_time_t end ) volatile result_t result = result_cycles; -#if !BLARGG_CPU_CISC - long clock_count = this->clock_count; - uint8_t* const low_mem = this->low_mem; -#endif - // registers unsigned pc = r.pc; int sp; @@ -252,7 +247,6 @@ Nes_Cpu::result_t Nes_Cpu::run( nes_time_t end ) int x = r.x; int y = r.y; - int status; int c; // carry set if (c & 0x100) != 0 int nz; // Z set if (nz & 0xFF) == 0, N set if (nz & 0x880) != 0 @@ -261,9 +255,6 @@ Nes_Cpu::result_t Nes_Cpu::run( nes_time_t end ) SET_STATUS( temp ); } - goto loop; -dec_clock_loop: - clock_count--; loop: uint8_t const* page = code_map [pc >> page_bits];