diff --git a/Processors/6502/6502.hpp b/Processors/6502/6502.hpp index 8ed3ff0f9..15edc54cd 100644 --- a/Processors/6502/6502.hpp +++ b/Processors/6502/6502.hpp @@ -124,6 +124,12 @@ class ProcessorBase: public ProcessorStorage { @returns @c true if the 6502 is jammed; @c false otherwise. */ inline bool is_jammed() const; + + /*! + FOR TESTING PURPOSES ONLY: forces the processor into a state where + the next thing it intends to do is fetch a new opcode. + */ + inline void restart_operation_fetch(); }; /*! diff --git a/Processors/6502/Implementation/6502Implementation.hpp b/Processors/6502/Implementation/6502Implementation.hpp index d07bfe9ee..9fb8b7e9a 100644 --- a/Processors/6502/Implementation/6502Implementation.hpp +++ b/Processors/6502/Implementation/6502Implementation.hpp @@ -728,3 +728,7 @@ void ProcessorBase::set_value_of(Register r, uint16_t value) { default: break; } } + +void ProcessorBase::restart_operation_fetch() { + scheduled_program_counter_ = nullptr; +}