From 7ed8e33622b15f1fd0dd9a9bb9a621fe359d9bb3 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Thu, 2 Apr 2020 18:49:28 -0400 Subject: [PATCH] Eliminates unused 6502 counter. --- Processors/6502/Implementation/6502Implementation.hpp | 5 ----- Processors/6502/Implementation/6502Storage.hpp | 1 - 2 files changed, 6 deletions(-) diff --git a/Processors/6502/Implementation/6502Implementation.hpp b/Processors/6502/Implementation/6502Implementation.hpp index 03706c04f..61d686687 100644 --- a/Processors/6502/Implementation/6502Implementation.hpp +++ b/Processors/6502/Implementation/6502Implementation.hpp @@ -38,14 +38,12 @@ template void Proces } else {\ scheduled_program_counter_ = operations_[size_t(OperationsSlot::FetchDecodeExecute)];\ }\ - cycles_in_phase_ = 0; \ } #define bus_access() \ interrupt_requests_ = (interrupt_requests_ & ~InterruptRequestFlags::IRQ) | irq_request_history_; \ irq_request_history_ = irq_line_ & inverse_interrupt_flag_; \ number_of_cycles -= bus_handler_.perform_bus_operation(nextBusOperation, busAddress, busValue); \ - ++cycles_in_phase_; \ nextBusOperation = BusOperation::None; \ if(number_of_cycles <= Cycles(0)) break; @@ -57,13 +55,11 @@ template void Proces // Deal with a potential RDY state, if this 6502 has anything connected to ready. while(uses_ready_line && ready_is_active_ && number_of_cycles > Cycles(0)) { number_of_cycles -= bus_handler_.perform_bus_operation(BusOperation::Ready, busAddress, busValue); - ++cycles_in_phase_; } // Deal with a potential STP state, if this 6502 implements STP. while(has_stpwai(personality) && stop_is_active_ && number_of_cycles > Cycles(0)) { number_of_cycles -= bus_handler_.perform_bus_operation(BusOperation::Ready, busAddress, busValue); - ++cycles_in_phase_; if(interrupt_requests_ & InterruptRequestFlags::Reset) { stop_is_active_ = false; checkSchedule(); @@ -74,7 +70,6 @@ template void Proces // Deal with a potential WAI state, if this 6502 implements WAI. while(has_stpwai(personality) && wait_is_active_ && number_of_cycles > Cycles(0)) { number_of_cycles -= bus_handler_.perform_bus_operation(BusOperation::Ready, busAddress, busValue); - ++cycles_in_phase_; interrupt_requests_ |= (irq_line_ & inverse_interrupt_flag_); if(interrupt_requests_ & InterruptRequestFlags::NMI || irq_line_) { wait_is_active_ = false; diff --git a/Processors/6502/Implementation/6502Storage.hpp b/Processors/6502/Implementation/6502Storage.hpp index 89801bd4f..1462dd9c2 100644 --- a/Processors/6502/Implementation/6502Storage.hpp +++ b/Processors/6502/Implementation/6502Storage.hpp @@ -225,7 +225,6 @@ class ProcessorStorage { InstructionList operations_[size_t(OperationsSlot::Max)]; const MicroOp *scheduled_program_counter_ = nullptr; - int cycles_in_phase_ = 0; /* Storage for the 6502 registers; F is stored as individual flags.