diff options
Diffstat (limited to 'src/devices/video/huc6260.h')
-rw-r--r-- | src/devices/video/huc6260.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/devices/video/huc6260.h b/src/devices/video/huc6260.h index 695f60c9a05..8737d0432cf 100644 --- a/src/devices/video/huc6260.h +++ b/src/devices/video/huc6260.h @@ -12,6 +12,19 @@ #pragma once +#define MCFG_HUC6260_NEXT_PIXEL_DATA_CB(_devcb) \ + downcast<huc6260_device &>(*device).set_next_pixel_data_callback(DEVCB_##_devcb); + +#define MCFG_HUC6260_TIME_TIL_NEXT_EVENT_CB(_devcb) \ + downcast<huc6260_device &>(*device).set_time_til_next_event_callback(DEVCB_##_devcb); + +#define MCFG_HUC6260_VSYNC_CHANGED_CB(_devcb) \ + downcast<huc6260_device &>(*device).set_vsync_changed_callback(DEVCB_##_devcb); + +#define MCFG_HUC6260_HSYNC_CHANGED_CB(_devcb) \ + downcast<huc6260_device &>(*device).set_hsync_changed_callback(DEVCB_##_devcb); + + class huc6260_device : public device_t, public device_palette_interface, public device_video_interface @@ -27,6 +40,10 @@ public: // construction/destruction huc6260_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + template <class Object> devcb_base &set_next_pixel_data_callback(Object &&cb) { return m_next_pixel_data_cb.set_callback(std::forward<Object>(cb)); } + template <class Object> devcb_base &set_time_til_next_event_callback(Object &&cb) { return m_time_til_next_event_cb.set_callback(std::forward<Object>(cb)); } + template <class Object> devcb_base &set_vsync_changed_callback(Object &&cb) { return m_vsync_changed_cb.set_callback(std::forward<Object>(cb)); } + template <class Object> devcb_base &set_hsync_changed_callback(Object &&cb) { return m_hsync_changed_cb.set_callback(std::forward<Object>(cb)); } auto next_pixel_data() { return m_next_pixel_data_cb.bind(); } auto time_til_next_event() { return m_time_til_next_event_cb.bind(); } auto vsync_changed() { return m_vsync_changed_cb.bind(); } |