summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/video/i8244.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/video/i8244.h')
-rw-r--r--src/devices/video/i8244.h24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/devices/video/i8244.h b/src/devices/video/i8244.h
index 2a46163073b..0bf0174cdba 100644
--- a/src/devices/video/i8244.h
+++ b/src/devices/video/i8244.h
@@ -17,6 +17,25 @@
/***************************************************************************
+ DEVICE CONFIGURATION MACROS
+***************************************************************************/
+
+#define MCFG_I8244_ADD(_tag, _clock, _screen_tag, _irq_cb, _postprocess_cb) \
+ MCFG_DEVICE_ADD(_tag, I8244, _clock) \
+ MCFG_VIDEO_SET_SCREEN(_screen_tag) \
+ MCFG_I8244_IRQ_CB(_irq_cb) \
+ MCFG_I8244_POSTPROCESS_CB(_postprocess_cb)
+#define MCFG_I8244_IRQ_CB(_devcb) \
+ downcast<i8244_device &>(*device).set_irq_cb(DEVCB_##_devcb);
+#define MCFG_I8244_POSTPROCESS_CB(_devcb) \
+ downcast<i8244_device &>(*device).set_postprocess_cb(DEVCB_##_devcb);
+#define MCFG_I8245_ADD(_tag, _clock, _screen_tag, _irq_cb, _postprocess_cb) \
+ MCFG_DEVICE_ADD(_tag, I8245, _clock) \
+ MCFG_VIDEO_SET_SCREEN(_screen_tag) \
+ MCFG_I8244_IRQ_CB(_irq_cb) \
+ MCFG_I8244_POSTPROCESS_CB(_postprocess_cb )
+
+/***************************************************************************
TYPE DEFINITIONS
***************************************************************************/
@@ -32,8 +51,8 @@ public:
i8244_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// configuration helpers
- auto irq_cb() { return m_irq_func.bind(); }
- auto postprocess_cb() { return m_postprocess_func.bind(); }
+ template <class Object> devcb_base &set_irq_cb(Object &&cb) { return m_irq_func.set_callback(std::forward<Object>(cb)); }
+ template <class Object> devcb_base &set_postprocess_cb(Object &&cb) { return m_postprocess_func.set_callback(std::forward<Object>(cb)); }
DECLARE_READ8_MEMBER(read);
DECLARE_WRITE8_MEMBER(write);
@@ -90,7 +109,6 @@ protected:
i8244_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int lines);
// device-level overrides
- virtual void device_config_complete() override;
virtual void device_start() override;
virtual void device_reset() override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;