summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2021-10-11 17:21:30 -0400
committer AJR <ajrhacker@users.noreply.github.com>2021-10-11 17:21:30 -0400
commit220432c61b299359108493a29b337c95ce54d694 (patch)
tree7d963fc0506c2e4064f3e41c0b72e687cfae7b94 /src/devices
parentc4e8f00006865da3d6c6863cd559573556573fc3 (diff)
hd6120: Improve sequencing for OPR group 1
Diffstat (limited to 'src/devices')
-rw-r--r--src/devices/cpu/pdp8/hd6120.cpp28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/devices/cpu/pdp8/hd6120.cpp b/src/devices/cpu/pdp8/hd6120.cpp
index 769a41d8b5b..fda3deea264 100644
--- a/src/devices/cpu/pdp8/hd6120.cpp
+++ b/src/devices/cpu/pdp8/hd6120.cpp
@@ -664,27 +664,29 @@ void hd6120_device::execute_run()
case minor_state::OP1_1:
m_pc = m_temp & 07777;
- m_temp = (BIT(m_ir, 7) ? 0 : m_ac) ^ (BIT(m_ir, 5) ? 07777 : 0);
- if (BIT(m_ir, 0))
- {
- ++m_temp;
- if (m_temp >= 010000)
- m_flags ^= 4; // LINK is complemented upon carry out
- }
+ m_temp = (BIT(m_ir, 7) ? 0 : m_ac) ^ (BIT(m_ir, 5) ? 07777 : 0); // CLA and/or CMA
+ if (BIT(m_ir, 6))
+ m_flags &= 3; // CLL
+ if (BIT(m_ir, 4))
+ m_flags ^= 4; // CML
m_state = minor_state::OP1_2;
break;
case minor_state::OP1_2:
- m_ac = m_temp & 07777;
- if (BIT(m_ir, 6))
- m_flags &= 3;
- if (BIT(m_ir, 4))
- m_flags ^= 4;
+ if (BIT(m_ir, 0))
+ {
+ ++m_temp; // IAC
+ if (m_temp == 010000)
+ {
+ m_flags ^= 4; // LINK is complemented upon carry out
+ m_temp = 0;
+ }
+ }
m_state = minor_state::OP1_3;
break;
case minor_state::OP1_3:
- m_temp = rotate_step(m_ac);
+ m_temp = rotate_step(m_temp);
if (BIT(m_ir, 1))
m_state = minor_state::OP1_4;
else