summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/abcbus/abcbus.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/abcbus/abcbus.h')
-rw-r--r--src/devices/bus/abcbus/abcbus.h72
1 files changed, 52 insertions, 20 deletions
diff --git a/src/devices/bus/abcbus/abcbus.h b/src/devices/bus/abcbus/abcbus.h
index 2388fbc73cf..5bd338b05d7 100644
--- a/src/devices/bus/abcbus/abcbus.h
+++ b/src/devices/bus/abcbus/abcbus.h
@@ -111,6 +111,47 @@
//**************************************************************************
+// INTERFACE CONFIGURATION MACROS
+//**************************************************************************
+
+#define MCFG_ABCBUS_SLOT_ADD(_tag, _slot_intf, _def_slot) \
+ MCFG_DEVICE_ADD(_tag, ABCBUS_SLOT, 0) \
+ MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
+
+
+#define MCFG_ABCBUS_SLOT_IRQ_CALLBACK(_irq) \
+ downcast<abcbus_slot_device *>(device)->set_irq_callback(DEVCB_##_irq);
+
+#define MCFG_ABCBUS_SLOT_NMI_CALLBACK(_nmi) \
+ downcast<abcbus_slot_device *>(device)->set_nmi_callback(DEVCB_##_nmi);
+
+#define MCFG_ABCBUS_SLOT_RDY_CALLBACK(_rdy) \
+ downcast<abcbus_slot_device *>(device)->set_rdy_callback(DEVCB_##_rdy);
+
+#define MCFG_ABCBUS_SLOT_RESIN_CALLBACK(_resin) \
+ downcast<abcbus_slot_device *>(device)->set_resin_callback(DEVCB_##_resin);
+
+#define MCFG_ABCBUS_SLOT_PREN_CALLBACK(_pren) \
+ downcast<abcbus_slot_device *>(device)->set_pren_callback(DEVCB_##_pren);
+
+#define MCFG_ABCBUS_SLOT_TRRQ_CALLBACK(_trrq) \
+ downcast<abcbus_slot_device *>(device)->set_trrq_callback(DEVCB_##_trrq);
+
+#define MCFG_ABCBUS_SLOT_XINT2_CALLBACK(_xint2) \
+ downcast<abcbus_slot_device *>(device)->set_xint2_callback(DEVCB_##_xint2);
+
+#define MCFG_ABCBUS_SLOT_XINT3_CALLBACK(_xint3) \
+ downcast<abcbus_slot_device *>(device)->set_xint3_callback(DEVCB_##_xint3);
+
+#define MCFG_ABCBUS_SLOT_XINT4_CALLBACK(_xint4) \
+ downcast<abcbus_slot_device *>(device)->set_xint4_callback(DEVCB_##_xint4);
+
+#define MCFG_ABCBUS_SLOT_XINT5_CALLBACK(_xint5) \
+ downcast<abcbus_slot_device *>(device)->set_xint5_callback(DEVCB_##_xint5);
+
+
+
+//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -166,26 +207,17 @@ class abcbus_slot_device : public device_t,
public:
// construction/destruction
abcbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <typename T>
- abcbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&opts, const char *dflt)
- : abcbus_slot_device(mconfig, tag, owner, clock)
- {
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
- }
-
- auto irq_callback() { return m_write_irq.bind(); }
- auto nmi_callback() { return m_write_nmi.bind(); }
- auto rdy_callback() { return m_write_rdy.bind(); }
- auto resin_callback() { return m_write_resin.bind(); }
- auto pren_callback() { return m_write_pren.bind(); }
- auto trrq_callback() { return m_write_trrq.bind(); }
- auto xint2_callback() { return m_write_xint2.bind(); }
- auto xint3_callback() { return m_write_xint3.bind(); }
- auto xint4_callback() { return m_write_xint4.bind(); }
- auto xint5_callback() { return m_write_xint5.bind(); }
+
+ template <class Object> devcb_base &set_irq_callback(Object &&cb) { return m_write_irq.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_nmi_callback(Object &&cb) { return m_write_nmi.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_rdy_callback(Object &&cb) { return m_write_rdy.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_resin_callback(Object &&cb) { return m_write_resin.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_pren_callback(Object &&cb) { return m_write_pren.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_trrq_callback(Object &&cb) { return m_write_trrq.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_xint2_callback(Object &&cb) { return m_write_xint2.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_xint3_callback(Object &&cb) { return m_write_xint3.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_xint4_callback(Object &&cb) { return m_write_xint4.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_xint5_callback(Object &&cb) { return m_write_xint5.set_callback(std::forward<Object>(cb)); }
// computer interface
void write_cs(uint8_t data) { if (m_card) m_card->abcbus_cs(data); }