summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/getaway.cpp
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2021-01-19 23:55:56 +0100
committer hap <happppp@users.noreply.github.com>2021-01-19 23:55:56 +0100
commit167137fde2ea0e4469744282f93bf81c1856d357 (patch)
treeb6093d4a0b69848a040593345096620b52ad6416 /src/mame/drivers/getaway.cpp
parente128cf1861ba2435ba45de79475896eb857fa107 (diff)
getaway: small fix with dmask
Diffstat (limited to 'src/mame/drivers/getaway.cpp')
-rw-r--r--src/mame/drivers/getaway.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mame/drivers/getaway.cpp b/src/mame/drivers/getaway.cpp
index 8d7c8e3f923..12448908563 100644
--- a/src/mame/drivers/getaway.cpp
+++ b/src/mame/drivers/getaway.cpp
@@ -127,18 +127,20 @@ void getaway_state::io_w(offs_t offset, u8 data)
if (n == 1 && ~m_regs[n] & data & 0x80)
{
// start gfx rom->vram transfer?
- u16 src = (m_regs[6] << 8 | m_regs[5]) & 0x1fff;
- u8 bytes = m_regs[8];
+ u16 src = m_regs[6] << 8 | m_regs[5];
+ //u8 smask = src >> 13;
+ src &= 0x1fff;
u16 dest = m_regs[4] << 8 | m_regs[3];
u8 dmask = dest >> 13;
dest &= 0x1fff;
+ u8 bytes = m_regs[8];
+
for (int count = 0; count < bytes; count++)
{
for (int i = 0; i < 3; i++)
- if (BIT(dmask, i))
- m_vram[i * 0x2000 + dest] = m_gfxrom[src];
+ m_vram[i * 0x2000 + dest] = BIT(dmask, i) ? m_gfxrom[src] : 0;
src = (src + 1) & 0x1fff;
dest = (dest + 1) & 0x1fff;