summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorGravatarGravatar 68bit <info@68bit.org>2019-08-29 14:28:12 +1000
committerGravatarGravatar 68bit <info@68bit.org>2019-08-29 14:28:12 +1000
commit70f62a1c071f9eba7b8db3b4e674de8b5ef11588 (patch)
tree727abde7bd97e3e626a7ba7540ae83d15bff5e8e
parentcbb3262e2a74ec38cfc9236e78b7d62d954229ec (diff)
mc6845: address cursor display edge case in interlaced mode.
It appears that the cursor is not displayed when the start raster address is equal to the maximum raster address in the 'interlace and video' mode. At least this addresses a claimed regression in the 'apricot' machine. To be explore further on hardware. The maximum raster address was also off by one in these calculations.
-rw-r--r--src/devices/video/mc6845.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/devices/video/mc6845.cpp b/src/devices/video/mc6845.cpp
index fabf80b639e..da971fb14ca 100644
--- a/src/devices/video/mc6845.cpp
+++ b/src/devices/video/mc6845.cpp
@@ -705,7 +705,7 @@ bool mc6845_device::check_cursor_visible(uint16_t ra, uint16_t line_addr)
}
uint16_t cursor_start_ras = m_cursor_start_ras & 0x1f;
- uint16_t max_ras_addr = m_max_ras_addr + (MODE_INTERLACE_AND_VIDEO ? m_interlace_adjust : m_noninterlace_adjust);
+ uint16_t max_ras_addr = m_max_ras_addr + (MODE_INTERLACE_AND_VIDEO ? m_interlace_adjust : m_noninterlace_adjust) - 1;
if (cursor_start_ras > max_ras_addr)
{
@@ -713,6 +713,14 @@ bool mc6845_device::check_cursor_visible(uint16_t ra, uint16_t line_addr)
return false;
}
+ // See the 'apricot' boot screen, it probably expects no cursor.
+ // TODO explore the edge cases in the 'interlace and video' mode.
+ if (MODE_INTERLACE_AND_VIDEO && cursor_start_ras >= max_ras_addr)
+ {
+ // No cursor possible.
+ return false;
+ }
+
if (cursor_start_ras <= m_cursor_end_ras)
{
if (m_cursor_end_ras > max_ras_addr)