summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices
diff options
context:
space:
mode:
author cracyc <cracyc@users.noreply.github.com>2018-05-20 14:56:47 -0500
committer cracyc <cracyc@users.noreply.github.com>2018-05-20 14:56:47 -0500
commit1092f2009b8b9d9653d0daa678e6ca30ac121f79 (patch)
tree18ca4f00f8a70f24f7b5fd04541516f41b6d4787 /src/devices
parent09ab2226587fd622a5b73be21b88e4cad69adbd7 (diff)
psx/ctlrport: use required_device (nw)
sort_hiscore: make it much faster (nw)
Diffstat (limited to 'src/devices')
-rw-r--r--src/devices/bus/psx/ctlrport.cpp5
-rw-r--r--src/devices/bus/psx/ctlrport.h4
2 files changed, 4 insertions, 5 deletions
diff --git a/src/devices/bus/psx/ctlrport.cpp b/src/devices/bus/psx/ctlrport.cpp
index 2c9dd6ee957..084d5344b64 100644
--- a/src/devices/bus/psx/ctlrport.cpp
+++ b/src/devices/bus/psx/ctlrport.cpp
@@ -39,7 +39,8 @@ void psx_controller_port_device::disable_card(bool state)
psxcontrollerports_device::psxcontrollerports_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, PSXCONTROLLERPORTS, tag, owner, clock),
- m_port0(nullptr), m_port1(nullptr),
+ m_port0(*this, "port0"),
+ m_port1(*this, "port1"),
m_dsr_handler(*this),
m_rxd_handler(*this)
{
@@ -50,8 +51,6 @@ void psxcontrollerports_device::device_start()
m_dsr_handler.resolve_safe();
m_rxd_handler.resolve_safe();
- m_port0 = machine().device<psx_controller_port_device>("port1");
- m_port1 = machine().device<psx_controller_port_device>("port2");
m_port0->setup_ack_cb(psx_controller_port_device::void_cb(&psxcontrollerports_device::ack, this));
m_port1->setup_ack_cb(psx_controller_port_device::void_cb(&psxcontrollerports_device::ack, this));
}
diff --git a/src/devices/bus/psx/ctlrport.h b/src/devices/bus/psx/ctlrport.h
index 3c6a44da0eb..29c8f38b604 100644
--- a/src/devices/bus/psx/ctlrport.h
+++ b/src/devices/bus/psx/ctlrport.h
@@ -105,8 +105,8 @@ protected:
virtual void device_start() override;
private:
- psx_controller_port_device *m_port0;
- psx_controller_port_device *m_port1;
+ required_device<psx_controller_port_device> m_port0;
+ required_device<psx_controller_port_device> m_port1;
devcb_write_line m_dsr_handler;
devcb_write_line m_rxd_handler;