summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/coleco/ctrl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/coleco/ctrl.h')
-rw-r--r--src/devices/bus/coleco/ctrl.h28
1 files changed, 10 insertions, 18 deletions
diff --git a/src/devices/bus/coleco/ctrl.h b/src/devices/bus/coleco/ctrl.h
index b36c256067b..3460dec0b7d 100644
--- a/src/devices/bus/coleco/ctrl.h
+++ b/src/devices/bus/coleco/ctrl.h
@@ -14,23 +14,6 @@
#pragma once
-
-
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_COLECOVISION_CONTROL_PORT_ADD(_tag, _slot_intf, _def_slot) \
- MCFG_DEVICE_ADD(_tag, COLECOVISION_CONTROL_PORT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
-
-
-#define MCFG_COLECOVISION_CONTROL_PORT_IRQ_CALLBACK(_write) \
- downcast<colecovision_control_port_device &>(*device).set_irq_wr_callback(DEVCB_##_write);
-
-
-
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -65,10 +48,19 @@ class colecovision_control_port_device : public device_t,
{
public:
// construction/destruction
+ template <typename T>
+ colecovision_control_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
+ : colecovision_control_port_device(mconfig, tag, owner, (uint32_t)0)
+ {
+ option_reset();
+ opts(*this);
+ set_default_option(dflt);
+ set_fixed(false);
+ }
colecovision_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// static configuration helpers
- 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 read() { uint8_t data = 0xff; if (exists()) data = m_device->joy_r(); return data; }