/*
 * DANG_BEGIN_MODULE
 *
 * Description: DMA chip emulation -- doesn't exist yet
 * 
 * Maintainers: 
 *
 * DANG_END_MODULE
 *
 * $Date: $
 * $Source: $
 * $Revision: $
 * $State: $
 *
 * $Log: $
 */

#include "dosemu.h"
#include "base/iodev.h"
#include "base/int.h"
#include "base/port.h"

static Bit8u dma_io_read(Bit32u port)
{
  return 0;
}

static void dma_io_write(Bit32u port, Bit8u value)
{
}

void dma_init(void)
{
  emu_iodev_t  io_device;

  /* 8237 DMA controller */
  io_device.read_portb   = dma_io_read;
  io_device.write_portb  = dma_io_write;
  io_device.read_portw   = NULL;
  io_device.write_portw  = NULL;
  io_device.handler_name = "DMA controller";
  io_device.start_addr   = 0x0000;
  io_device.end_addr     = 0x000F;
  io_device.irq          = EMU_NO_IRQ;
  port_register_handler(io_device);

  io_device.start_addr   = 0x0081;
  io_device.end_addr     = 0x008F;
  port_register_handler(io_device);

  io_device.start_addr   = 0x00C0;
  io_device.end_addr     = 0x00DF;
  port_register_handler(io_device);
}

void dma_reset(void)
{
}

