Hi Tom,
> details of course matter, as there is a huge difference between
> mainboard DMA (afaik mostly used for floppies) and PCI DMA (used by
> everybody else).
Mainboard DMA also sounds good for ISA SoundBlaster, I guess?
> for the former onboard DMA, I'm not sure there was ever some
> communication among DMA users. it was just 'set up DMA. use it.
> forget it.' this should be emulatable as well.
In a way yes, because you had to configure drivers to avoid
DMA channel conflicts, or use ISA PnP for that, but then the
8237 DMA has some port overlaps:
0000 R- DMA channel 0 current address byte 0, then byte 1
0000 -W DMA channel 0 base address byte 0, then byte 1
0001 RW DMA channel 0 word count byte 0, then byte 1
0002 R- DMA channel 1 current address byte 0, then byte 1
0002 -W DMA channel 1 base address byte 0, then byte 1
0003 RW DMA channel 1 word count byte 0, then byte 1
0004 R- DMA channel 2 current address byte 0, then byte 1
0004 -W DMA channel 2 base address byte 0, then byte 1
0005 RW DMA channel 2 word count byte 0, then byte 1
0006 R- DMA channel 3 current address byte 0, then byte 1
0006 -W DMA channel 3 base address byte 0, then byte 1
0007 RW DMA channel 3 word count byte 0, then byte 1
0008 R- DMA channel 0-3 status register (see #P0001)
0008 -W DMA channel 0-3 command register (see #P0002)
0009 -W DMA channel 0-3 write request register (see #P0003)
000A RW DMA channel 0-3 mask register (see #P0004)
000B -W DMA channel 0-3 mode register (see #P0005)
000C -W DMA channel 0-3 clear byte pointer flip-flop register
any write clears LSB/MSB flip-flop of addr & counter reg
000D R- DMA channel 0-3 temporary register
000D -W DMA channel 0-3 master clear register
any write causes reset of 8237
000E -W DMA channel 0-3 clear mask register
any write clears masks for all channels
000F rW DMA channel 0-3 write mask register (see #P0006)
As you can see in RBIL tables P0001 to P0005, some registers
have the same port, but different data, for each channel.
No problem if you have a central virtual 8237 controller.
But if you want to write for example a virtual floppy with
a built-in 8237 emulation for one channel and a virtual
SB16 with a built-in 8237 for another channel, they will
both have to virtualize port 8 to F. So it might be nice
to have a central virtual 8237 with some sort of API.
On the other hand, who needs a virtual floppy? Almost
everybody only uses BIOS API to work with floppy drives.
And if a virtual soundblaster uses several ISA DMA
channels, it would still be for the same single SB16.
Eric
_______________________________________________
Freedos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-devel