summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Patrick Mackinlay <pmackinlay@hotmail.com>2020-01-23 18:19:00 +0700
committer Patrick Mackinlay <pmackinlay@hotmail.com>2020-01-23 18:19:00 +0700
commita91afa574469215367fe30a5311db6fec464bda9 (patch)
treecd405c3d49606c9bd7ec4dfb9d8b8eaf2ab9d253
parent685907679bebdd415b2623d099b42484ecfc1743 (diff)
i82357: stub extended mode register (nw)
-rw-r--r--src/devices/machine/am9517a.cpp1
-rw-r--r--src/devices/machine/am9517a.h6
-rw-r--r--src/devices/machine/i82357.cpp13
3 files changed, 18 insertions, 2 deletions
diff --git a/src/devices/machine/am9517a.cpp b/src/devices/machine/am9517a.cpp
index f277f9ffed1..5036f8e9dab 100644
--- a/src/devices/machine/am9517a.cpp
+++ b/src/devices/machine/am9517a.cpp
@@ -1319,4 +1319,5 @@ void eisa_dma_device::device_start()
m_address_mask = 0xffffffffU;
save_item(NAME(m_stop));
+ save_item(NAME(m_ext_mode));
}
diff --git a/src/devices/machine/am9517a.h b/src/devices/machine/am9517a.h
index a1e9215d125..224170701ac 100644
--- a/src/devices/machine/am9517a.h
+++ b/src/devices/machine/am9517a.h
@@ -212,6 +212,11 @@ public:
m_channel[Channel].m_count = (m_channel[Channel].m_count & 0x0000ffffU) | (u32(data) << 16);
}
+ void set_ext_mode(u8 data)
+ {
+ m_ext_mode[data & 3] = data;
+ }
+
template <unsigned Channel> u32 get_stop() { return m_stop[Channel]; }
template <unsigned Channel> void set_stop(offs_t offset, u32 data, u32 mem_mask)
{
@@ -224,6 +229,7 @@ protected:
private:
u32 m_stop[4];
+ u8 m_ext_mode[4];
};
// device type definition
diff --git a/src/devices/machine/i82357.cpp b/src/devices/machine/i82357.cpp
index 6c6c75e838d..7fa9a62d556 100644
--- a/src/devices/machine/i82357.cpp
+++ b/src/devices/machine/i82357.cpp
@@ -10,6 +10,9 @@
*
* http://bitsavers.org/components/intel/_dataBooks/1996_Intel_Peripheral_Components.pdf
*
+ * https://web.archive.org/web/20040214013557/http://www.techfest.com/hardware/bus/eisa.htm
+ * https://web.archive.org/web/20040405230259/http://www.mindshare.com/pdf/eisabook.pdf
+ *
* TODO
* - expose everything to an actual EISA bus
* - 32-bit dma functionality
@@ -151,7 +154,7 @@ void i82357_device::map(address_map &map)
map(0x407, 0x407).rw(m_dma[0], FUNC(eisa_dma_device::get_count_high<3>), FUNC(eisa_dma_device::set_count_high<3>));
//map(0x40a, 0x40a); // DMA1 Set Chaining Mode (w)/Interrupt Status (r)
- //map(0x40b, 0x40b); // DMA1 Ext Write Mode (w)
+ map(0x40b, 0x40b).w(m_dma[0], FUNC(eisa_dma_device::set_ext_mode));
//map(0x40c, 0x40c); // Chain Buffer Control
//map(0x40d, 0x40d); // Stepping Level Register (ro)
//map(0x40e, 0x40e); // ISP Test Register
@@ -188,7 +191,7 @@ void i82357_device::map(address_map &map)
NAME([this] (offs_t offset, u8 data) { m_elcr[offset] = data; }));
//map(0x4d4, 0x4d4); // DMA2 Set Chaining Mode
- //map(0x4d6, 0x4d6); // DMA2 Ext Write Mode Register
+ map(0x4d6, 0x4d6).w(m_dma[1], FUNC(eisa_dma_device::set_ext_mode));
map(0x4e0, 0x4e3).rw(m_dma[0], FUNC(eisa_dma_device::get_stop<0>), FUNC(eisa_dma_device::set_stop<0>));
map(0x4e4, 0x4e7).rw(m_dma[0], FUNC(eisa_dma_device::get_stop<1>), FUNC(eisa_dma_device::set_stop<1>));
@@ -219,6 +222,12 @@ void i82357_device::device_reset()
m_nmi_reg = 0;
m_nmi_ext = 0;
+ for (unsigned i = 0; i < 4; i++)
+ m_dma[0]->set_ext_mode(0x00 | i);
+
+ for (unsigned i = 0; i < 4; i++)
+ m_dma[1]->set_ext_mode(0x04 | i);
+
m_nmi_check->adjust(attotime::zero);
}