slaanesh
Certified Guru
Just wondering if it's possible to do the following of the GP32:
Required:
QUOTE
osd_cycles() inline function/macro in osinline.h, returning a counter. The function must be as low overhead as possible since it is called thousands of times per second when the profiler is active. The counter should be as precise as possible, to provide accurate measurements; the ideal unit is the number of CPU cycles, e.g. as returned by the Pentium instruction RDTSC.
On the GP2X, the minimal lib does it using the following:
CODE
unsigned long gp2x_timer_read_real(void)
{
return gp2x_memregl[0x0A00>>2];
}
Is there an equivalent on the GP32?
Speaking of cycle counts, what about timers? I've found some really good threads about low resolution Tick counters for the GP32, however nothing better tha 64 ticks per second. I know about GpTickCountGet() which seems to do pretty much the same thing and once again low resolution.
I mean, isn't this really low? How do you get more accurate timing? Or has this been a problem with the GP32 since the start?
Required:
QUOTE
osd_cycles() inline function/macro in osinline.h, returning a counter. The function must be as low overhead as possible since it is called thousands of times per second when the profiler is active. The counter should be as precise as possible, to provide accurate measurements; the ideal unit is the number of CPU cycles, e.g. as returned by the Pentium instruction RDTSC.
On the GP2X, the minimal lib does it using the following:
CODE
unsigned long gp2x_timer_read_real(void)
{
return gp2x_memregl[0x0A00>>2];
}
Is there an equivalent on the GP32?
Speaking of cycle counts, what about timers? I've found some really good threads about low resolution Tick counters for the GP32, however nothing better tha 64 ticks per second. I know about GpTickCountGet() which seems to do pretty much the same thing and once again low resolution.
I mean, isn't this really low? How do you get more accurate timing? Or has this been a problem with the GP32 since the start?
Last edited by a moderator: