[hatari-users] Long point about DSP and Falcon Emulator

Thomas Huth th.huth at gmx.de
Fri Jan 30 20:12:18 CET 2009


 Salut Laurent!

On Fri, 30 Jan 2009 10:33:58 +0100
LAURENT SALLAFRANQUE <LAURENT.SALLAFRANQUE at ARKEA.COM> wrote:

> Another long mail, sorry :)
> And sorry for the way I write the sentences, it looks like a catalog 
> book sometimes, but I always ask me plenties of questions :)

No problem, weekend just started so I got some spare time...

> 1st point :
> ----------
> I've tested numactl, it worked fine. But I don't know this tool. Are 
> there parameters to use to "simulate" one CPU and 1 Go Ram computer ?

"numactl --cpubind 1 hatari" should do the job, I think.

> 2nd point:
> ----------
[...]
> If we want to emulate a "Real standard Falcon030", I think we'll have
> to run the DSP at exactly 32 Mhz, calculate the 
> DSP_cycle_lenght_instruction and code also a "real 8MHZ Host
> interface".
> 
> I can code the DSP_cycle_lenght_instruction for each instructions if
> you want. (I planed to do it, but I was not sure if it would be
> useful or not).

That would certainly be worth a try... for quick-n-dirty tests you
could also hook up your code into m68k_run_1 or m68k_run_2 in newcpu.c
to execute two DSP instructions after each 68k instruction... (I
already tried that once but it did not work at all, but I likely did
some mistakes with the host interface, too)

> 3rd point :
> ----------
> I've read on Atari.org that you want to improve the falcon emulation 
> part. I ask me a few questions about this :
> 
> - Are the Falcon blitter and the Ste blitter the same ?

Apart from some timing differences (Falcon blitter runs at 16MHz, STE
blitter runs at 8 MHz), they are the same as far as I know.

> - In general, are the componant all the same (Yamaha, ...)

Most parts behave pretty much the same way, just the DMA sound is
slightly different (slightly different frequencies, interrupt timing is
different).

> - Do all the pairing instructions coded for the St emulation still
> run for the Falcon ?

I don't think so, because the Falcon has a real cache. (But you can
already disable the "slow but more compatible mode" to disable the
pairing emulation)

> - In the Hatari menu, the Cpus are 68000, 68010, 68020, 68020+copro
> and 68040), but no 68030. But the Falcon CPU is a 68030, no ?

Right, but the main difference between 020 and 030 is just the MMU. The
old UAE core does not feature MMU emulation yet, so there is no real
030 emulation yet. TOS 4.x does not really care, apart from few MMU
opcodes at startup that Hatari simply ignores.

My plan is to upgrade to the latest version of the WinUAE CPU core one
day. It's much more advanced, and might solve most of the current CPU
emulation problems.

> - Can we use hatari code to emulate an accurate falcon or will we
> have to make a branch for the development (Atari and Falcon were not 
> completly compatible together).

I'd try to avoid branching for cycle-accurate Falcon emulation. Most of
the code can be shared between ST and Falcon emulation, I think, so
it's easier to keep everything close together to avoid doing things
twice.

> 4th point:
> ---------
> I propose you a DSP TODO list (from my point of view) if we want an 
> accurate Falcon emulator.
> It can be completed by a Falcon TODO list.
> 
> In no order :
> 
> - Run the DSP at exactly 32 Mhz
> - Calculate the real cpu time used by each instruction
> - Code a real Host interface module (DMA mode, Interrupt mode, ...)
> - Add all the interruptions into the DSP
> - Add the Port C (SSI) functions
> - Add a direct sound entrance (to be able to use programs like "Audio 
> Fun Machine")
> - Add the sound matrix and connect the DSP to it
> - Add direct 2 disk

Ok, thanks, I'll add that to the main TODO list!

 Thomas



More information about the hatari-users mailing list