psgplay icon indicating copy to clipboard operation
psgplay copied to clipboard

Emulate Atari STE DMA sound hardware

Open frno7 opened this issue 4 years ago • 6 comments

Some SNDH files made for the Atari STE make use of its sound DMA hardware. Let PSG play emulate this piece of hardware. Plan:

  • [x] define DMA sound device in lib/atari/sound.c;
  • [x] 6258, 12517, 25033 and 50066 Hz sampling frequencies;
  • [x] mono and stereo sound;
  • [x] 8-byte FIFO DMA prefetch buffer;
  • [x] Double buffer DMA sound registers;
  • [x] assert MFP GPIP I7 DMA interrupt;
  • [ ] assert MFP Timer A DMA interrupt.

frno7 avatar May 23 '20 07:05 frno7

Not sure about what is missing here, but want to mention FreeMiNT has also a GPL 2.0 C driver for playing sounds using the STE DMA sound hardware, cf https://github.com/freemint/freemint/blob/5e8dd40e53b6535188f9bcf956d4ff770ccd8a0c/sys/xdd/audio/README. I used this driver to play .au files via cat file.au > /dev/audio and it haven't failed me so far.

EmmanuelKasper avatar Aug 23 '22 09:08 EmmanuelKasper

@EmmanuelKasper, I gather the Freemint driver you’re referring to is meant to be used with Atari hardware? This issue is about emulating that kind of hardware. :-) The emulation is almost complete, save for the hardware completion interrupt.

frno7 avatar Aug 25 '22 05:08 frno7

you are right of course !

EmmanuelKasper avatar Aug 25 '22 15:08 EmmanuelKasper

MFP GPIP I7 DMA interrupts are asserted in commit 8de3566da18a1623ef76ba8203b8ea2749962ceb. Double buffer DMA sound registers in commit d5d2cee0e6876a7f0d780df35e7f0b26ad702afa.

frno7 avatar May 28 '23 07:05 frno7

Add an example file (dir) that's been flagged to me. SNDH archive:gwEm/DMA/Stardust_Memories.sndh

chris-y avatar Aug 21 '23 08:08 chris-y

Add an example file (dir) that's been flagged to me. SNDH archive: gwEm/DMA/Stardust_Memories.sndh

Confirmed. DMA drums are missing, apparently.

frno7 avatar Aug 21 '23 09:08 frno7