From 8f90d6a0e07a516a6a110c881f0431994f506378 Mon Sep 17 00:00:00 2001 From: Ian Brown Date: Fri, 30 Aug 2019 17:25:43 +0100 Subject: [PATCH] add an IO Port to get the host clock value --- Source/ee/Ee_SubSystem.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Source/ee/Ee_SubSystem.cpp b/Source/ee/Ee_SubSystem.cpp index 4ab5774cc2..a2d7e83360 100644 --- a/Source/ee/Ee_SubSystem.cpp +++ b/Source/ee/Ee_SubSystem.cpp @@ -1,3 +1,4 @@ +#include #include "Ee_SubSystem.h" #include "EeExecutor.h" #include "VuExecutor.h" @@ -419,6 +420,14 @@ uint32 CSubSystem::IOPortReadHandler(uint32 nAddress) { nReturn = m_timer.GetRegister(nAddress); } + else if(nAddress >= 0x10001900 && nAddress < 0x10001904) + { + nReturn = (uint32)clock(); + } + else if(nAddress >= 0x10001904 && nAddress < 0x10001908) + { + nReturn = CLOCKS_PER_SEC; + } else if(nAddress >= 0x10002000 && nAddress <= 0x1000203F) { nReturn = m_ipu.GetRegister(nAddress);