summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/psx/ctlrport.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/psx/ctlrport.h')
-rw-r--r--src/devices/bus/psx/ctlrport.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/devices/bus/psx/ctlrport.h b/src/devices/bus/psx/ctlrport.h
index ba9191b239d..718ac8fb35d 100644
--- a/src/devices/bus/psx/ctlrport.h
+++ b/src/devices/bus/psx/ctlrport.h
@@ -8,10 +8,6 @@
#include "memcard.h"
-#define MCFG_PSX_CTRL_PORT_ADD(_tag, _slot_intf, _def_slot) \
- MCFG_DEVICE_ADD(_tag, PSX_CONTROLLER_PORT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
-
void psx_controllers(device_slot_interface &device);
DECLARE_DEVICE_TYPE(PSXCONTROLLERPORTS, psxcontrollerports_device)
@@ -94,8 +90,8 @@ public:
void ack();
- template <class Object> devcb_base &set_dsr_handler(Object &&cb) { return m_dsr_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_rxd_handler(Object &&cb) { return m_rxd_handler.set_callback(std::forward<Object>(cb)); }
+ auto dsr() { return m_dsr_handler.bind(); }
+ auto rxd() { return m_rxd_handler.bind(); }
DECLARE_WRITE_LINE_MEMBER(write_sck);
DECLARE_WRITE_LINE_MEMBER(write_dtr);
@@ -116,6 +112,15 @@ class psx_controller_port_device : public device_t,
public device_slot_interface
{
public:
+ template <typename T>
+ psx_controller_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
+ : psx_controller_port_device(mconfig, tag, owner, (uint32_t)0)
+ {
+ option_reset();
+ opts(*this);
+ set_default_option(dflt);
+ set_fixed(false);
+ }
psx_controller_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
typedef delegate<void ()> void_cb;