From 0fe568d90f719595781e236914a57afeb0bf07a3 Mon Sep 17 00:00:00 2001 From: arbee Date: Thu, 26 May 2022 21:28:46 -0400 Subject: t6963c: Fix display when the screen size is not a multiple of the number of columns. [BALATON Zoltan] --- src/devices/video/t6963c.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/devices/video/t6963c.cpp b/src/devices/video/t6963c.cpp index 7c7676b5549..bf0841450c0 100644 --- a/src/devices/video/t6963c.cpp +++ b/src/devices/video/t6963c.cpp @@ -323,14 +323,17 @@ void t6963c_device::set_md(u8 data) uint32_t t6963c_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { + int offs; bitmap.fill(0, cliprect); // Text layer if (BIT(m_display_mode, 3)) + { + offs = m_text_home; for(int y=0; yread_byte(m_text_home + y * m_number_cols + x); + u8 c = m_display_ram->read_byte(offs++); for(int cy=0; cy<8; cy++) { @@ -349,13 +352,15 @@ uint32_t t6963c_device::screen_update(screen_device &screen, bitmap_ind16 &bitma bitmap.pix(y * 8 + cy, x * m_font_size + cx) = BIT(data, m_font_size - 1 - cx); } } - + } // Graphic layer if (BIT(m_display_mode, 2)) + { + offs = m_graphic_home; for(int y=0; yread_byte(m_graphic_home + y * m_number_cols + x); + u8 data = m_display_ram->read_byte(offs++); for(int i=0; i