summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Fabio D'Urso <fabiodurso@hotmail.it>2025-10-27 04:17:01 +0100
committer GitHub <noreply@github.com>2025-10-26 23:17:01 -0400
commitf32d3340dedabcb2743bce26619a88314ce03ab5 (patch)
treea1537d600394637b7fa92b64247a7fa3b1f26d31
parent0554e50400e24b927fb41a9616c752c9c2ffbfbd (diff)
ef9345: Fix insert flag for the ts9347 variant in 80 columns mode (#14422)
-rw-r--r--src/devices/video/ef9345.cpp11
1 files 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