From ecb1e7a2921c1f613a4296b0e07cd83dc1a6e99f Mon Sep 17 00:00:00 2001 From: "Andrei I. Holub" Date: Mon, 25 May 2026 16:49:34 -0400 Subject: [PATCH] sinclair/sprinter.cpp: Fixed vram write mirroring. --- src/mame/sinclair/sprinter.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/mame/sinclair/sprinter.cpp b/src/mame/sinclair/sprinter.cpp index 53db6dcc1..4b2f25eaa 100644 --- a/src/mame/sinclair/sprinter.cpp +++ b/src/mame/sinclair/sprinter.cpp @@ -1241,11 +1241,16 @@ template void sprinter_state::ram_w(offs_t offset, u8 data) if (((~m_acc_ctrl & 1) || (((~m_port_y & 128) && (m_acc_ctrl & 2)) || ((m_port_y & 128) && (~m_acc_ctrl & 2)))) // y-clip && ((~m_acc_ctrl & 4) || (((~offset & 128) && (m_acc_ctrl & 8)) || ((offset & 128) && (~m_acc_ctrl & 8))))) // x-clip { + const bool transparent = BIT(page, 3); + if (transparent && (data == 0xff)) + return; + const u32 vaddr = m_port_y * 1024 + (offset & 0x3ff); - if (BIT(~page, 2)) + const bool vram_only = BIT(page, 2); + if (!vram_only) m_ram->pointer()[(0x50 << 14) + vaddr] = data; - if (BIT(~page, 3) || (data != 0xff)) - vram_w(vaddr, data); + + vram_w(vaddr, data); } } else