cr1901 wrote:
The controller is cycle-steal, there should be enough instructions with dead cycles... and it's the easiest to support, since the '816 has the control signals for it built in.[/list]
However, many of the most-often used instructions do not have a dead cycle. I don't think you will get satisfactory performance using this method. Just an opinion.
Quote:
At the moment, I can only design it to work with the '816, since it has VDA/VPA outputs.
DMA is certainly possible with the 65C02. However, the 'C02 doesn't have dead cycles in the same sense as that of the '816. Best you can do is watch SYNC so you know when the opcode of the next instruction is about to be fetched. That would be the time for control to be given to the DMAC.
Quote:
Getting source value on the bus after VPA/VPA is valid (and "bus is free"), but before rising edge of PHI2 should be possible on FPGA.
Anything that can respond in 15ns or less will work.
Quote:
The controller should have control signals akin to other 65xx peripheral chips such as VIA and ACIA.
I completely disagree with this premise. When the DMAC is the bus master it should
generate control signals that are analogs of the MPU's control signals, as that is what RAM, ROM and I/O are expecting to see. The DMAC is just a specialized processor whose claim to fame is the ability to rapidly copy bytes from point A to point B. In doing that, it has to do what the '816 would do, and that is generate addresses, manipulate RWB, read or write, etc.
Incidentally, using DMA on the 65xx peripheral silicon is of little value. None of these devices is fast enough to warrant the extra "cost" of DMAing their input and output. Also, these chips lack the requisite handshake signals that are needed to implement DMA. How do you intend to implement a /DACK and DREQ setup with, for example, the 65C22?
Quote:
Should support Block-to-Block, Block-to-Single (IO port), and Single (IO port)-to-Block.
Also useful would be a block-fill, in which the DMAC is told to fill the selected range with a specific byte value. However, that can be simulated by writing the byte into the first location in a range and then performing a single-to-block copy. I use a similar method with MVN to implement block-fill and block-clear in my software.
Quote:
Standard DMA can be emulated (more or less) using WAI loop which checks that DMA is done.
I'm not sure I'm following your thinking on this. First off, WAI is not a "loop." As Garth said, WAI actually stops the MPU by halting the internal clock in the high condition. There is no processing going on at this point. An ABORT, IRQ or NMI will terminate WAI and restart the '816, causing it to execute the next instruction. You can't set conditions for
WAIting. So if your
WAIt is broken by an interrupt unrelated to DMAC activity, how would the foreground task know that it is to just go back to
WAIting?
Quote:
I/O arbitration could work by including an 8237 DACK and DREQ equivalent, as well as VPA/VDA on I/O devices, combined with the appropriate logic gates... if DACK is de-asserted when VPA/VDA indicate "bus is free", the transfer is done, send IRQ to CPU to know data has come in.
I still think you're making it too convoluted trying to sneak in during dead cycles—and the 8237 is hardly a good model to follow. In any case, if your DMAC uses alternate clock cycles to load/store, it will handily outrun the MPU. Greatest efficiency would be achieved by making the DMAC bus master for the duration of the transfer. Anything else will probably drag down the system during I/O activity, which is where DMA is best applied.