summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Ted Green <tedgreen99@protonmail.com>2018-06-29 11:49:27 -0600
committer Ted Green <tedgreen99@protonmail.com>2018-06-29 11:49:27 -0600
commitf16d1298a44e71c18c337fc321faebe4fe691e06 (patch)
tree2ad3fd6cf9797a027657d9f8d424afdd3307d2c8
parenta9f194398af68ab8b5cd15b423c4bf77ae661adb (diff)
midwayic: Remove runtime tag lookups. (nw)
-rw-r--r--src/mame/machine/midwayic.cpp12
-rw-r--r--src/mame/machine/midwayic.h5
2 files changed, 13 insertions, 4 deletions
diff --git a/src/mame/machine/midwayic.cpp b/src/mame/machine/midwayic.cpp
index 74492038885..df86ffc5a3a 100644
--- a/src/mame/machine/midwayic.cpp
+++ b/src/mame/machine/midwayic.cpp
@@ -644,6 +644,10 @@ DEFINE_DEVICE_TYPE(MIDWAY_IOASIC, midway_ioasic_device, "midway_ioasic", "Midway
midway_ioasic_device::midway_ioasic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
midway_serial_pic2_device(mconfig, MIDWAY_IOASIC, tag, owner, clock),
+ m_io_dips(*this, ":DIPS"),
+ m_io_system(*this, ":SYSTEM"),
+ m_io_in1(*this, ":IN1"),
+ m_io_in2(*this, ":IN2"),
m_serial_tx_cb(*this),
m_aux_output_cb(*this),
m_has_dcs(0),
@@ -962,20 +966,20 @@ READ32_MEMBER( midway_ioasic_device::read )
result = 0x2001;
}
else {
- result = machine().root_device().ioport("DIPS")->read();
+ result = m_io_dips->read();
}
break;
case IOASIC_PORT1:
- result = machine().root_device().ioport("SYSTEM")->read();
+ result = m_io_system->read();
break;
case IOASIC_PORT2:
- result = machine().root_device().ioport("IN1")->read();
+ result = m_io_in1->read();
break;
case IOASIC_PORT3:
- result = machine().root_device().ioport("IN2")->read();
+ result = m_io_in2->read();
break;
case IOASIC_UARTIN:
diff --git a/src/mame/machine/midwayic.h b/src/mame/machine/midwayic.h
index 2f468b0e7b6..0b7e3e6e820 100644
--- a/src/mame/machine/midwayic.h
+++ b/src/mame/machine/midwayic.h
@@ -192,6 +192,11 @@ private:
void ioasic_register_state();
void update_ioasic_irq();
+ required_ioport m_io_dips;
+ required_ioport m_io_system;
+ required_ioport m_io_in1;
+ required_ioport m_io_in2;
+
devcb_write8 m_serial_tx_cb;
devcb_write32 m_aux_output_cb;