diff options
Diffstat (limited to 'src/devices/bus/adam/exp.h')
-rw-r--r-- | src/devices/bus/adam/exp.h | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/src/devices/bus/adam/exp.h b/src/devices/bus/adam/exp.h index 7751c0f4c64..063d28b4271 100644 --- a/src/devices/bus/adam/exp.h +++ b/src/devices/bus/adam/exp.h @@ -22,22 +22,6 @@ #define ADAM_CENTER_EXPANSION_SLOT_TAG "slot2" #define ADAM_RIGHT_EXPANSION_SLOT_TAG "slot3" - - -//************************************************************************** -// INTERFACE CONFIGURATION MACROS -//************************************************************************** - -#define MCFG_ADAM_EXPANSION_SLOT_ADD(_tag, _clock, _slot_intf, _def_slot) \ - MCFG_DEVICE_ADD(_tag, ADAM_EXPANSION_SLOT, _clock) \ - MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) - - -#define MCFG_ADAM_EXPANSION_SLOT_IRQ_CALLBACK(_write) \ - downcast<adam_expansion_slot_device &>(*device).set_irq_wr_callback(DEVCB_##_write); - - - //************************************************************************** // TYPE DEFINITIONS //************************************************************************** @@ -52,10 +36,19 @@ class adam_expansion_slot_device : public device_t, { public: // construction/destruction + template <typename T> + adam_expansion_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock, T &&opts, char const *dflt) + : adam_expansion_slot_device(mconfig, tag, owner, clock) + { + option_reset(); + opts(*this); + set_default_option(dflt); + set_fixed(false); + } adam_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual ~adam_expansion_slot_device() { } - template <class Object> devcb_base &set_irq_wr_callback(Object &&cb) { return m_write_irq.set_callback(std::forward<Object>(cb)); } + auto irq() { return m_write_irq.bind(); } // computer interface uint8_t bd_r(address_space &space, offs_t offset, uint8_t data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2); |