> I assume the idea is to use the flip-flop for timing, connecting READY/NOTREADY signals to a DMA request or a CPU interrupt signal?
I'd not considered CPU interrupt but it does work for DMA this way. If
you are mixing 4 channel sound to an unbuffered DAC it's pretty much
got to be DMA or tight loops. For game sound effects you can get away
with all sorts as the old games on 1bit audio and the like did. Might
work for something like the 68xx systems with a fast interrupt.
Probably then need a jumper for the IRQ and make a read of the port
toggle the flip flop the other way. Something to ponder when I get
time. Not sure it would work well with the Z80 case.
The DMA/CTC bit was very much an afterthought. The Orch cards for the
Tandy machines of old are straight DAC bashing as were the COCO and
the Dragon. People used to get really quite good stuff out of them.
In terms of status and clocks I didn't want to complicate the board
and if you are using DMA and a CTC then you actually know the DMA
status from the DMA controller and you can monitor the CTC status on
the CTC side.
> 3. Use a FIFO as an alternative to the DMA. Maybe a couple of CD74HC40105E (
https://www.ti.com/product/CD74HC40105) - 4-bit x 16 FIFOs? Unfortunately its "DATA IN READY" signal goes active as soon as the first word is shifted out. Ideally it should be a way to setup the threshold. I know it is getting complicated, but one way would be using a counter instead the flip-flop. It would be reset every time the input register is written, incremented (or decremented) when the data is shifted out of the FIFO (and "played"), and could be queried using the method described in (1) above
That's the Disney Sound Source pretty much. You can in fact plug one
of those into the MG014 printer port and it'll work with the right
code. I did consider a FIFO but the DMA side doesn't appear to need it
and the extra latency is bad for effects and breaks some of the
existing apps that want to vary the rate of DAC updating.
I was looking at some of the 1Kx9 FIFOs and wondering about a sound
driver that way, clocking in something like A8 as the extra bit and
using it as an IRQ when the FIFO output that byte, with A9 wired to
the FIFO reset I think you'd be able to do quite interesting tricks
with it assuming that there are enough ways to avoid clicks on the
FIFO reset as the IRQ will get to the CPU some bits after it hit the
DAC.
I'm still trying to work out if can use the shared memory bus
interface, another RC2014 Z80 and 512K RAM/ROM card and some extras as
a GeneralSound/NeoGS equivalent.
Alan