diff options
Diffstat (limited to 'src/devices/video/topcat.h')
-rw-r--r-- | src/devices/video/topcat.h | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/src/devices/video/topcat.h b/src/devices/video/topcat.h index 6fcbc46b04f..367311cd0a6 100644 --- a/src/devices/video/topcat.h +++ b/src/devices/video/topcat.h @@ -14,9 +14,16 @@ #define MCFG_TOPCAT_PLANEMASK(_mask) \ downcast<topcat_device &>(*device).set_planemask(_mask); +#define MCFG_TOPCAT_INT_CB(_write) \ + downcast<topcat_device &>(*device).set_int_write_cb(DEVCB_##_write); + class topcat_device : public device_t { public: + + template <class Object> devcb_base& set_int_write_cb(Object &&cb) + { return m_int_write_func.set_callback(std::forward<Object>(cb)); } + topcat_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); void set_fb_width(int _pixels) { m_fb_width = _pixels; } @@ -29,8 +36,12 @@ public: DECLARE_READ16_MEMBER(ctrl_r); DECLARE_WRITE16_MEMBER(ctrl_w); + WRITE_LINE_MEMBER(vblank_w); void topcat_mem(address_map &map); + bool plane_enabled(); + + devcb_write_line m_int_write_func; protected: topcat_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); @@ -69,6 +80,8 @@ private: TOPCAT_REG_WRITE_ENABLE_PLANE=0x44, TOPCAT_REG_READ_ENABLE_PLANE=0x46, TOPCAT_REG_FB_WRITE_ENABLE=0x48, + TOPCAT_REG_WMOVE_IE=0x4a, + TOPCAT_REG_VBLANK_IE=0x4c, TOPCAT_REG_START_WMOVE=0x4e, TOPCAT_REG_ENABLE_BLINK_PLANES=0x50, TOPCAT_REG_ENABLE_ALT_FRAME=0x54, @@ -109,13 +122,12 @@ private: return m_vram[y * m_fb_width + x] & m_plane_mask; } - uint8_t m_vblank; + void update_int(); + uint16_t m_vblank; uint8_t m_wmove_active; - uint8_t m_vert_retrace_intrq; - uint8_t m_wmove_intrq; - uint8_t m_display_enable_planes; - bool m_write_enable_plane; - bool m_read_enable_plane; + uint16_t m_vert_retrace_intrq; + uint16_t m_wmove_intrq; + uint16_t m_display_enable_planes; uint16_t m_fb_write_enable; uint16_t m_enable_blink_planes; uint16_t m_enable_alt_frame; @@ -128,7 +140,8 @@ private: uint16_t m_dst_y_pixel; uint16_t m_block_mover_pixel_width; uint16_t m_block_mover_pixel_height; - + uint16_t m_unknown_reg4a; + uint16_t m_unknown_reg4c; emu_timer *m_cursor_timer; bool m_cursor_state; uint16_t m_cursor_x_pos; |