summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/pet/user.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/pet/user.h')
-rw-r--r--src/devices/bus/pet/user.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/devices/bus/pet/user.h b/src/devices/bus/pet/user.h
index d7753ad23f1..651e121a2fa 100644
--- a/src/devices/bus/pet/user.h
+++ b/src/devices/bus/pet/user.h
@@ -27,11 +27,6 @@
#pragma once
-
-#define MCFG_PET_USER_PORT_ADD(_tag, _slot_intf, _def_slot) \
- MCFG_DEVICE_ADD(_tag, PET_USER_PORT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
-
#define MCFG_PET_USER_PORT_2_HANDLER(_devcb) \
devcb = &downcast<pet_user_port_device &>(*device).set_2_handler(DEVCB_##_devcb);
@@ -100,6 +95,15 @@ class pet_user_port_device : public device_t,
friend class device_pet_user_port_interface;
public:
+ template <typename T>
+ pet_user_port_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt)
+ : pet_user_port_device(mconfig, tag, owner, 0)
+ {
+ option_reset();
+ opts(*this);
+ set_default_option(dflt);
+ set_fixed(false);
+ }
pet_user_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template <class Object> devcb_base &set_2_handler(Object &&cb) { return m_2_handler.set_callback(std::forward<Object>(cb)); }