diff options
author | 2019-03-26 11:13:37 +1100 | |
---|---|---|
committer | 2019-03-26 11:13:37 +1100 | |
commit | 97b67170277437131adf6ed4d60139c172529e4f (patch) | |
tree | 7a5cbf608f191075f1612b1af15832c206a3fe2d /src/devices/bus/kc/kc.h | |
parent | b380514764cf857469bae61c11143a19f79a74c5 (diff) |
(nw) Clean up the mess on master
This effectively reverts b380514764cf857469bae61c11143a19f79a74c5 and
c24473ddff715ecec2e258a6eb38960cf8c8e98e, restoring the state at
598cd5227223c3b04ca31f0dbc1981256d9ea3ff.
Before pushing, please check that what you're about to push is sane.
Check your local commit log and ensure there isn't anything out-of-place
before pushing to mainline. When things like this happen, it wastes
everyone's time. I really don't need this in a week when real work⢠is
busting my balls and I'm behind where I want to be with preparing for
MAME release.
Diffstat (limited to 'src/devices/bus/kc/kc.h')
-rw-r--r-- | src/devices/bus/kc/kc.h | 62 |
1 files changed, 21 insertions, 41 deletions
diff --git a/src/devices/bus/kc/kc.h b/src/devices/bus/kc/kc.h index 0689169c5ee..0c14a8ef5d3 100644 --- a/src/devices/bus/kc/kc.h +++ b/src/devices/bus/kc/kc.h @@ -48,12 +48,21 @@ class kcexp_slot_device : public device_t, { public: // construction/destruction + template <typename T> + kcexp_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) + : kcexp_slot_device(mconfig, tag, owner, (uint32_t)0) + { + option_reset(); + opts(*this); + set_default_option(dflt); + set_fixed(false); + } kcexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual ~kcexp_slot_device(); - 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)); } - template <class Object> devcb_base &set_out_halt_callback(Object &&cb) { return m_out_halt_cb.set_callback(std::forward<Object>(cb)); } + auto irq() { return m_out_irq_cb.bind(); } + auto nmi() { return m_out_nmi_cb.bind(); } + auto halt() { return m_out_halt_cb.bind(); } // inline configuration void set_next_slot(const char *next_module_tag) { m_next_slot_tag = next_module_tag; } @@ -91,6 +100,15 @@ class kccart_slot_device : public kcexp_slot_device, { public: // construction/destruction + template <typename T> + kccart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) + : kccart_slot_device(mconfig, tag, owner, (uint32_t)0) + { + option_reset(); + opts(*this); + set_default_option(dflt); + set_fixed(false); + } kccart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual ~kccart_slot_device(); @@ -115,42 +133,4 @@ public: DECLARE_DEVICE_TYPE(KCEXP_SLOT, kcexp_slot_device) DECLARE_DEVICE_TYPE(KCCART_SLOT, kccart_slot_device) - -/*************************************************************************** - DEVICE CONFIGURATION MACROS -***************************************************************************/ - -#define MCFG_KCEXP_SLOT_OUT_IRQ_CB(_devcb) \ - downcast<kcexp_slot_device &>(*device).set_out_irq_callback(DEVCB_##_devcb); - -#define MCFG_KCEXP_SLOT_OUT_NMI_CB(_devcb) \ - downcast<kcexp_slot_device &>(*device).set_out_nmi_callback(DEVCB_##_devcb); - -#define MCFG_KCEXP_SLOT_OUT_HALT_CB(_devcb) \ - downcast<kcexp_slot_device &>(*device).set_out_halt_callback(DEVCB_##_devcb); - -#define MCFG_KCEXP_SLOT_NEXT_SLOT(_next_slot_tag) \ - downcast<kcexp_slot_device &>(*device).set_next_slot(_next_slot_tag); - - -#define MCFG_KCCART_SLOT_OUT_IRQ_CB(_devcb) \ - downcast<kccart_slot_device &>(*device).set_out_irq_callback(DEVCB_##_devcb); - -#define MCFG_KCCART_SLOT_OUT_NMI_CB(_devcb) \ - downcast<kccart_slot_device &>(*device).set_out_nmi_callback(DEVCB_##_devcb); - -#define MCFG_KCCART_SLOT_OUT_HALT_CB(_devcb) \ - downcast<kccart_slot_device &>(*device).set_out_halt_callback(DEVCB_##_devcb); - -#define MCFG_KCCART_SLOT_NEXT_SLOT(_next_slot_tag) \ - downcast<kccart_slot_device &>(*device).set_next_slot(_next_slot_tag); - -// #define MCFG_KC85_EXPANSION_ADD(_tag,_next_slot_tag,_config,_slot_intf,_def_slot) -// MCFG_DEVICE_ADD(_tag, KCEXP_SLOT, 0) -// MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) - -// #define MCFG_KC85_CARTRIDGE_ADD(_tag,_next_slot_tag,_config,_slot_intf,_def_slot) -// MCFG_DEVICE_ADD(_tag, KCCART_SLOT, 0) -// MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) - #endif // MAME_BUS_KC_KC_H |