diff options
author | 2018-12-16 22:23:56 +0100 | |
---|---|---|
committer | 2018-12-16 22:23:56 +0100 | |
commit | b0b843c089d47535e1d16f1d8e5318342d50f9d5 (patch) | |
tree | 919ce491701ce41b6fcb573200142cbc3a617fa0 /src/devices/bus/psx/ctlrport.h | |
parent | f25021c47ffab507b41b7c96960198e9569bae9c (diff) |
-bus/psx/ctlrport, multitap, parallel: Removed MCFG and MACHINE_CONFIG macros. [Ryan Holtz]
-cpu/psx, sound/spu, sound/zsg2, video/psx: Removed MCFG macros. [Ryan Holtz]
-drivers/konamigq, konamigv, ksys573, namcos10, namcos11, namcos12, psx, taitogn,
twinkle, zn: Removed MACHINE_CONFIG macros. [Ryan Holtz]
Diffstat (limited to 'src/devices/bus/psx/ctlrport.h')
-rw-r--r-- | src/devices/bus/psx/ctlrport.h | 17 |
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; |