From 5c5e7badcabc01fb4e7700c24531e250dc6befde Mon Sep 17 00:00:00 2001 From: Michael Zapf Date: Thu, 8 Jun 2023 17:42:02 +0200 Subject: ncr5380: Add a function to check for DMA mode. --- src/devices/machine/ncr5380.cpp | 5 +++++ src/devices/machine/ncr5380.h | 1 + 2 files changed, 6 insertions(+) diff --git a/src/devices/machine/ncr5380.cpp b/src/devices/machine/ncr5380.cpp index bed78dd4784..2733c35abe3 100644 --- a/src/devices/machine/ncr5380.cpp +++ b/src/devices/machine/ncr5380.cpp @@ -585,6 +585,11 @@ void ncr5380_device::dma_w(u8 data) } } +bool ncr5380_device::in_dma_mode() +{ + return ((m_mode & MODE_DMA) != 0); +} + u8 ncr5380_device::dma_r() { set_drq(false); diff --git a/src/devices/machine/ncr5380.h b/src/devices/machine/ncr5380.h index e7107ae285e..51fdd74882a 100644 --- a/src/devices/machine/ncr5380.h +++ b/src/devices/machine/ncr5380.h @@ -28,6 +28,7 @@ public: void eop_w(int state); u8 dma_r(); void dma_w(u8 val); + bool in_dma_mode(); protected: ncr5380_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock, bool has_lbs = false); -- cgit v1.2.3