leland: fixes (nw)

This commit is contained in:
cracyc 2019-02-10 22:20:21 -06:00
parent d675f94dc1
commit 98c7b6f73b

View File

@ -655,13 +655,17 @@ WRITE16_MEMBER( leland_80186_sound_device::ataxx_dac_control )
switch (offset & 0x1f) switch (offset & 0x1f)
{ {
case 0x00: case 0x00:
dac_w(space, 0x40, data, 0x00ff);
return;
case 0x01: case 0x01:
dac_w(space, 0x63, data, 0x00ff);
return;
case 0x02: case 0x02:
dac_w(space, offset, data, 0x00ff); dac_w(space, 2, data, 0x00ff);
return; return;
case 0x03: case 0x03:
m_dacvol[0]->write((data & 7) << 5); 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); m_dacvol[2]->write(((data >> 6) & 3) << 6);
return; return;
} }
@ -671,7 +675,7 @@ WRITE16_MEMBER( leland_80186_sound_device::ataxx_dac_control )
switch (m_type) switch (m_type)
{ {
case TYPE_WSF: case TYPE_WSF:
switch (offset & 0x3f) switch (offset)
{ {
case 0x04: case 0x04:
m_ext_active = 1; m_ext_active = 1;
@ -767,6 +771,7 @@ READ16_MEMBER( leland_80186_sound_device::peripheral_r )
WRITE16_MEMBER( leland_80186_sound_device::peripheral_w ) WRITE16_MEMBER( leland_80186_sound_device::peripheral_w )
{ {
int select = offset / 0x40; int select = offset / 0x40;
offset &= 0x3f;
switch (select) switch (select)
{ {
@ -787,7 +792,7 @@ WRITE16_MEMBER( leland_80186_sound_device::peripheral_w )
m_pit[1]->write(offset & 3, data); m_pit[1]->write(offset & 3, data);
} }
else if(m_type == TYPE_WSF) else if(m_type == TYPE_WSF)
m_ymsnd->write(offset & 0x3f, data); m_ymsnd->write(offset, data);
break; break;
case 4: case 4:
@ -805,7 +810,7 @@ WRITE16_MEMBER( leland_80186_sound_device::peripheral_w )
case 5: /* Ataxx/WSF/Indy Heat only */ case 5: /* Ataxx/WSF/Indy Heat only */
if (m_type > TYPE_REDLINE) if (m_type > TYPE_REDLINE)
ataxx_dac_control(space, offset & 0x7f, data, mem_mask); ataxx_dac_control(space, offset, data, mem_mask);
break; break;
default: default: