summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/audio/leland.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/audio/leland.cpp')
-rw-r--r--src/mame/audio/leland.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/mame/audio/leland.cpp b/src/mame/audio/leland.cpp
index 5e941398739..83a0dc0190a 100644
--- a/src/mame/audio/leland.cpp
+++ b/src/mame/audio/leland.cpp
@@ -622,9 +622,9 @@ WRITE16_MEMBER( leland_80186_sound_device::dac_w )
/* handle value changes */
if (ACCESSING_BITS_0_7)
{
- if((offset & 0x60) == 0x40)
+ if ((offset & 0x60) == 0x40)
m_audiocpu->drq0_w(CLEAR_LINE);
- else if((offset & 0x60) == 0x60)
+ else if ((offset & 0x60) == 0x60)
m_audiocpu->drq1_w(CLEAR_LINE);
m_dac[dac]->write(data & 0xff);
@@ -655,13 +655,17 @@ WRITE16_MEMBER( leland_80186_sound_device::ataxx_dac_control )
switch (offset & 0x1f)
{
case 0x00:
+ dac_w(space, 0x40, data, 0x00ff);
+ return;
case 0x01:
+ dac_w(space, 0x63, data, 0x00ff);
+ return;
case 0x02:
- dac_w(space, offset, data, 0x00ff);
+ dac_w(space, 2, data, 0x00ff);
return;
case 0x03:
m_dacvol[0]->write((data & 7) << 5);
- m_dacvol[1]->write(((data >> 3) & 7) << 5);
+ m_dacvol[3]->write(((data >> 3) & 7) << 5);
m_dacvol[2]->write(((data >> 6) & 3) << 6);
return;
}
@@ -671,7 +675,7 @@ WRITE16_MEMBER( leland_80186_sound_device::ataxx_dac_control )
switch (m_type)
{
case TYPE_WSF:
- switch (offset & 0x3f)
+ switch (offset)
{
case 0x04:
m_ext_active = 1;
@@ -767,6 +771,7 @@ READ16_MEMBER( leland_80186_sound_device::peripheral_r )
WRITE16_MEMBER( leland_80186_sound_device::peripheral_w )
{
int select = offset / 0x40;
+ offset &= 0x3f;
switch (select)
{
@@ -787,7 +792,7 @@ WRITE16_MEMBER( leland_80186_sound_device::peripheral_w )
m_pit[1]->write(offset & 3, data);
}
else if(m_type == TYPE_WSF)
- m_ymsnd->write(offset & 0x3f, data);
+ m_ymsnd->write(offset, data);
break;
case 4:
@@ -805,7 +810,7 @@ WRITE16_MEMBER( leland_80186_sound_device::peripheral_w )
case 5: /* Ataxx/WSF/Indy Heat only */
if (m_type > TYPE_REDLINE)
- ataxx_dac_control(space, offset & 0x7f, data, mem_mask);
+ ataxx_dac_control(space, offset, data, mem_mask);
break;
default: