From e0af89a890a5e1706b51200ed077e89b9c248f2f Mon Sep 17 00:00:00 2001 From: Patrick Mackinlay Date: Wed, 31 Oct 2018 19:08:04 +0700 Subject: [PATCH] aic6250: ready for 16 bit dma (nw) --- src/devices/machine/aic6250.cpp | 19 +++++++++++++++++++ src/devices/machine/aic6250.h | 2 ++ 2 files changed, 21 insertions(+) diff --git a/src/devices/machine/aic6250.cpp b/src/devices/machine/aic6250.cpp index 4ae438d1e08..f9ab06d71a5 100644 --- a/src/devices/machine/aic6250.cpp +++ b/src/devices/machine/aic6250.cpp @@ -1011,9 +1011,28 @@ u8 aic6250_device::dma_r() return data; } +u16 aic6250_device::dma16_r() +{ + u16 data = m_fifo.dequeue(); + + data |= u16(m_fifo.dequeue()) << 8; + + LOGMASKED(LOG_DMA, "dma16_r 0x%04x\n", data); + + return data; +} + void aic6250_device::dma_w(u8 data) { LOGMASKED(LOG_DMA, "dma_w 0x%02x\n", data); m_fifo.enqueue(data); } + +void aic6250_device::dma16_w(u16 data) +{ + LOGMASKED(LOG_DMA, "dma16_w 0x%04x\n", data); + + m_fifo.enqueue(data); + m_fifo.enqueue(data >> 8); +} diff --git a/src/devices/machine/aic6250.h b/src/devices/machine/aic6250.h index c7ebbc1370a..029c7f72dca 100644 --- a/src/devices/machine/aic6250.h +++ b/src/devices/machine/aic6250.h @@ -29,7 +29,9 @@ public: DECLARE_WRITE8_MEMBER(write); u8 dma_r(); + u16 dma16_r(); void dma_w(u8 data); + void dma16_w(u16 data); protected: // standard device_interface overrides