[hatari-devel] [Crossbar emulation] : new infos, + some help needed

Laurent Sallafranque laurent.sallafranque at free.fr
Wed Sep 23 16:23:32 CEST 2009


Ok, for now, I've implemented the first part : DSP out and DMA sound play.
Sound is better than before, but ... it plays too fast. (ARGHHHH !)
I can hear it both from DMA sound play and DSP out play.

I'll try to explain what I'm trying to code, from what I understand of 
the subject :

Falcon sound is composed of 3 parts :

- DMA sound (play and record)
- Crossbar
- ADC/DAC

Crossbar is composed of 4 parts :
- DSP Xmit/Send
- External Port send/receive
- DAC/ADC
- DMA record/playback

Yes, it seems that there are 2 sets of DMA devices in the Falcon (one 
for sound and one into the crossbar).

My first problem was to understand which parameters are for each DMA, as 
in the compendium, they're both names "DMA".
(In page B-28 of the compendium, you can read : (DMA OUT) is linked to 
(DMA IN) for example).

I've tried to name functions DmaSound into my code.
Functions for DMA crossbar will be called DmaCB_xyz.
So will I code DmaCB_handle (for int.c interrupts, ...)

Actually, I've applied the correct frequencies for DSP out and DmaSound 
play (I think).

DmaSound play should go into DmaCB play which should go into the DAC.
This one has a 32 bytes buffer for recording and for playing and it's 
frequency can be different than the DmaSound frequency.
I haven't coded the DmaCB for now.


For the DAC part :

I've taken the DAC code from DmaSound.c
I've seen that DAC merges it's datas in a buffer coming from the PSG.

I think that my frequency problem comes from this function, but I'm not 
sure.
Thomas, Would you please have a look at Crossbar_GenerateSamples() ?
Can I use it the same as you did in DmaSound.c ?
(You were reading the whole buffer at one time, I'm sending datas in 
interrupted mode (at a certain frequency).



Todo list :
- finish to implement DmaCB (in and out), ADC, DmaSound record
- multiplex (or not) DAC sound with psg sound
- finish to code DSP Xmit and DSP receive correctly in all modes (use 
SC0, SC1 and SC2)
- implement the 2, 3 and 4 tracks playing/recording


Regards,


Laurent




More information about the hatari-devel mailing list