You might want to look at this site: OS Dev Wiki: ISA DMA Controller. It has a lot of good information about legacy PC devices.
You'll have to forgive me as I'm a little rusty on this but:
Register 0xD6 - The DMA Mode register for the master DMA controller. Writing 0xC0 (1100 0000b) sets the controller up to daisy chain the other (slave) DMA controller on the system. Bits 6 and 7 determine the mode the chip should be in:
- 00 - Transfer on Demand
- 01 - Single DMA Transfer
- 10 - Block DMA Transfer
- 11 - Cascade Mode (this is the mode 0xC0 selects)
PC compatible systems have two of these DMA controllers cascaded together to provide a total of 7 functional channels (1 is lost in the daisy chaining).
Register 0xD4 - the Single Channel Mask register for the master DMA controller. It can be used to individually turn off/on the mask for a given channel. Bits 0 and 1 indicate the desired channel and Bit 2 is the mask enable. Writing 0x00 ensures that channel 4 (i.e. channel 0 on the master DMA controller) is unmasked so that the channels 0-3 are not also masked off.
I apologize in advance if any of this is confusing/incorrect!