diff options
Diffstat (limited to 'src/devices/video/topcat.cpp')
-rw-r--r-- | src/devices/video/topcat.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/devices/video/topcat.cpp b/src/devices/video/topcat.cpp index db162733fcd..2b5b32a6750 100644 --- a/src/devices/video/topcat.cpp +++ b/src/devices/video/topcat.cpp @@ -53,6 +53,8 @@ void topcat_device::device_start() save_item(NAME(m_fb_enable)); save_item(NAME(m_unknown_reg4a)); save_item(NAME(m_unknown_reg4c)); + save_item(NAME(m_cursor_state)); + save_item(NAME(m_changed)); } //------------------------------------------------- @@ -80,19 +82,21 @@ READ16_MEMBER(topcat_device::vram_r) WRITE16_MEMBER(topcat_device::vram_w) { - if (mem_mask & m_plane_mask) { + if (mem_mask & m_plane_mask && (m_fb_write_enable & (m_plane_mask << 8))) { bool src = data & m_plane_mask; bool dst = m_vram[offset * 2 + 1] & m_plane_mask; execute_rule(src, (replacement_rule_t)((m_pixel_replacement_rule >> 8) & 0x0f), dst); modify_vram_offset(offset * 2 + 1, dst); } - if (mem_mask & (m_plane_mask << 8)) { + if (mem_mask & (m_plane_mask << 8) && (m_fb_write_enable & (m_plane_mask << 8))) { bool src = data & (m_plane_mask << 8); bool dst = m_vram[offset * 2] & m_plane_mask; execute_rule(src, (replacement_rule_t)((m_pixel_replacement_rule >> 8) & 0x0f), dst); modify_vram_offset(offset * 2, dst); } + + m_changed = true; } void topcat_device::get_cursor_pos(int &startx, int &starty, int &endx, int &endy) @@ -103,10 +107,10 @@ void topcat_device::get_cursor_pos(int &startx, int &starty, int &endx, int &end endx = m_cursor_x_pos + m_cursor_width; endy = m_cursor_y_pos; } else { - startx = 0; - starty = 0; - endx = 0; - endy = 0; + startx = -1; + starty = -1; + endx = -1; + endy = -1; } } @@ -114,6 +118,7 @@ TIMER_CALLBACK_MEMBER(topcat_device::cursor_callback) { m_cursor_timer->adjust(attotime::from_hz(5)); m_cursor_state ^= true; + m_changed = true; } void topcat_device::update_cursor(int x, int y, uint16_t ctrl, uint8_t width) @@ -347,6 +352,7 @@ WRITE16_MEMBER(topcat_device::ctrl_w) if (!m_write_enable) return; + m_changed = true; switch (offset) { case TOPCAT_REG_VBLANK: m_vblank = data; |