| Other BBSes » |
Sommarhack 2020 is cancelled in it's normal format. We're moving it online and
will stream competitions as well as other Atari programmes during July 4 evening.
Click the logo for more info!
CT60 and related things BBS
|Re: CT60 weirdness|
Posted by: sqward
Thomas: I don't understand how you make your measurement. It seems to me that you have some sort of a loop in which you increase a variable? If so, this is not the best way to time things, because it will be dependent on your CPU speed.
I use the following routine to get time stamp accurate to about 20 microseconds. You can call it before and after the code you want to time and do the math.
uint64_t getMicroseconds( )
uint64_t timer200hz = *((volatile uint32_t*)0x4BA) ;
uint32_t data = *((volatile uint8_t*)0xFFFFFA23);
if ( *((volatile uint32_t*)0x4BA) != timer200hz )
timer200hz*=5000; // convert to microseconds
timer200hz+=(uint64_t)(((192-data)*6666)>>8); //26; // convert data to microseconds
[All messages in this thread] [Start new thread]
What's the anti-troll code?
That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.