Skip to content

Commit 35b50cf

Browse files
committed
add an IO Port to get the host clock value
1 parent 8b4cfa6 commit 35b50cf

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Source/ee/Ee_SubSystem.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#include <time.h>
12
#include "Ee_SubSystem.h"
23
#include "EeExecutor.h"
34
#include "VuExecutor.h"
@@ -419,6 +420,14 @@ uint32 CSubSystem::IOPortReadHandler(uint32 nAddress)
419420
{
420421
nReturn = m_timer.GetRegister(nAddress);
421422
}
423+
else if(nAddress >= 0x10001900 && nAddress < 0x10001904)
424+
{
425+
nReturn = (uint32)clock();
426+
}
427+
else if(nAddress >= 0x10001904 && nAddress < 0x10001908)
428+
{
429+
nReturn = CLOCKS_PER_SEC;
430+
}
422431
else if(nAddress >= 0x10002000 && nAddress <= 0x1000203F)
423432
{
424433
nReturn = m_ipu.GetRegister(nAddress);

0 commit comments

Comments
 (0)