summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2021-07-25 10:10:31 -0400
committer AJR <ajrhacker@users.noreply.github.com>2021-07-25 10:10:31 -0400
commite2f26e4a7b0b9bb05084a5c97c1a312a58aad460 (patch)
treebfa656cb99864d9c07a91d97bd20bc8513e2e2c7
parent6c00c8f9d90c4fbee21c5423016b11b8f6432cae (diff)
tx0_64kw: Various fixes
- Make IOS actually wait for I/O when used more than once - Remove break statement that disabled half the OPRs - Don't normalize minus zero sums (also applies to tx0_8kw)
-rw-r--r--src/devices/cpu/tx0/tx0.cpp29
1 files changed, 3 insertions, 26 deletions
diff --git a/src/devices/cpu/tx0/tx0.cpp b/src/devices/cpu/tx0/tx0.cpp
index 1ad69693168..34c4956bd2e 100644
--- a/src/devices/cpu/tx0/tx0.cpp
+++ b/src/devices/cpu/tx0/tx0.cpp
@@ -487,10 +487,10 @@ void tx0_64kw_device::execute_instruction_64kw()
/* (0.8) CLR = Clear the right nine digital positions of the AC */
AC &= 0777000;
- if (((MAR & 0030000) >> 12) == 1)
+ if (((MAR & 0030000) >> 12) == 2)
/* (0.8) IOS In-Out Stop = Stop machine so that an In-Out command
(specified by digits 6 7 8 of MAR) may be executed */
- m_ioh = 1;
+ m_ios = 0;
if (((MAR & 0007000) >> 9) != 0)
{
@@ -545,8 +545,6 @@ void tx0_64kw_device::execute_instruction_64kw()
AC = AC + MBR;
AC = (AC + (AC >> 18)) & 0777777; /* propagate carry around */
- if (AC == 0777777) /* check for -0 */
- AC = 0;
break;
case 2: /* TRansfer on Negative */
@@ -579,7 +577,6 @@ void tx0_64kw_device::execute_instruction_64kw()
if ((MAR & 0000003) == 2)
/* (1.3) LMB = Store the contents of the LR in the MBR. */
MBR = LR;
- break;
if (((MAR & 0000600) >> 7) == 1)
/* (1.3) MLR = Store the contents of the MBR (memory buffer
@@ -621,9 +618,6 @@ void tx0_64kw_device::execute_instruction_64kw()
AC = AC + MBR;
AC = (AC + (AC >> 18)) & 0777777; /* propagate carry around */
-
- if (AC == 0777777) /* check for -0 */
- AC = 0;
}
if (((MAR & 0030000) >> 12) == 3)
@@ -639,8 +633,6 @@ void tx0_device::indexed_address_eval()
{
MAR = MAR + XR;
MAR = (MAR + (MAR >> 14)) & 0037777; /* propagate carry around */
- //if (MAR == 0037777) /* check for -0 */
- // MAR = 0;
if (MAR & 0020000) /* fix negative (right???) */
MAR = (MAR + 1) & 0017777;
}
@@ -837,15 +829,7 @@ void tx0_8kw_device::execute_instruction_8kw()
if (m_cycle)
{ /* cycle 1 */
AC = tx0_read(MAR) + 1;
-
- #if 0
- AC = (AC + (AC >> 18)) & 0777777; /* propagate carry around */
- if (AC == 0777777) /* check for -0 (right???) */
- AC = 0;
- #else
- if (AC >= 0777777)
- AC = (AC + 1) & 0777777;
- #endif
+ AC = (AC + (AC >> 18)) & 0777777; /* propagate carry around */
}
else
{ /* cycle 2 */
@@ -873,8 +857,6 @@ void tx0_8kw_device::execute_instruction_8kw()
AC = AC + MBR;
AC = (AC + (AC >> 18)) & 0777777; /* propagate carry around */
- if (AC == 0777777) /* check for -0 */
- AC = 0;
break;
case 10: /* LoaD indeX */
@@ -888,8 +870,6 @@ void tx0_8kw_device::execute_instruction_8kw()
XR = XR + ((MBR & 0017777) | ((MBR >> 4) & 0020000));
XR = (XR + (XR >> 14)) & 0037777; /* propagate carry around */
- //if (XR == 0037777) /* check for -0 */
- // XR = 0;
break;
case 13: /* Load Lr indeXed */
@@ -1027,9 +1007,6 @@ void tx0_8kw_device::execute_instruction_8kw()
AC = AC + MBR;
AC = (AC + (AC >> 18)) & 0777777; /* propagate carry around */
-
- if (AC == 0777777) /* check for -0 */
- AC = 0;
}
if ((! (MAR & 0000004)) && (MAR & 0000001))