English Amiga Board


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

 
 
Thread Tools
Old 17 October 2016, 19:40   #21
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,355
Quote:
Originally Posted by Toni Wilen View Post
List few cache fitting routines with cycle counts included and I'll check if there is something obviously wrong. (no MULs or DIVs!)
Ok. First attempt (winuae 3.1.0, no jit, approximate a1200) :
Code:
.loop
 moveq #1,d0      ; 2
 lsl.l d2,d0      ; 6 (8)
 dbf d7,.loop     ; 6 (14)
Timing with the lsl is 1.33 that of the same code without it. Should be 1.75.

I can't guess the intended cpu frequency so i can't really count clocks...


Quote:
Originally Posted by Toni Wilen View Post
It won't work. It would make many demos with MULs or DIVs to run too slow and skip frames. (worst cases are not that common, no static cycle count is common enough) They need to be accurate. Unfortunately 68020+ MUL and DIV are "too fast" to make any easy guesses of used algorithm. (vs 68000 which also had microcode listing helping)
If the worst case can't work, then remove a few clocks out of it. Perhaps something close to the best case would suffice.
For MUL the "simple" cases are usually made without it, so remove 2 clocks from the max and it should be ok.
Same with DIV, this instruction rarely appears in time critical code anyway ('xcept in my prime number factorization program and in my 5:3 downsampling routine ).

But perhaps a few stats made from various value could reveal, if not the algorithm, at least its true speed ?
meynaf is offline  
Old 19 October 2016, 20:30   #22
PiCiJi
Registered User
 
PiCiJi's Avatar
 
Join Date: Sep 2003
Location: germany
Age: 45
Posts: 445
For emulating the 68020 it’s hard to calculate the right amount of internal cycles between bus cycles, because of the non hardcoded design. The correct placement of bus cycles matters so that other bus masters access the right values at the right time on shared memory.

By the way, the docu says something about dynamic bus sizing in combination with address alignment affects the number of bus cycles for byte, word or long word transfers. It's clear from a internal point of view.
The question is what port size is externally set for amiga system (always 32 bit) ?
Depends this from memory type, like chipmem, cia ...?
Is there a difference between amiga 1200 and 68020 turbo carded A500 system?

Last edited by PiCiJi; 19 October 2016 at 20:52.
PiCiJi is offline  
Old 19 October 2016, 20:46   #23
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,355
Quote:
Originally Posted by PiCiJi View Post
Is there a difference between amiga 1200 and 68020 turbo carded A500 system?
Yes there is a difference. A1200 accesses chipmem with 32-bit, where turbo A500 only does 16-bit.
The chipset is 16-bit and has same timing as chipmem.
CIA are even slower than chipmem.
meynaf is offline  
Old 21 October 2016, 20:36   #24
PiCiJi
Registered User
 
PiCiJi's Avatar
 
Join Date: Sep 2003
Location: germany
Age: 45
Posts: 445
thanks for information folks
PiCiJi is offline  
Old 06 January 2017, 20:50   #25
PiCiJi
Registered User
 
PiCiJi's Avatar
 
Join Date: Sep 2003
Location: germany
Age: 45
Posts: 445
M68000 user manual ninth edition:

The transition from supervisor to user mode can be
accomplished by any of four instructions: return from exception
(RTE) (MC68010 only), move to status register (MOVE to SR),
AND immediate to status register (ANDI to SR), and exclusive
OR immediate to status register (EORI to SR).

68000 RTE instruction can't switch back to user mode? some documentation error ?
PiCiJi is offline  
Old 06 January 2017, 21:17   #26
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,355
If the manual says that, then yes it contains an error. The cpu wouldn't work at all if RTE couldn't go back to user mode !
meynaf is offline  
Old 14 January 2017, 23:45   #27
amilo3438
Amiga 500 User
 
Join Date: Jun 2013
Location: EU
Posts: 1,549
Quote:
Originally Posted by meynaf View Post
Btw. I would like to have more accurate 020/030 timings under winuae for suitable code optimizations, as for now the "cycle exact" timing is about as wrong as in max speed with jit active. It doesn't need to be 100% cycle exact, just better than what we have now.
If compared with a real A1200 in SysInfo, the 68EC020 "cycle exact" timing in the latest WinUAE3400 does not look so bad !

And I hope there still exist chance for some more improvement.

Last edited by amilo3438; 13 November 2022 at 12:27.
amilo3438 is offline  
Old 15 January 2017, 14:28   #28
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,573
Sysinfo speed test is simple and stupid, real world is much much much ... much more complex.
Toni Wilen is online now  
Old 15 January 2017, 14:57   #29
amilo3438
Amiga 500 User
 
Join Date: Jun 2013
Location: EU
Posts: 1,549
Quote:
Originally Posted by Toni Wilen View Post
Sysinfo speed test is simple and stupid, real world is much much much ... much more complex.
Definitely agree, so it can be used only for "quick & dirty" comparison test. (and for a such test it does not need to be 100% exact)

But in a case of A500 and 68000 it seems to be pretty accurate ! (as shown in attached picture)


EDIT:
However, playing with the SysInfo can give some "useful" results !
For more see the post #111 on "Problematic AGA demos" topic, or: --> http://eab.abime.net/showpost.php?p=...&postcount=111

Last edited by amilo3438; 13 November 2022 at 12:27.
amilo3438 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
Copper timing yaqube Coders. General 61 08 April 2019 00:41
OS 4.1 Timing Issue Steve support.WinUAE 3 24 January 2015 20:49
How do I know if I need a timing fix? stu232 support.Hardware 4 05 October 2013 01:47
Even more sound timing issues... andreas support.WinUAE 11 30 November 2005 11:23
A1200 timing fixes? icewizard2k5 support.Hardware 2 28 February 2005 09:37

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 16:05.

Top

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