diff options
author | MooglyGuy <therealmogminer@gmail.com> | 2019-02-16 13:05:22 +0100 |
---|---|---|
committer | MooglyGuy <therealmogminer@gmail.com> | 2019-02-16 13:09:28 +0100 |
commit | 6df1235c3f2a33a7d72aecceb31a582657015f2d (patch) | |
tree | d2189d1fe693998c2845bbd73e100aa3db8bc6a7 | |
parent | bd0d1cf5da94ae5d7d73d2be5fe5162183e79160 (diff) |
-sgi_mc_device: Fixed Graphics-to-Host DMAs to happen a qword at a time, nw
-rw-r--r-- | src/mame/machine/sgi.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/mame/machine/sgi.cpp b/src/mame/machine/sgi.cpp index 9e0db63c884..fd605fb03a5 100644 --- a/src/mame/machine/sgi.cpp +++ b/src/mame/machine/sgi.cpp @@ -223,9 +223,22 @@ void sgi_mc_device::dma_tick() } else { - m_space->write_byte(addr, m_space->read_byte(m_dma_gio64_addr)); - m_dma_mem_addr++; - m_dma_count--; + const uint32_t remaining = m_dma_count & 0x0000ffff; + uint32_t length = 8; + uint64_t shift = 56; + if (remaining < 8) + length = remaining; + + uint64_t data = m_space->read_qword(m_dma_gio64_addr); + for (uint32_t i = 0; i < length; i++) + { + m_space->write_byte(addr, (uint8_t)(data >> shift)); + addr++; + shift -= 8; + } + + m_dma_mem_addr += length; + m_dma_count -= length; } } else |