English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 16 September 2016, 07:11   #1
Lazycow
Registered User
 
Lazycow's Avatar
 
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
But what about these nasty 68000 turbo boards, found in the MiniMig?
Do I have to use a busy-loop counter? Meh...
Lazycow is offline  
Old 16 September 2016, 10:28   #2
hooverphonique
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.
hooverphonique is offline  
Old 16 September 2016, 15:41   #3
phx
Natteravn
 
phx's Avatar
 
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.
phx is offline  
Old 16 September 2016, 17:06   #4
Lazycow
Registered User
 
Lazycow's Avatar
 
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+)
Lazycow is offline  
Old 16 September 2016, 21:14   #5
phx
Natteravn
 
phx's Avatar
 
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.
phx is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 20:27.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.07290 seconds with 13 queries