sinclair/sprinter.cpp: Fixed vram write mirroring.

This commit is contained in:
Andrei I. Holub 2026-05-25 16:49:34 -04:00
parent a311a86173
commit ecb1e7a292

View File

@ -1241,11 +1241,16 @@ template <u8 Bank> 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