Using a DMA for IDE need to solve some problems:
1) command data to IDE are only 8 bit and issued in PIO-mode by host.
2) DMA transfers are 16 bit and IDE interface need that /IOR, /IOW/, /CS0 and /CS1 signal will be deasserted (still in high level during DMA)
3) DMA will be handled only with DMAREQ (from IDE) and /DMACK (to IDE) signal. These signals can be connected to one of 4 channels of 8237. When IDE is ready to accept data or to send data assert DMAREQ line and wait for assertion of /DMACK line from host. DMA will stop transfer when IDE deassert DMAREQ line (this can happen in middle of transer too).
Using IDE in PIO-mode only is easy (see for example my implementation
http://65xx.unet.bz/images/mb01/mb/p06ata0.pdf), even if ofcourse this need of 2 read/write cycle by CPU for handle 16 bit transfer. In addition, basis of my test, is better to use interrupt line of IDE interface for safety handle: when IDE is ready for a block transfer (512 bytes), assert interrupt line. Also, for issuing command is better to use interrupt line that signal IDE accepted command.
_________________
http://65xx.unet.bz/ - Hardware & Software 65XX family