Page 1 of 2
STE DMA sound system
Posted: 28 Dec 2022 11:13
by exxos
How is it supposed to work exactly ?
AFAIK the sound data is passed in the left video border ? Though on a 50Hz screen, with say 250 lines per frame, that only gives 12,500Hz.
There are 2 DMA channels so even if the right border is used, its still only 12khz x2 :shrug:
Reason is, I'm wonder if its possible to add more sound channels using that method or not.
Re: STE DMA sound system
Posted: 28 Dec 2022 11:59
by Cyprian
actually there is only one sound DMA channel, and also there is 8byte FIFO sound buffer, It is probably located inside the SHIFTER. And the SHIFTER fills it up not at a specific time (e.g. 12Khz or 25Khz) but when it is needed, e.g. 4 bytes in a bulk.
Re: STE DMA sound system
Posted: 28 Dec 2022 12:13
by exxos
Seems a bit more involved than I thought. I was assuming 16bits were passed for left and right audio channels directly to the DACs.
I'll dig out the suska code when I get on the PC later and see how DMA is handled there.
Re: STE DMA sound system
Posted: 28 Dec 2022 12:33
by Cyprian
exxos wrote: 28 Dec 2022 12:13
I was assuming 16bits were passed for left and right audio channels directly to the DACs.
that would be a simpler solution but a bit risky. In case of 50Khz, it needs pass 16bits data 3 times per a scanline, but it would be blocked when a display is active and the SHIFTER grabs a data from the bus.
Re: STE DMA sound system
Posted: 28 Dec 2022 12:40
by exxos
Cyprian wrote: 28 Dec 2022 12:33
that would be a simpler solution but a bit risky. In case of 50Khz, it needs pass 16bits data 3 times per a scanline, but it would be blocked when a display is active and the SHIFTER grabs a data from the bus.
Makes sense. If data is passed 3 times per scanline then there isn't going to be much bandwidth left I think :(
EDIT:
I guess 2x50khz could be sacrificed for 4x25khz channels.
Re: STE DMA sound system
Posted: 28 Dec 2022 16:29
by sporniket
The dma sound is also described on the info-coach page here
https://info-coach.fr/atari/hardware/STE-HW.php#shifter
so basically, you could watch when the /sload (pin37) is asserted in relation with hsync/vsync.
Also, maybe the shifter has a little internal fifo buffer to feed the dma sound databus (pins 28 downto 21) without gap ?
Re: STE DMA sound system
Posted: 28 Dec 2022 17:10
by exxos
I could measure it but its looking like it would just be simpler to go back to my original idea of just having separate sound RAM.
Re: STE DMA sound system
Posted: 28 Dec 2022 19:44
by Cyprian
sporniket wrote: 28 Dec 2022 16:29
Also, maybe the shifter has a little internal fifo buffer to feed the dma sound databus (pins 28 downto 21) without gap ?
as I mentioned earlier, there is dedicated 8 byte FIFO buffer for the STE Sound DMA:
https://github.com/frno7/psgplay/issues/10
https://www.atari-forum.com/viewtopic.p ... 70#p229070
Re: STE DMA sound system
Posted: 28 Dec 2022 23:51
by sporniket
ha sorry, I did not read properly the whole thread...
Re: STE DMA sound system
Posted: 29 Dec 2022 00:56
by Cyprian
exxos wrote: 28 Dec 2022 11:13
Reason is, I'm wonder if its possible to add more sound channels using that method or not.
anyway, that is a great idea, there are a lot of free memory slots per scanline for more sound DMA channels