From 40ba8969eab37f3dfbf3a9857668669a071530c4 Mon Sep 17 00:00:00 2001 From: thrust26 Date: Mon, 3 Jun 2024 13:27:10 +0200 Subject: [PATCH] added option to enable thumb cycle counting via emulated ROM --- src/emucore/Thumbulator.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/emucore/Thumbulator.cxx b/src/emucore/Thumbulator.cxx index 03bf5ce33..37eaee80b 100644 --- a/src/emucore/Thumbulator.cxx +++ b/src/emucore/Thumbulator.cxx @@ -510,7 +510,6 @@ void Thumbulator::write32(uInt32 addr, uInt32 data) mamcr = static_cast(data); break; #endif - default: break; } @@ -760,6 +759,11 @@ uInt32 Thumbulator::read32(uInt32 addr) case 0xE000E018: data = systick_count; return data; +#ifdef THUMB_CYCLE_COUNT + case 0xE01FC100: // APBDIV + _countCycles = true; // enabe cycle counting + return 1; // random value +#endif #ifndef UNSAFE_OPTIMIZATIONS case 0xE000E01C: