getting the time on EE?
getting the time on EE?
Is there a way to get the time on the EE with the ps2sdk? I see several timer functions, but nothing for either getting the current time, or for measuring the passage of time. I noticed in the iop/ sub directory there is a getPs2Time() in libhdd, and a GetSystemTime() in kernel but I am unsure of their relation to the EE code.
You can use the timer: http://forums.ps2dev.org/viewtopic.php?t=878 It has an resolution of about 2 us and counts 113 ms, if setting with the maximum divider of system clock / 256.
In CVS are another nice functions for using the internal EE performance counters: http://cvs.ps2dev.org/ps2Perf/
If you have 300 ms time to read the clock and if you need the realtime clock, you can use the cdReadClock, but I don't have example code for it.
In CVS are another nice functions for using the internal EE performance counters: http://cvs.ps2dev.org/ps2Perf/
If you have 300 ms time to read the clock and if you need the realtime clock, you can use the cdReadClock, but I don't have example code for it.
The RTC is attached to the CDVD controller which means getting the time from the EE is very slow and can be a hassle.
Shoot Pixels Not People!
Makeshift Development
Makeshift Development