diff options
Diffstat (limited to 'src/mame/video/tc0180vcu.h')
-rw-r--r-- | src/mame/video/tc0180vcu.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/mame/video/tc0180vcu.h b/src/mame/video/tc0180vcu.h index 170ded0cbf2..cc65bbbecd1 100644 --- a/src/mame/video/tc0180vcu.h +++ b/src/mame/video/tc0180vcu.h @@ -5,7 +5,12 @@ #pragma once -class tc0180vcu_device : public device_t +#define MCFG_TC0180VCU_INTH_CALLBACK(_write) \ + devcb = &downcast<tc0180vcu_device &>(*device).set_inth_callback(DEVCB_##_write); +#define MCFG_TC0180VCU_INTL_CALLBACK(_write) \ + devcb = &downcast<tc0180vcu_device &>(*device).set_intl_callback(DEVCB_##_write); + +class tc0180vcu_device : public device_t, public device_video_interface { public: tc0180vcu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); @@ -15,6 +20,8 @@ public: void set_bg_colorbase(int color) { m_bg_color_base = color; } void set_fg_colorbase(int color) { m_fg_color_base = color; } void set_tx_colorbase(int color) { m_tx_color_base = color; } + template <class Object> devcb_base &set_inth_callback(Object &&cb) { return m_inth_callback.set_callback(std::forward<Object>(cb)); } + template <class Object> devcb_base &set_intl_callback(Object &&cb) { return m_intl_callback.set_callback(std::forward<Object>(cb)); } DECLARE_READ8_MEMBER( get_fb_page ); DECLARE_WRITE8_MEMBER( set_fb_page ); @@ -29,10 +36,18 @@ public: protected: // device-level overrides + virtual void device_resolve_objects() 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; private: + enum { + TIMER_INTL + }; + + void vblank_callback(screen_device &screen, bool state); + // internal state uint16_t m_ctrl[0x10]; @@ -51,6 +66,10 @@ private: required_device<gfxdecode_device> m_gfxdecode; + devcb_write_line m_inth_callback; + devcb_write_line m_intl_callback; + emu_timer *m_intl_timer; + TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); TILE_GET_INFO_MEMBER(get_tx_tile_info); |