summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author smf- <smf-@users.noreply.github.com>2016-10-06 09:20:42 +0100
committer smf- <smf-@users.noreply.github.com>2016-10-06 09:20:42 +0100
commitffdb2befff1ac2dd28e3c0820c03e9ea7445682a (patch)
treeed188794e497e64633980d13171554301af983e8
parentf9acb0c97bc0515fa1700bca58f9fcc1501a68cc (diff)
Drop the upper bit of the address when shifting left, as described http://wiki.osdev.org/ISA_DMA#16_bit_issues. This fixes 16 bit audio in sb16 diagnose.exe [smf-]
-rw-r--r--src/devices/machine/cs4031.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/devices/machine/cs4031.cpp b/src/devices/machine/cs4031.cpp
index 4331747e506..f9d9108597a 100644
--- a/src/devices/machine/cs4031.cpp
+++ b/src/devices/machine/cs4031.cpp
@@ -362,7 +362,7 @@ READ8_MEMBER( cs4031_device::dma_read_word )
if (m_dma_channel == -1)
return 0xff;
- UINT16 result = m_space->read_word(page_offset() + (offset << 1));
+ UINT16 result = m_space->read_word(page_offset() + ((offset << 1) & 0xffff));
m_dma_high_byte = result >> 8;
return result;
@@ -373,7 +373,7 @@ WRITE8_MEMBER( cs4031_device::dma_write_word )
if (m_dma_channel == -1)
return;
- m_space->write_word(page_offset() + (offset << 1), (m_dma_high_byte << 8) | data);
+ m_space->write_word(page_offset() + ((offset << 1) & 0xffff), (m_dma_high_byte << 8) | data);
}
WRITE_LINE_MEMBER( cs4031_device::dma2_dack0_w )