diff options
author | AJR <ajrhacker@users.noreply.github.com> | 2017-03-18 23:22:37 -0400 |
---|---|---|
committer | AJR <ajrhacker@users.noreply.github.com> | 2017-03-18 23:24:50 -0400 |
commit | bb2e57ba2cb2a5467e1ec343abff6f6bc12671b9 (patch) | |
tree | d18d03b8c6e2288b582f3219083dac99316673ed /src/mame/drivers/amusco.cpp | |
parent | 53225682672fff0be6753e0113ab433021ecb473 (diff) |
amusco.cpp: Generate blink state in a way more likely to represent hardware; remove kludged-in MC6845 accessor (nw)
Diffstat (limited to 'src/mame/drivers/amusco.cpp')
-rw-r--r-- | src/mame/drivers/amusco.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/mame/drivers/amusco.cpp b/src/mame/drivers/amusco.cpp index 0204669d39e..ac67cb8cb7b 100644 --- a/src/mame/drivers/amusco.cpp +++ b/src/mame/drivers/amusco.cpp @@ -142,6 +142,7 @@ public: required_device<ticket_dispenser_device> m_hopper; uint8_t m_mc6845_address; uint16_t m_video_update_address; + bool m_blink_state; }; @@ -160,8 +161,7 @@ TILE_GET_INFO_MEMBER(amusco_state::get_bg_tile_info) int code = m_videoram[tile_index * 2] | (m_videoram[tile_index * 2 + 1] << 8); int color = (code & 0x7000) >> 12; - // 6845 cursor is only used for its blink state - if (BIT(code, 15) && !m_crtc->cursor_state_r()) + if (BIT(code, 15) && !m_blink_state) code = 0; SET_TILE_INFO_MEMBER( @@ -175,6 +175,7 @@ TILE_GET_INFO_MEMBER(amusco_state::get_bg_tile_info) void amusco_state::video_start() { m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(amusco_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 10, 74, 24); + m_blink_state = false; } void amusco_state::machine_start() @@ -453,8 +454,14 @@ MC6845_ON_UPDATE_ADDR_CHANGED(amusco_state::crtc_addr) MC6845_UPDATE_ROW(amusco_state::update_row) { + // Latch blink state at start of first line, where cursor is always positioned + if (y == 0 && ma == 0 && m_blink_state != (cursor_x == 0)) + { + m_blink_state = (cursor_x == 0); + m_bg_tilemap->mark_all_dirty(); + } + const rectangle rowrect(0, 8 * x_count - 1, y, y); - m_bg_tilemap->mark_all_dirty(); m_bg_tilemap->draw(*m_screen, bitmap, rowrect, 0, 0); } |