From d9df568dabf466a2c3cc0c61b02bba5225ed2147 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Thu, 17 Aug 2023 15:38:28 -0400 Subject: [PATCH] Add faulty restart_operation_fetch. --- Processors/6502/6502.hpp | 6 ++++++ Processors/6502/Implementation/6502Implementation.hpp | 4 ++++ 2 files changed, 10 insertions(+) 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; +}