summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author R. Belmont <rb6502@users.noreply.github.com>2019-08-31 16:35:51 -0400
committer GitHub <noreply@github.com>2019-08-31 16:35:51 -0400
commitf660f828d14ab9d118d3924d23752f5434f22e14 (patch)
tree8470251a88bad9c6f534ea6e62e78604c7f2486b
parent696379914636f4f98483fc96aa463be8f7a47c1a (diff)
parent70f62a1c071f9eba7b8db3b4e674de8b5ef11588 (diff)
mc6845: address cursor display edge case in interlaced mode. (#5567)
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)