diff options
Diffstat (limited to 'src/devices/machine/ns32202.cpp')
-rw-r--r-- | src/devices/machine/ns32202.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/devices/machine/ns32202.cpp b/src/devices/machine/ns32202.cpp index 669a2e63e7f..1a84ad180e9 100644 --- a/src/devices/machine/ns32202.cpp +++ b/src/devices/machine/ns32202.cpp @@ -177,10 +177,10 @@ template <unsigned ST1> void ns32202_device::map(address_map &map) map(0x19, 0x19).rw(FUNC(ns32202_device::csvh_r<0>), FUNC(ns32202_device::csvh_w<0>)); map(0x1a, 0x1a).rw(FUNC(ns32202_device::csvl_r<1>), FUNC(ns32202_device::csvl_w<1>)); map(0x1b, 0x1b).rw(FUNC(ns32202_device::csvh_r<1>), FUNC(ns32202_device::csvh_w<1>)); - map(0x1c, 0x1c).rw(FUNC(ns32202_device::lccvl_r), FUNC(ns32202_device::lccvl_w)); - map(0x1d, 0x1d).rw(FUNC(ns32202_device::lccvh_r), FUNC(ns32202_device::lccvh_w)); - map(0x1e, 0x1e).rw(FUNC(ns32202_device::hccvl_r), FUNC(ns32202_device::hccvl_w)); - map(0x1f, 0x1f).rw(FUNC(ns32202_device::hccvh_r), FUNC(ns32202_device::hccvh_w)); + map(0x1c, 0x1c).rw(FUNC(ns32202_device::ccvl_r<0>), FUNC(ns32202_device::ccvl_w<0>)); + map(0x1d, 0x1d).rw(FUNC(ns32202_device::ccvh_r<0>), FUNC(ns32202_device::ccvh_w<0>)); + map(0x1e, 0x1e).rw(FUNC(ns32202_device::ccvl_r<1>), FUNC(ns32202_device::ccvl_w<1>)); + map(0x1f, 0x1f).rw(FUNC(ns32202_device::ccvh_r<1>), FUNC(ns32202_device::ccvh_w<1>)); } template void ns32202_device::map<0>(address_map &map); @@ -254,7 +254,7 @@ template void ns32202_device::ir_w<15>(int state); void ns32202_device::interrupt(void *ptr, s32 param) { // check for unmasked pending interrupts - if (!(m_ipnd & m_imsk)) + if (!(m_ipnd & ~m_imsk)) return; if (m_mctl & MCTL_NTAR) @@ -311,7 +311,7 @@ u8 ns32202_device::interrupt_acknowledge(bool side_effects) side_effects &= !machine().side_effects_disabled(); u8 vector = m_hvct | 0x0f; - if ((m_ipnd & m_imsk) && m_fprt) + if ((m_ipnd & ~m_imsk) && m_fprt) { // find highest priority unmasked pending interrupt u16 mask = m_fprt; @@ -685,14 +685,14 @@ void ns32202_device::cctl_w(u8 data) {} // TODO: decrement l-counter } - m_cctl = data & ~(CCTL_CRUNH | CCTL_CRUNL); + m_cctl = data & ~(CCTL_CDCRH | CCTL_CDCRL); } void ns32202_device::cictl_w(u8 data) { u8 const mask = - ((data & CICTL_WENL) ? (CICTL_CERL | CICTL_CIRL | CICTL_CIEL) : 0) | - ((data & CICTL_WENH) ? (CICTL_CERH | CICTL_CIRH | CICTL_CIEH) : 0); + ((data & CICTL_WENL) ? (CICTL_CERL | CICTL_CIRL | CICTL_CIEL | CICTL_WENL) : 0) | + ((data & CICTL_WENH) ? (CICTL_CERH | CICTL_CIRH | CICTL_CIEH | CICTL_WENH) : 0); m_cictl = (m_cictl & ~mask) | (data & mask); } |