diff options
Diffstat (limited to 'src/devices/bus/tvc/tvc.h')
-rw-r--r-- | src/devices/bus/tvc/tvc.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/devices/bus/tvc/tvc.h b/src/devices/bus/tvc/tvc.h index 09ba7b35ffd..584e121f428 100644 --- a/src/devices/bus/tvc/tvc.h +++ b/src/devices/bus/tvc/tvc.h @@ -91,21 +91,11 @@ class tvcexp_slot_device : public device_t, { public: // construction/destruction - template <typename T> - tvcexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt) - : tvcexp_slot_device(mconfig, tag, owner, 0) - { - option_reset(); - opts(*this); - set_default_option(dflt); - set_fixed(false); - } - - tvcexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + tvcexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual ~tvcexp_slot_device(); - auto out_irq_callback() { return m_out_irq_cb.bind(); } - auto out_nmi_callback() { return m_out_nmi_cb.bind(); } + template <class Object> devcb_base &set_out_irq_callback(Object &&cb) { return m_out_irq_cb.set_callback(std::forward<Object>(cb)); } + template <class Object> devcb_base &set_out_nmi_callback(Object &&cb) { return m_out_nmi_cb.set_callback(std::forward<Object>(cb)); } // reading and writing virtual uint8_t id_r(); @@ -130,4 +120,14 @@ protected: DECLARE_DEVICE_TYPE(TVCEXP_SLOT, tvcexp_slot_device) +/*************************************************************************** + DEVICE CONFIGURATION MACROS +***************************************************************************/ + +#define MCFG_TVCEXP_SLOT_OUT_IRQ_CB(_devcb) \ + downcast<tvcexp_slot_device &>(*device).set_out_irq_callback(DEVCB_##_devcb); + +#define MCFG_TVCEXP_SLOT_OUT_NMI_CB(_devcb) \ + downcast<tvcexp_slot_device &>(*device).set_out_nmi_callback(DEVCB_##_devcb); + #endif // MAME_BUS_TVC_TVC_H |