diff options
Diffstat (limited to 'src/devices/bus/vip/exp.h')
-rw-r--r-- | src/devices/bus/vip/exp.h | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/src/devices/bus/vip/exp.h b/src/devices/bus/vip/exp.h index dfca23fc038..82e131fbe09 100644 --- a/src/devices/bus/vip/exp.h +++ b/src/devices/bus/vip/exp.h @@ -46,27 +46,6 @@ #define VIP_EXPANSION_SLOT_TAG "exp" - -//************************************************************************** -// INTERFACE CONFIGURATION MACROS -//************************************************************************** - -#define MCFG_VIP_EXPANSION_SLOT_ADD(_tag, _clock, _slot_intf, _def_slot) \ - MCFG_DEVICE_ADD(_tag, VIP_EXPANSION_SLOT, _clock) \ - MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) - - -#define MCFG_VIP_EXPANSION_SLOT_INT_CALLBACK(_write) \ - downcast<vip_expansion_slot_device &>(*device).set_int_wr_callback(DEVCB_##_write); - -#define MCFG_VIP_EXPANSION_SLOT_DMA_OUT_CALLBACK(_write) \ - downcast<vip_expansion_slot_device &>(*device).set_dma_out_wr_callback(DEVCB_##_write); - -#define MCFG_VIP_EXPANSION_SLOT_DMA_IN_CALLBACK(_write) \ - downcast<vip_expansion_slot_device &>(*device).set_dma_in_wr_callback(DEVCB_##_write); - - - //************************************************************************** // TYPE DEFINITIONS //************************************************************************** @@ -80,11 +59,20 @@ class vip_expansion_slot_device : public device_t, { public: // construction/destruction + template <typename T> + vip_expansion_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock, T &&opts, char const *dflt) + : vip_expansion_slot_device(mconfig, tag, owner, clock) + { + option_reset(); + opts(*this); + set_default_option(dflt); + set_fixed(false); + } vip_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - template <class Object> devcb_base &set_int_wr_callback(Object &&cb) { return m_write_int.set_callback(std::forward<Object>(cb)); } - template <class Object> devcb_base &set_dma_out_wr_callback(Object &&cb) { return m_write_dma_out.set_callback(std::forward<Object>(cb)); } - template <class Object> devcb_base &set_dma_in_wr_callback(Object &&cb) { return m_write_dma_in.set_callback(std::forward<Object>(cb)); } + auto int_wr_callback() { return m_write_int.bind(); } + auto dma_out_wr_callback() { return m_write_dma_out.bind(); } + auto dma_in_wr_callback() { return m_write_dma_in.bind(); } // computer interface uint8_t program_r(address_space &space, offs_t offset, int cs, int cdef, int *minh); |