diff options
Diffstat (limited to 'src/devices/bus/odyssey2')
-rw-r--r-- | src/devices/bus/odyssey2/slot.h | 16 | ||||
-rw-r--r-- | src/devices/bus/odyssey2/voice.cpp | 7 |
2 files changed, 15 insertions, 8 deletions
diff --git a/src/devices/bus/odyssey2/slot.h b/src/devices/bus/odyssey2/slot.h index 28192aa3457..bfb10c025bd 100644 --- a/src/devices/bus/odyssey2/slot.h +++ b/src/devices/bus/odyssey2/slot.h @@ -65,7 +65,17 @@ class o2_cart_slot_device : public device_t, { public: // construction/destruction - o2_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + template <typename T> + o2_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) + : o2_cart_slot_device(mconfig, tag, owner, 0) + { + option_reset(); + opts(*this); + set_default_option(dflt); + set_fixed(false); + } + + o2_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); virtual ~o2_cart_slot_device(); // device-level overrides @@ -114,10 +124,6 @@ DECLARE_DEVICE_TYPE(O2_CART_SLOT, o2_cart_slot_device) #define O2SLOT_ROM_REGION_TAG ":cart:rom" -#define MCFG_O2_CARTRIDGE_ADD(_tag,_slot_intf,_def_slot) \ - MCFG_DEVICE_ADD(_tag, O2_CART_SLOT, 0) \ - MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) - void o2_cart(device_slot_interface &device); #endif // MAME_BUS_ODYSSEY2_SLOT_H diff --git a/src/devices/bus/odyssey2/voice.cpp b/src/devices/bus/odyssey2/voice.cpp index 073b4a83173..83c199f7431 100644 --- a/src/devices/bus/odyssey2/voice.cpp +++ b/src/devices/bus/odyssey2/voice.cpp @@ -43,7 +43,8 @@ void o2_voice_device::device_start() // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(o2_voice_device::device_add_mconfig) +void o2_voice_device::device_add_mconfig(machine_config &config) +{ SPEAKER(config, "mono").front_center(); SP0256(config, m_speech, 3120000); @@ -51,8 +52,8 @@ MACHINE_CONFIG_START(o2_voice_device::device_add_mconfig) // The Voice uses a speaker with its own volume control so the relative volumes to use are subjective, these sound good m_speech->add_route(ALL_OUTPUTS, "mono", 1.00); - MCFG_O2_CARTRIDGE_ADD("subslot", o2_cart, nullptr) -MACHINE_CONFIG_END + O2_CART_SLOT(config, m_subslot, o2_cart, nullptr); +} ROM_START( o2voice ) |