From f32d3340dedabcb2743bce26619a88314ce03ab5 Mon Sep 17 00:00:00 2001 From: Fabio D'Urso Date: Mon, 27 Oct 2025 04:17:01 +0100 Subject: ef9345: Fix insert flag for the ts9347 variant in 80 columns mode (#14422) --- src/devices/video/ef9345.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/devices/video/ef9345.cpp b/src/devices/video/ef9345.cpp index 8dff1a41cc0..af1603455b1 100644 --- a/src/devices/video/ef9345.cpp +++ b/src/devices/video/ef9345.cpp @@ -584,8 +584,15 @@ void ef9345_device::bichrome80(uint8_t c, uint8_t a, uint16_t x, uint16_t y, boo { uint8_t c0, c1, pix[60]; - const bool insert = BIT(m_dor, (a & 1) ? 7 : 3); //insert = DOR7/DOR3 - c1 = (m_dor >> ((a & 1) ? 4 : 0)) & 7; //foreground color = DOR + // Undocumented difference from the EF9345: on the TS9347 the insert bit + // is taken directly from A0. + bool insert; + if (m_variant == EF9345_MODE::TYPE_EF9345) + insert = BIT(m_dor, BIT(a, 0) ? 7 : 3); //insert = DOR7/DOR3 + else + insert = BIT(a, 0); //insert = A0 + + c1 = (m_dor >> (BIT(a, 0) ? 4 : 0)) & 7; //foreground color = DOR c0 = m_mat & 7; //background color = MAT if (m_variant == EF9345_MODE::TYPE_TS9347 || !BIT(c, 7)) //alphanumeric G0 set -- cgit v1.2.3