summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author ajrhacker <ajrhacker@users.noreply.github.com>2018-11-25 12:33:49 -0500
committer GitHub <noreply@github.com>2018-11-25 12:33:49 -0500
commit45143caaafa8d40eba79cc2c5b4499ac2939a53d (patch)
tree8685f2b2ecac69af3e8ca9e7d11f10b8d2ecd3a1
parentd675000e4df7d16433ba6b5013659abf0622d8dd (diff)
parent674ef7751a1d87afb8f229e24dcd8c23afd2181a (diff)
Merge pull request #4335 from hp9k/gpib_dma_enable
hp9k_3xx: add DMA enable to control register
-rw-r--r--src/devices/bus/hp_dio/human_interface.cpp18
-rw-r--r--src/devices/bus/hp_dio/human_interface.h4
2 files changed, 19 insertions, 3 deletions
diff --git a/src/devices/bus/hp_dio/human_interface.cpp b/src/devices/bus/hp_dio/human_interface.cpp
index 278dcabcb75..49caff350e9 100644
--- a/src/devices/bus/hp_dio/human_interface.cpp
+++ b/src/devices/bus/hp_dio/human_interface.cpp
@@ -125,12 +125,14 @@ void human_interface_device::device_start()
save_item(NAME(m_hil_read));
save_item(NAME(m_kbd_nmi));
save_item(NAME(m_gpib_irq_line));
+ save_item(NAME(m_gpib_dma_line));
save_item(NAME(m_old_latch_enable));
save_item(NAME(m_hil_data));
save_item(NAME(m_latch_data));
save_item(NAME(m_rtc_data));
save_item(NAME(m_ppoll_mask));
save_item(NAME(m_ppoll_sc));
+ save_item(NAME(m_gpib_dma_enable));
}
void human_interface_device::device_reset()
@@ -164,9 +166,15 @@ WRITE_LINE_MEMBER(human_interface_device::gpib_irq)
update_gpib_irq();
}
+void human_interface_device::update_gpib_dma()
+{
+ dmar0_out(m_gpib_dma_enable && m_gpib_dma_line);
+}
+
WRITE_LINE_MEMBER(human_interface_device::gpib_dreq)
{
- dmar0_out(state);
+ m_gpib_dma_line = state;
+ update_gpib_dma();
}
WRITE8_MEMBER(human_interface_device::ieee488_dio_w)
@@ -194,6 +202,10 @@ WRITE8_MEMBER(human_interface_device::gpib_w)
reset();
break;
+ case 1:
+ m_gpib_dma_enable = data & 0x01;
+ update_gpib_dma();
+ break;
case 3:
m_ppoll_sc = data & PPOLL_IE;
@@ -231,7 +243,7 @@ READ8_MEMBER(human_interface_device::gpib_r)
break;
case 1:
/* Int control */
- data = 0x80 | (m_gpib_irq_line ? 0x40 : 0);
+ data = 0x80 | (m_gpib_irq_line ? 0x40 : 0) | (m_gpib_dma_enable ? 0x01 : 0);
break;
case 2:
/* Address */
@@ -352,7 +364,7 @@ void human_interface_device::dmack_w_in(int channel, uint8_t data)
uint8_t human_interface_device::dmack_r_in(int channel)
{
- if (channel)
+ if (channel || !m_gpib_dma_enable)
return 0xff;
return m_tms9914->reg8_r(machine().dummy_space(), 7);
}
diff --git a/src/devices/bus/hp_dio/human_interface.h b/src/devices/bus/hp_dio/human_interface.h
index 985b47a763e..053fa468208 100644
--- a/src/devices/bus/hp_dio/human_interface.h
+++ b/src/devices/bus/hp_dio/human_interface.h
@@ -59,6 +59,7 @@ private:
void dmack_w_in(int channel, uint8_t data) override;
uint8_t dmack_r_in(int channel) override;
void update_gpib_irq();
+ void update_gpib_dma();
required_device<i8042_device> m_iocpu;
required_device<hp_hil_mlc_device> m_mlc;
@@ -83,7 +84,10 @@ private:
bool m_kbd_nmi;
bool m_gpib_irq_line;
+ bool m_gpib_dma_line;
+
bool m_old_latch_enable;
+ bool m_gpib_dma_enable;
uint8_t m_hil_data;
uint8_t m_latch_data;