From c1dfa75845b32d622f145879a9deed4c3e45b754 Mon Sep 17 00:00:00 2001 From: bunnei Date: Sat, 5 Apr 2014 01:23:28 -0400 Subject: [PATCH] added a tick counter --- src/core/src/arm/arm_interface.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/core/src/arm/arm_interface.h b/src/core/src/arm/arm_interface.h index 785234396a..80518a779c 100644 --- a/src/core/src/arm/arm_interface.h +++ b/src/core/src/arm/arm_interface.h @@ -35,13 +35,21 @@ public: ~ARM_Interface() { } - virtual void ExecuteInstruction() = 0; + void Step() { + ExecuteInstruction(); + ticks_++; + } virtual void SetPC(u32 pc) = 0; - virtual u32 PC() = 0; - virtual u32 Reg(int index) = 0; + virtual u32 CPSR() = 0; - virtual u32 CPSR() = 0; + u64 ticks() { return ticks_; } + +private: + + virtual void ExecuteInstruction() = 0; + + u64 ticks_; };