summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/video/cesblit.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/video/cesblit.h')
-rw-r--r--src/devices/video/cesblit.h24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/devices/video/cesblit.h b/src/devices/video/cesblit.h
index d535921ef6b..f22f16df260 100644
--- a/src/devices/video/cesblit.h
+++ b/src/devices/video/cesblit.h
@@ -11,6 +11,21 @@
#pragma once
+/***************************************************************************
+ INTERFACE CONFIGURATION MACROS
+***************************************************************************/
+
+#define MCFG_CESBLIT_ADD(_tag, _screen, _clock) \
+ MCFG_DEVICE_ADD(_tag, CESBLIT, _clock) \
+ MCFG_VIDEO_SET_SCREEN(_screen)
+
+#define MCFG_CESBLIT_MAP MCFG_DEVICE_PROGRAM_MAP
+
+#define MCFG_CESBLIT_COMPUTE_ADDR(_compute_addr) \
+ downcast<cesblit_device &>(*device).set_compute_addr(_compute_addr);
+
+#define MCFG_CESBLIT_IRQ_CB(_devcb) \
+ downcast<cesblit_device &>(*device).set_irq_callback(DEVCB_##_devcb);
/***************************************************************************
TYPE DEFINITIONS
@@ -26,18 +41,11 @@ public:
typedef int (*compute_addr_t) (uint16_t reg_low, uint16_t reg_mid, uint16_t reg_high);
// construction/destruction
- template <typename T>
- cesblit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&screen_tag)
- : cesblit_device(mconfig, tag, owner, clock)
- {
- set_screen(std::forward<T>(screen_tag));
- }
-
cesblit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// configuration
void set_compute_addr(compute_addr_t compute_addr) { m_compute_addr = compute_addr; }
- auto irq_callback() { return m_blit_irq_cb.bind(); }
+ template <class Object> devcb_base &set_irq_callback(Object &&cb) { return m_blit_irq_cb.set_callback(std::forward<Object>(cb)); }
DECLARE_WRITE16_MEMBER(color_w);
DECLARE_WRITE16_MEMBER(addr_hi_w);