summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/unsp/unsp_extended.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/unsp/unsp_extended.cpp')
-rw-r--r--src/devices/cpu/unsp/unsp_extended.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/devices/cpu/unsp/unsp_extended.cpp b/src/devices/cpu/unsp/unsp_extended.cpp
index b1cd206a626..948255ff610 100644
--- a/src/devices/cpu/unsp/unsp_extended.cpp
+++ b/src/devices/cpu/unsp/unsp_extended.cpp
@@ -240,7 +240,7 @@ void unsp_20_device::execute_extended_group(uint16_t op)
if (aluop != 0x0d)
r1 = read16(r2);
m_core->m_r[ry] = (uint16_t)(m_core->m_r[ry] - 1);
- if (m_core->m_r[ry] == 0xffff)
+ if (m_core->m_r[ry] == 0xffff && use_ds)
m_core->m_r[REG_SR] -= 0x0400;
break;
case 0x2: // Rx, [<ds:>Ry++]
@@ -248,7 +248,7 @@ void unsp_20_device::execute_extended_group(uint16_t op)
if (aluop != 0x0d)
r1 = read16(r2);
m_core->m_r[ry] = (uint16_t)(m_core->m_r[ry] + 1);
- if (m_core->m_r[ry] == 0x0000)
+ if (m_core->m_r[ry] == 0x0000 && use_ds)
m_core->m_r[REG_SR] += 0x0400;
break;
case 0x3: // Rx, [<ds:>++Ry]