![]() |
![]() |
#1 |
Registered User
Join Date: Oct 2014
Location: Germany
Posts: 195
|
CPU speed test
Hi, is there a small CPU speed test for the lazy coder?
I know I can check the CPU flags: Code:
move.w ExecBase_attnFlags(a6),d0 btst #0,d0 bne.s .no68000 Do I have to use a busy-loop counter? Meh... |
![]() |
![]() |
#2 |
ex. demoscener "Bigmama"
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,642
|
not much else to do.. the attnflags basically tell you which instruction set is supported, not the speed of the system.
|
![]() |
![]() |
#3 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,545
|
What do you want to achieve? Testing the cpu-type or the cpu-speed are two completely different topics.
The cpu-type is most conveniently determined by AttnFlags. Except you want to detect an 68060 from the boot block - it's flag is not set before SetPatch has run. The cpu-speed is best measured using the CIA timers around some test routines. But it's hard to detect the exact clock frequency of the chip. |
![]() |
![]() |
#4 |
Registered User
Join Date: Oct 2014
Location: Germany
Posts: 195
|
I just want to display a silly message like... "turbo CPU detected"... and maybe activate some additional features. Maybe not. (until now, it's triggered on 68020+)
|
![]() |
![]() |
#5 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,545
|
That's easy. Then you don't have to be very precise.
Just start a CIA-timer and execute a loop with some test instructions for a few thousands of iterations, and see if your timer at the end of the loop is lower than a "turbo-threshold", which you have to define. |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
FS-UAE uses always maximum CPU speed? | AGS | support.FS-UAE | 6 | 15 February 2015 13:08 |
Speed test using SysInfo | AshtonPete | support.Other | 8 | 17 July 2014 20:36 |
Memory Speed Test | jimbob | support.Other | 0 | 08 December 2013 15:00 |
What is the most accurate speed test for WinUAE? | Steve | support.OtherUAE | 5 | 04 December 2012 18:04 |
CPU Test -Project X- | blade002 | Nostalgia & memories | 7 | 20 June 2006 18:15 |
|
|