summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2019-06-26 10:50:25 -0400
committer AJR <ajrhacker@users.noreply.github.com>2019-06-26 10:50:25 -0400
commit7bcd38c2c04cad87c54cb7bff61c14378be4df0c (patch)
tree59a7a89f5ef03afcb31845613253cf2dbf96596b
parentaa2ba3cb2ad19c22b4094443eb1eea94f8602300 (diff)
hpc3: Add callback bindings for EDLC (nw)
-rw-r--r--src/mame/drivers/indy_indigo2.cpp18
-rw-r--r--src/mame/machine/hpc3.cpp43
-rw-r--r--src/mame/machine/hpc3.h24
-rw-r--r--src/mame/machine/ioc2.cpp9
-rw-r--r--src/mame/machine/ioc2.h1
5 files changed, 95 insertions, 0 deletions
diff --git a/src/mame/drivers/indy_indigo2.cpp b/src/mame/drivers/indy_indigo2.cpp
index 85abfd849c4..39d29da1058 100644
--- a/src/mame/drivers/indy_indigo2.cpp
+++ b/src/mame/drivers/indy_indigo2.cpp
@@ -59,6 +59,7 @@
#include "cpu/mips/r4000.h"
#include "machine/ds1386.h"
+#include "machine/edlc.h"
#include "machine/eepromser.h"
#include "machine/hpc3.h"
#include "machine/ioc2.h"
@@ -83,6 +84,7 @@ public:
, m_mainram(*this, "mainram")
, m_mem_ctrl(*this, "memctrl")
, m_scsi_ctrl(*this, "scsibus:0:wd33c93")
+ , m_edlc(*this, "edlc")
, m_eeprom(*this, "eeprom")
, m_hal2(*this, "hal2")
, m_hpc3(*this, "hpc3")
@@ -129,6 +131,7 @@ protected:
required_shared_ptr<uint64_t> m_mainram;
required_device<sgi_mc_device> m_mem_ctrl;
required_device<wd33c93b_device> m_scsi_ctrl;
+ required_device<seeq8003_device> m_edlc;
required_device<eeprom_serial_93cxx_device> m_eeprom;
required_device<hal2_device> m_hal2;
required_device<hpc3_device> m_hpc3;
@@ -335,6 +338,14 @@ void ip24_state::ip24_base(machine_config &config)
m_hpc3->set_addrmap(hpc3_device::AS_PIO0, &ip24_state::pio0_map);
m_hpc3->set_addrmap(hpc3_device::AS_PIO1, &ip24_state::pio1_map);
m_hpc3->set_addrmap(hpc3_device::AS_PIO2, &ip24_state::pio2_map);
+ //m_hpc3->enet_rd_cb().set(m_edlc, FUNC(seeq8003_device::read));
+ //m_hpc3->enet_wr_cb().set(m_edlc, FUNC(seeq8003_device::write));
+ m_hpc3->enet_rxrd_cb().set(m_edlc, FUNC(seeq8003_device::fifo_r));
+ m_hpc3->enet_txwr_cb().set(m_edlc, FUNC(seeq8003_device::fifo_w));
+ m_hpc3->enet_d8_rd_cb().set(m_edlc, FUNC(seeq8003_device::rxeof_r));
+ m_hpc3->enet_d8_wr_cb().set(m_edlc, FUNC(seeq8003_device::txeof_w));
+ //m_hpc3->enet_reset_cb().set(m_edlc, FUNC(seeq8003_device::reset_w));
+ m_hpc3->enet_intr_out_cb().set(m_ioc2, FUNC(ioc2_device::enet_int_w));
m_hpc3->hd_rd_cb<0>().set(m_scsi_ctrl, FUNC(wd33c93b_device::indir_r));
m_hpc3->hd_wr_cb<0>().set(m_scsi_ctrl, FUNC(wd33c93b_device::indir_w));
m_hpc3->hd_dma_rd_cb<0>().set(m_scsi_ctrl, FUNC(wd33c93b_device::dma_r));
@@ -349,6 +360,13 @@ void ip24_state::ip24_base(machine_config &config)
//m_hpc3->eeprom_pre_cb().set(m_eeprom, FUNC(eeprom_serial_93cxx_device::pre_write));
m_hpc3->dma_complete_int_cb().set(m_ioc2, FUNC(ioc2_device::hpc_dma_done_w));
+ SEEQ8003(config, m_edlc);
+ m_edlc->out_int_cb().set(m_hpc3, FUNC(hpc3_device::enet_intr_in_w));
+ m_edlc->out_rxrdy_cb().set(m_hpc3, FUNC(hpc3_device::enet_rxrdy_w));
+ m_edlc->out_txrdy_cb().set(m_hpc3, FUNC(hpc3_device::enet_txrdy_w));
+ //m_edlc->out_rxdc_cb().set(m_hpc3, FUNC(hpc3_device::enet_rxdc_w));
+ //m_edlc->out_txret_cb().set(m_hpc3, FUNC(hpc3_device::enet_txret_w));
+
SGI_HAL2(config, m_hal2);
EEPROM_93C56_16BIT(config, m_eeprom);
}
diff --git a/src/mame/machine/hpc3.cpp b/src/mame/machine/hpc3.cpp
index dbcfe3d529c..d5f0962848f 100644
--- a/src/mame/machine/hpc3.cpp
+++ b/src/mame/machine/hpc3.cpp
@@ -40,6 +40,15 @@ hpc3_device::hpc3_device(const machine_config &mconfig, const char *tag, device_
{"PIO channel 9", ENDIANNESS_LITTLE, 16, 8, -1}}
, m_gio64_space(*this, finder_base::DUMMY_TAG, -1)
, m_hal2(*this, finder_base::DUMMY_TAG)
+ , m_enet_rd_cb(*this)
+ , m_enet_wr_cb(*this)
+ , m_enet_rxrd_cb(*this)
+ , m_enet_txwr_cb(*this)
+ , m_enet_d8_rd_cb(*this)
+ , m_enet_d8_wr_cb(*this)
+ , m_enet_reset_cb(*this)
+ , m_enet_loopback_cb(*this)
+ , m_enet_intr_out_cb(*this)
, m_hd_rd_cb{{*this}, {*this}}
, m_hd_wr_cb{{*this}, {*this}}
, m_hd_dma_rd_cb{{*this}, {*this}}
@@ -74,6 +83,15 @@ device_memory_interface::space_config_vector hpc3_device::memory_space_config()
void hpc3_device::device_resolve_objects()
{
+ m_enet_rd_cb.resolve();
+ m_enet_wr_cb.resolve_safe();
+ m_enet_rxrd_cb.resolve_safe(0);
+ m_enet_txwr_cb.resolve_safe();
+ m_enet_d8_rd_cb.resolve_safe(0);
+ m_enet_d8_wr_cb.resolve_safe();
+ m_enet_reset_cb.resolve_safe();
+ m_enet_loopback_cb.resolve_safe();
+ m_enet_intr_out_cb.resolve_safe();
for (int index = 0; index < 2; index++)
{
m_hd_rd_cb[index].resolve();
@@ -558,6 +576,31 @@ WRITE32_MEMBER(hpc3_device::hd_enet_w)
}
}
+WRITE_LINE_MEMBER(hpc3_device::enet_txrdy_w)
+{
+ // TODO
+}
+
+WRITE_LINE_MEMBER(hpc3_device::enet_rxrdy_w)
+{
+ // TODO
+}
+
+WRITE_LINE_MEMBER(hpc3_device::enet_rxdc_w)
+{
+ // TODO
+}
+
+WRITE_LINE_MEMBER(hpc3_device::enet_txret_w)
+{
+ // TODO
+}
+
+WRITE_LINE_MEMBER(hpc3_device::enet_intr_in_w)
+{
+ // TODO
+}
+
template<hpc3_device::fifo_type_t Type>
READ32_MEMBER(hpc3_device::fifo_r)
{
diff --git a/src/mame/machine/hpc3.h b/src/mame/machine/hpc3.h
index 7fadd8f631a..b09d32569de 100644
--- a/src/mame/machine/hpc3.h
+++ b/src/mame/machine/hpc3.h
@@ -42,6 +42,15 @@ public:
template <typename T> void set_gio64_space(T &&tag, int spacenum) { m_gio64_space.set_tag(std::forward<T>(tag), spacenum); }
template <typename T> void set_hal2_tag(T &&tag) { m_hal2.set_tag(std::forward<T>(tag)); }
+ auto enet_rd_cb() { return m_enet_rd_cb.bind(); }
+ auto enet_wr_cb() { return m_enet_wr_cb.bind(); }
+ auto enet_rxrd_cb() { return m_enet_rxrd_cb.bind(); }
+ auto enet_txwr_cb() { return m_enet_txwr_cb.bind(); }
+ auto enet_d8_rd_cb() { return m_enet_d8_rd_cb.bind(); }
+ auto enet_d8_wr_cb() { return m_enet_d8_wr_cb.bind(); }
+ auto enet_reset_cb() { return m_enet_reset_cb.bind(); }
+ auto enet_loopback_cb() { return m_enet_loopback_cb.bind(); }
+ auto enet_intr_out_cb() { return m_enet_intr_out_cb.bind(); }
template <int N> auto hd_rd_cb() { return m_hd_rd_cb[N].bind(); }
template <int N> auto hd_wr_cb() { return m_hd_wr_cb[N].bind(); }
template <int N> auto hd_dma_rd_cb() { return m_hd_dma_rd_cb[N].bind(); }
@@ -58,6 +67,12 @@ public:
void map(address_map &map);
+ DECLARE_WRITE_LINE_MEMBER(enet_txrdy_w);
+ DECLARE_WRITE_LINE_MEMBER(enet_rxrdy_w);
+ DECLARE_WRITE_LINE_MEMBER(enet_rxdc_w);
+ DECLARE_WRITE_LINE_MEMBER(enet_txret_w);
+ DECLARE_WRITE_LINE_MEMBER(enet_intr_in_w);
+
DECLARE_WRITE_LINE_MEMBER(scsi0_drq);
DECLARE_WRITE_LINE_MEMBER(scsi1_drq);
@@ -173,6 +188,15 @@ protected:
address_space *m_pio_space[10];
required_device<hal2_device> m_hal2;
+ devcb_read8 m_enet_rd_cb;
+ devcb_write8 m_enet_wr_cb;
+ devcb_read8 m_enet_rxrd_cb;
+ devcb_write8 m_enet_txwr_cb;
+ devcb_read_line m_enet_d8_rd_cb;
+ devcb_write_line m_enet_d8_wr_cb;
+ devcb_write_line m_enet_reset_cb;
+ devcb_write_line m_enet_loopback_cb;
+ devcb_write_line m_enet_intr_out_cb;
devcb_read8 m_hd_rd_cb[2];
devcb_write8 m_hd_wr_cb[2];
devcb_read8 m_hd_dma_rd_cb[2];
diff --git a/src/mame/machine/ioc2.cpp b/src/mame/machine/ioc2.cpp
index 4ed1d0a3d07..dfa6ac0c45a 100644
--- a/src/mame/machine/ioc2.cpp
+++ b/src/mame/machine/ioc2.cpp
@@ -750,3 +750,12 @@ WRITE_LINE_MEMBER(ioc2_device::scsi1_int_w)
else
lower_local_irq(0, ioc2_device::INT3_LOCAL0_SCSI1);
}
+
+WRITE_LINE_MEMBER(ioc2_device::enet_int_w)
+{
+ if (state)
+ raise_local_irq(0, ioc2_device::INT3_LOCAL0_ETHERNET);
+ else
+ lower_local_irq(0, ioc2_device::INT3_LOCAL0_ETHERNET);
+}
+
diff --git a/src/mame/machine/ioc2.h b/src/mame/machine/ioc2.h
index d4b711958f0..808655ae71d 100644
--- a/src/mame/machine/ioc2.h
+++ b/src/mame/machine/ioc2.h
@@ -35,6 +35,7 @@ public:
DECLARE_WRITE_LINE_MEMBER(mc_dma_done_w);
DECLARE_WRITE_LINE_MEMBER(scsi0_int_w);
DECLARE_WRITE_LINE_MEMBER(scsi1_int_w);
+ DECLARE_WRITE_LINE_MEMBER(enet_int_w);
void raise_local_irq(int channel, uint8_t mask);
void lower_local_irq(int channel, uint8_t mask);