Some questions about the Z80 and audio

For anything related to sound (YM2612, PSG, Z80, PCM...)

Moderator: BigEvilCorporation

Post Reply
M-374 LX
Very interested
Posts: 61
Joined: Mon Aug 11, 2008 10:15 pm
Contact:

Some questions about the Z80 and audio

Post by M-374 LX » Mon Sep 02, 2013 2:19 pm

1. How can DAC samples be played at the correct speed/timing?
2. Are the DAC samples signed or unsigned?
3. Should music sequence data be copied to the Z80 RAM or read by banking when the playback is controlled by the Z80?
4. Does anyone know the sample rate of the Z80 sound driver found with the SGCC demos?

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Mon Sep 02, 2013 3:59 pm

1. Count cycles and have same figure between 2 sample writes.
For PAL : CyclesBetweenSamples = (53203424 / 15) / SampleRate
2. Unsigned 8bit
3. You can read all from ROM but beware of DMA, it halts Z80 for the duration of it. Combination of both is suggested, buffer pieces into RAM so you can use them while ROM is off limits from DMA.
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Post Reply