Hi,
On 10/12/2016 09:07 AM, Anders Eriksson wrote:
But rather amusing, my 8 core 2.2 GHz Xeon system can't emulate the DSP
fast enough. Small DSP programs are ok (Protracker style players) but
stuff like ACE and Graoumf is a no-no. 7 cores are idle, 1 core
overflows :) I wish some day that different parts of the Falcon
emulation can be put to it's own thread (CPU, DSP, Videl..).
Hatari DSP emulation came originally from Aranym and it *was*
threading.
Threading makes sense when the CPU & DSP cores can run large
parts independently and every emulated program does explicit
synchronization. However, that turned out not to be the case
with many of Falcon's DSP-using programs, so threading was removed.
Programs expect things "just to happen" at right speed without explicit
synchronization, and that can be guaranteed only when DSP core
instructions are emulated in lock-step with each CPU side instruction.
Adding threading and locking on top of that, to be able to run few DSP
instructions at a time on separate core wouldn't help much and could
even slow down things.
Once Hatari has been verified to have cycle-accurate 030 (including
instruction and data cache hits/misses), FPU and DSP emulation,
maybe we could consider looking to threading DSP again. That's still
far off though.