From 6980fd760c428b0f22b539d0f4fb0b85117a58ca Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 24 Mar 2024 22:18:30 -0400 Subject: [PATCH] Add further heavily-manual debugging aids. --- Machines/Acorn/Archimedes/Archimedes.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Machines/Acorn/Archimedes/Archimedes.cpp b/Machines/Acorn/Archimedes/Archimedes.cpp index 6fba1369a..14962bacb 100644 --- a/Machines/Acorn/Archimedes/Archimedes.cpp +++ b/Machines/Acorn/Archimedes/Archimedes.cpp @@ -162,9 +162,11 @@ class ConcreteMachine: } int video_divider_ = 1; + std::set opcodes; void tick_cpu() { static uint32_t last_pc = 0; static bool log = false; + static bool accumulate = false; // if(executor_.pc() == 0x03803400) { // printf("At %08x; after last PC %08x and %zu ago was %08x\n", executor_.pc(), pc_history[(pc_history_ptr - 2 + pc_history.size()) % pc_history.size()], pc_history.size(), pc_history[pc_history_ptr]); @@ -203,6 +205,9 @@ class ConcreteMachine: } info.append("]"); } + if(accumulate) { + opcodes.insert(instruction); + } // logger.info().append("%08x: %08x", executor_.pc(), instruction); InstructionSet::ARM::execute(instruction, executor_); ++instr_count;