English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 18 October 2018, 22:51   #1
Zilog
Registered User

 
Join Date: May 2014
Location: Italy
Posts: 268
[Request] Aga or Cpu in separate thread

Hi Tony,
for emulated Aga subpixel are request more cpu power.
It possible run Aga o Cpu into separate thread?


In Pcem for emulate 3DFx it was use this tecnic for increase performance.




Thanks.
Zilog is offline  
Old 19 October 2018, 20:22   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 44
Posts: 22,932
It will be really difficult.

Problem is chipset accesses (it is always the problem..) that will become relatively slow because they must be done by main thread which means lots of message passing between threads.
Toni Wilen is offline  
Old 21 October 2018, 11:26   #3
Zilog
Registered User

 
Join Date: May 2014
Location: Italy
Posts: 268
Quote:
Originally Posted by Toni Wilen View Post
It will be really difficult.

Problem is chipset accesses (it is always the problem..) that will become relatively slow because they must be done by main thread which means lots of message passing between threads.

Ok, There is two problem if i good understood:

1) The access to chipset: this, in the emulator, translates with access to variables.
if I'm not mistaken, it possible, in multithreading programming, use the global variables.
In this mode it possible use into Main thread and Child thread the same variables without pass between thread the variables.

2) Not use "software interrupt" for active Aga Child thread from the Main thread.
Aga Child thread use in polling mode,and for active Aga Child thread and syncronize with cpu/chipset use always global variables, for sample clock=1 run Aga instruction and clock=0 don't run Aga instruction.

Simple Sample Aga Child (Polling)

While () (Create Polling)

If (clock==1) then

run Aga instruction
...............
...............
...............
...............

else (null)

do.
Zilog is offline  
Old 23 October 2018, 17:28   #4
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 44
Posts: 22,932
There is no "AGA thread". All the chipset stuff must be in main thread. There is no way around it. (Of course there is but it would mean complete rewrite)

CPU can be in separate thread but because none of chipset variables must change (due to CPU chipset access) when chipset emulation is doing internal operations (emulating blitter, copper, bitplane, CIAs etc..) which means CPU thread can't do any chipset access during that time = CPU stalls. If there are too many chipset related CPU accesses, performance will be slower than single thread mode.

But it is also basically already done: PPC emulator is in separate thread and m68k could do the same but PPC isn't that chipset sensitive and chipset accesses are relatively rare compared to "normal" 68k AmigaOS.

It probably would help in some situations but it is simply so painful and it is far too easy to break everything else accidentally. Speed without any care for any other reasons isn't something I want to do.
Toni Wilen is offline  
Old 23 October 2018, 18:43   #5
Zilog
Registered User

 
Join Date: May 2014
Location: Italy
Posts: 268
Quote:
Originally Posted by Toni Wilen View Post
.......

Ok Tony. I understood.


Only for my Curiosity: in the amiga the Aga are intregreted in the Chipset?


Thnaks.
Zilog 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
[Feature Request] Cycle Exact for other Cpu Zilog support.WinUAE 13 05 December 2017 19:08
[request] Separate music/sfx volume slider Retro-Nerd support.WinUAE 3 07 August 2013 18:41
chipset/cpu speed (from beta thread) zygzak support.WinUAE 1 18 July 2007 15:32
WHDLoad Update Request Thread killergorilla project.Killergorilla's WHD packs 50 26 February 2007 15:19

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


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