18 October 2018, 22:51 | #1 |
Registered User
Join Date: May 2014
Location: Italy
Posts: 419
|
[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. |
19 October 2018, 20:22 | #2 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,506
|
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. |
21 October 2018, 11:26 | #3 | |
Registered User
Join Date: May 2014
Location: Italy
Posts: 419
|
Quote:
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. |
|
23 October 2018, 17:28 | #4 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,506
|
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. |
23 October 2018, 18:43 | #5 |
Registered User
Join Date: May 2014
Location: Italy
Posts: 419
|
|
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 |
|
|