English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 26 January 2018, 19:33   #421
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,517
Quote:
Originally Posted by bernd roesch View Post
I have notice with this asm test program that context switch from 68k to PPC and back is very slow. around 40 calls on my 4*2.8 GHZ system. original PPC HW reach 3000 context switches /sec with this amiblitz program. source can work too with a 68k assembler. i reduce loop size to 100 so it take not too long for the attached binary. wy is this so slow ?. on real PPC it is slow because caches of PPC and 68k need flush this cost lots time. I attach shell prog to test.
When I run it, PPC thread starts (so it does something with PPC) but it also exits immediately.
Toni Wilen is offline  
Old 26 January 2018, 22:34   #422
bernd roesch
Registered User
 
Join Date: Apr 2012
Location: germany
Posts: 139
this is a version that do 30000 loops. it start a PPC program and the PPC program quit immidiatly. the problem on real ppc HW was because the switch between 68k to ppc and from PPC to 68k was slow because of cache flushes. but strange wy this is in winuae emulation even more slow. if it can not easy make faster ok, but maybe it is a simple problem or maybe this test do something winuae not like. but it is done as th warpup specs do . i test a little and the PPC assembler in amiblitz work partly. its not fault of winuae. this is a more complex example source. binary i attach is from simple example. for this i currently have no binary

WBStartup
For i.l= 1 To 3000
RunPPc ?ppcprog,?_base,$12345678 ;use warpup (needs wizard.library)
Next
End
_base: Dc.l 1 ;_base is defined in all.bb2
UsePPC
#storereg=8 ;=r8 or fp8
ppcprog
mr r21,r2

lfs f0,dat4-_base(r2)
;la r1,lbl1
;liw r8,$dff180 ;Changes backgroundcolor of aga Screen
;sth r9,0(r8)

lwz r31,ppcdat1-_base(r2) ;same as above
blr
ppcdat1: Dc.l 2
dat2: Dc.s 2 ;float single
fpudat3; Dc.d 3.14 ;float double
dat4: Dc.d 25.25
lbl1: Dc.d 20
Attached Files
File Type: zip context30000.zip (1.3 KB, 145 views)
bernd roesch is offline  
Old 26 January 2018, 22:45   #423
Romanujan
Registered User
 
Join Date: Dec 2007
Location: Szczecin/Poland
Posts: 424
If it helps, there is a benchmark for measuring PPC/68k context switching, available here: http://cosmosamiga.free.fr/download/measurecon.lha

And here are some screenshots with real hardware results: http://leblogdecosmos.blogspot.com/2...-161beta2.html

In short:

- Cosmos real HW, unoptimized library: 633 microseconds per switch
- my Core i7 4790k, Linux, 64-bit FS-UAE 2.9.0, unoptimized library: around 8500-9200 microseconds per switch

Last edited by Romanujan; 26 January 2018 at 22:55. Reason: additional information
Romanujan is offline  
Old 27 January 2018, 18:15   #424
bernd roesch
Registered User
 
Join Date: Apr 2012
Location: germany
Posts: 139
Quote:
Originally Posted by AMIGASYSTEM View Post
I did not understand what you said, the only library that works on AFA OS PPC is "Wazp3D.library-full".

On AFA OS 68k standard works well "Wazp3D.library-winuae" and "Wazp3D.library-full"
I install newest waz3d. 68k versions crash with ramlib error too(0x8000000A). without PPC enable it work ok. I look and see a ramlib patch that increase stack size to 8192. its http://aminet.net/package/util/sys/StackAid

source is in too. does not help on my system. scout show more stack for ramlib. maybe help on your system. or need more stack. can you tell which stack your ramlib task without this patch ?. if your ramlib stack is larger than 8192 bytes than you need this not
bernd roesch is offline  
Old 27 January 2018, 19:32   #425
AMIGASYSTEM
Registered User
 
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,252
Ciao bernd, I'm sorry if I'm wrong, I'm not an expert in this


I think I have a more recent Warz3D THIS


I think I have installed well "StackAid" (see startup-sequence attached),
Now I receive a different error, I also attach scout results (Ramlib) see screeenshot

Last edited by AMIGASYSTEM; 16 February 2018 at 00:27.
AMIGASYSTEM is offline  
Old 27 January 2018, 20:18   #426
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,517
Quote:
Originally Posted by Romanujan View Post
- Cosmos real HW, unoptimized library: 633 microseconds per switch
- my Core i7 4790k, Linux, 64-bit FS-UAE 2.9.0, unoptimized library: around 8500-9200 microseconds per switch
I got this:

Starting 10000 context-switch...done!
Ellapsed: 2 sec 985494 microsec, ~298 microsec each.
Toni Wilen is offline  
Old 27 January 2018, 22:47   #427
AMIGASYSTEM
Registered User
 
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,252
If it can be important the demos Warp3D PPC on OS4.1 Emulated they work well !

Last edited by AMIGASYSTEM; 16 February 2018 at 00:27.
AMIGASYSTEM is offline  
Old 28 January 2018, 14:23   #428
bernd roesch
Registered User
 
Join Date: Apr 2012
Location: germany
Posts: 139
Quote:
Originally Posted by Toni Wilen View Post
I got this:

Starting 10000 context-switch...done!
Ellapsed: 2 sec 985494 microsec, ~298 microsec each.
can you attach your winaue config and which warpup libs you use ?. do you use amikit or other aos install ? .maybe there is a setting in winuae that do huge slowdown. with this program is very slow too

Number of context switches to be measured (max. 65535):1000
Starting 1000 context-switch...done!
Ellapsed: 24 sec 679084 microsec, ~24679 microsec each.
12.h0:> "Ram Disk:measurecontextwos"


i have cpu idle for 68k and ppc all full left. when i look with scout CPU load for this test it show around 1.5% so 68k seem wait lots.
bernd roesch is offline  
Old 28 January 2018, 14:45   #429
bernd roesch
Registered User
 
Join Date: Apr 2012
Location: germany
Posts: 139
Quote:
Originally Posted by AMIGASYSTEM View Post
Ciao bernd, I'm sorry if I'm wrong, I'm not an expert in this


I think I have a more recent Warz3D THIS


I think I have installed well "StackAid" (see startup-sequence attached),
Now I receive a different error, I also attach scout results (Ramlib) see screeenshot
I have the same wazp version use you use. your ramlib stack is set at 8 kb. strange that only i get the ramlib errors.

can you please do the context switch tests that are here list, to see how fast your ppc context switch. what cyberstorm rom version you have ?. I have the .71

the free memory that is always free from AFA is because the better aros/afa mem handler. it show the program do wrong. with 68k i never get such a requester. so can not wazp problem. free memory that is freed before is not notice in default AOS. but such program mistake is very dangerous it can do bad things, if for example another task alloc memory and get this range now. and if later gearsppc want free this block again, then amiga can do crazy things because gearsppc free the memory and another task can alloc the memory and modify it, so the task that alloc the memory first get then wrong data.
Attached Thumbnails
Click image for larger version

Name:	expansion.jpg
Views:	218
Size:	91.9 KB
ID:	56476  
bernd roesch is offline  
Old 28 January 2018, 15:12   #430
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,517
Quote:
Originally Posted by bernd roesch View Post
can you attach your winaue config and which warpup libs you use ?. do you use amikit or other aos install ? .maybe there is a setting in winuae that do huge slowdown. with this program is very slow too

Number of context switches to be measured (max. 65535):1000
Starting 1000 context-switch...done!
Ellapsed: 24 sec 679084 microsec, ~24679 microsec each.
12.h0:> "Ram Disk:measurecontextwos"


i have cpu idle for 68k and ppc all full left. when i look with scout CPU load for this test it show around 1.5% so 68k seem wait lots.
Attached. It is very basic config, WB is 3.1 with some minimal changes. Above mentioned aminet v40 (which replaced some other version I didn't note when I trying to duplicate your crash)
Attached Files
File Type: uae CSPPC.uae (12.6 KB, 156 views)
Toni Wilen is offline  
Old 28 January 2018, 21:32   #431
AMIGASYSTEM
Registered User
 
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,252
Quote:
Originally Posted by bernd roesch View Post
can you please do the context switch tests that are here list, to see how fast your ppc context switch. what cyberstorm rom version you have ?. I have the .71
My configuration on is the same as in your screenshot
AMIGASYSTEM is offline  
Old 29 January 2018, 14:47   #432
thellier
Registered User
 
Join Date: Sep 2011
Location: Paris/France
Posts: 274
Hello

>On AFA OS 68k standard works well "Wazp3D.library-winuae" and "Wazp3D.library-full"

True
Wazp3D.library-full is named like this as it contain also the renderer in the code (the so called soft3d library) so is pure 68k software only

Wazp3D.library-winuae call an external soft3d library that call an x86 soft3d.dll that use hardware opengl32.dll. So this is 68k/x86/hardware rendering (fast & nice)

Wazp3D.library-os4 is same as Wazp3D.library-full but compiled for OS4/ppc so is pure ppc software only
There is no hardware rendering here as WinUAE-ppc dont support native calls to x86 so Wazp3D works in OS4 but is slow

As you have noticed there is no Wazp3D.library-wos for warpos ppc/os3
It is unclear if there is a way to make warpos ppc/os3 progs works with Wazp3D
(I mean I dont know how but it may be possible)

Voila
thellier is offline  
Old 29 January 2018, 17:05   #433
AMIGASYSTEM
Registered User
 
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,252
Ciao thellier and thanks for the information, i on the AFA OS 68k Standard do not know any significant difference in speed between "Wazp3D.library-winuae" and "Wazp3D.library-full".

Yes on OS4 Wazp3D, it is much slower, but may depend on the slow emulation of OS4, it is much slower, but may depend on the slow emulation of OS4


Colliding Stars AFA OS3 Vs OS4 1 Test

[ Show youtube player ]
AMIGASYSTEM is offline  
Old 29 January 2018, 18:40   #434
bernd roesch
Registered User
 
Join Date: Apr 2012
Location: germany
Posts: 139
Have you copy the soft3d.dll to your windows native libs folder ?. must be in winuae_dll folder in folder you have winuae

I notice it seem newest winuae log file do not output when a amiga native lib as sosft3d.dll is load. this is usefull to see if it is really load. maybe on my system ppc crash because it use native soft3d.

I look your video again and i notice that the gears demo run on your PC very slow. On my system gears demo in window run smooth with or without soft3.dll

to work fast the JIT need set to direct. but this work only with 68k and not ppc. so 68k run lots faster

when i switch JIT to indirect mode gears demo windows run much slower
bernd roesch is offline  
Old 29 January 2018, 18:57   #435
AMIGASYSTEM
Registered User
 
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,252
Quote:
Originally Posted by bernd roesch View Post
Have you copy the soft3d.dll to your windows native libs folder ?. must be in winuae_dll folder in folder you have winuae
Yes, I have the library soft3d.dll in the WinUAE directory

Quote:
I look your video again and i notice that the gears demo run on your PC very slow. On my system gears demo in window run smooth with or without soft3.dll
calculates that mine is an old DualCore Windows7 32Bit, add slowdown video recording , redone video test with gears demo

Last edited by AMIGASYSTEM; 13 February 2018 at 15:13.
AMIGASYSTEM is offline  
Old 29 January 2018, 19:06   #436
bernd roesch
Registered User
 
Join Date: Apr 2012
Location: germany
Posts: 139
Quote:
Originally Posted by Toni Wilen View Post
Attached. It is very basic config, WB is 3.1 with some minimal changes. Above mentioned aminet v40 (which replaced some other version I didn't note when I trying to duplicate your crash)
thanks for config. i do a quick test without startup-sequence and your config have a very big speed boost. more than 10* faster. in this test come only on first start a message that env is not find. can ignore and then second testrun there come no such message. i do test with same hardfile and with my install too without startup sequence. so can not be a AOS install problem, because no setpatch etc is load. on my config only 1000 times need a little more as 20 sec

so i need find what the reason is for this. i notice you disable JIT complete. but this is not he reason. when i disable JIT it get only slightly 10-20% faster.

see screenshot with the result of your config.
Attached Thumbnails
Click image for larger version

Name:	contextswitch.jpg
Views:	220
Size:	124.8 KB
ID:	56507  
bernd roesch is offline  
Old 29 January 2018, 22:48   #437
Romanujan
Registered User
 
Join Date: Dec 2007
Location: Szczecin/Poland
Posts: 424
Good to know, some testing will be needed to find out what slows the context switching down. First results: on BlizzardPPC 68040 emulation, the 68040.library from AmigaOS 3.9 installation CD is faster than the ROM built-in or the one from Thomas Richter MMU package - my context switching time went down by 1500-2000 microseconds. But still there has to be something more...
Romanujan is offline  
Old 30 January 2018, 01:02   #438
AMIGASYSTEM
Registered User
 
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,252
I tried Blizzard 1260 and the system became faster, Gears PPC it did not work but I have not received any error
AMIGASYSTEM is offline  
Old 30 January 2018, 15:10   #439
bernd roesch
Registered User
 
Join Date: Apr 2012
Location: germany
Posts: 139
The rtg board Ram size can not larger as 32 MB and no other Z3 ram or other ram should add. then context switch is more than 20* faster. If set in Toni's config rtg board size to 64 MB then the huge slowdown happen. same happen if Z3 ram is add

Last edited by bernd roesch; 30 January 2018 at 15:35.
bernd roesch is offline  
Old 30 January 2018, 17:13   #440
Romanujan
Registered User
 
Join Date: Dec 2007
Location: Szczecin/Poland
Posts: 424
On my FS-UAE results are slightly different - GFX memory size (even 128M) does not increase the context switch time, 32MB (or less) of Z3 memory is also fine. 64MB or more Z3 memory => slowdown (the more memory, the slower the context switching).

Checked using OS 3.9 BB2 + many patches, BPPC 68040, Thomas Richter 68040 library.
Romanujan 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
QEMU TCG as JIT replacement? KillaByte request.UAE Wishlist 21 30 January 2018 16:05
PPC emulation for winuae marauder request.UAE Wishlist 25 04 November 2014 06:13
WinUAE PPC thread B14ck W01f support.WinUAE 301 10 September 2014 16:34
WinUAE ppc support? blasterreal support.WinUAE 8 29 September 2010 00:51
PPC on WinUAE ? glue request.UAE Wishlist 4 28 January 2007 12:04

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 23:52.

Top

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