mirror of
https://github.com/simh/simh.git
synced 2026-05-02 22:22:48 +00:00
PDP11: Properly set DC, DL and DLCJ unit relationships to TMXR structures
Fix problem reported on DC device by Alan Kirby
This commit is contained in:
@@ -45,7 +45,6 @@
|
|||||||
#else /* PDP-11 version */
|
#else /* PDP-11 version */
|
||||||
#include "pdp11_defs.h"
|
#include "pdp11_defs.h"
|
||||||
#endif
|
#endif
|
||||||
#include "sim_sock.h"
|
|
||||||
#include "sim_tmxr.h"
|
#include "sim_tmxr.h"
|
||||||
|
|
||||||
#define DCX_MAXMUX (dcx_desc.lines - 1)
|
#define DCX_MAXMUX (dcx_desc.lines - 1)
|
||||||
@@ -528,6 +527,10 @@ t_stat dcx_reset (DEVICE *dptr)
|
|||||||
{
|
{
|
||||||
int32 ln;
|
int32 ln;
|
||||||
|
|
||||||
|
for (ln = 0; ln < dcx_desc.lines; ln++) {
|
||||||
|
tmxr_set_line_output_unit (&dcx_desc, ln, &dco_unit[ln]);
|
||||||
|
tmxr_set_line_speed (&dcx_desc.ldsc[ln], "9600");
|
||||||
|
}
|
||||||
dcx_enbdis (dptr->flags & DEV_DIS); /* sync enables */
|
dcx_enbdis (dptr->flags & DEV_DIS); /* sync enables */
|
||||||
sim_cancel (&dci_unit); /* assume stop */
|
sim_cancel (&dci_unit); /* assume stop */
|
||||||
if (dci_unit.flags & UNIT_ATT) /* if attached, */
|
if (dci_unit.flags & UNIT_ATT) /* if attached, */
|
||||||
@@ -556,7 +559,6 @@ return;
|
|||||||
t_stat dcx_attach (UNIT *uptr, CONST char *cptr)
|
t_stat dcx_attach (UNIT *uptr, CONST char *cptr)
|
||||||
{
|
{
|
||||||
t_stat r;
|
t_stat r;
|
||||||
|
|
||||||
r = tmxr_attach (&dcx_desc, uptr, cptr); /* attach */
|
r = tmxr_attach (&dcx_desc, uptr, cptr); /* attach */
|
||||||
if (r != SCPE_OK) /* error? */
|
if (r != SCPE_OK) /* error? */
|
||||||
return r;
|
return r;
|
||||||
|
|||||||
@@ -728,6 +728,8 @@ if (sim_switches & SWMASK ('P')) {
|
|||||||
dl[ln].lp = &tmxr->ldsc[ln];
|
dl[ln].lp = &tmxr->ldsc[ln];
|
||||||
dl[ln].pi_ireq = (idptr == &dli_dev) ? dli_ireq : dlcji_ireq;
|
dl[ln].pi_ireq = (idptr == &dli_dev) ? dli_ireq : dlcji_ireq;
|
||||||
dl[ln].po_ireq = (idptr == &dli_dev) ? &dlo_ireq : &dlcjo_ireq;
|
dl[ln].po_ireq = (idptr == &dli_dev) ? &dlo_ireq : &dlcjo_ireq;
|
||||||
|
tmxr_set_line_output_unit (tmxr, ln, &odptr->units[ln]);
|
||||||
|
tmxr_set_line_speed (&tmxr->ldsc[ln], "9600");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dlx_enbdis (dptr); /* sync enables */
|
dlx_enbdis (dptr); /* sync enables */
|
||||||
|
|||||||
@@ -4532,6 +4532,8 @@ for (j = 1; j < mp->lines; j++)
|
|||||||
break;
|
break;
|
||||||
if (j == mp->lines)
|
if (j == mp->lines)
|
||||||
fprintf(st, ", Output Unit: %s", sim_uname (o_uptr));
|
fprintf(st, ", Output Unit: %s", sim_uname (o_uptr));
|
||||||
|
else
|
||||||
|
o_uptr = NULL;
|
||||||
for (j = 1; j < mp->lines; j++)
|
for (j = 1; j < mp->lines; j++)
|
||||||
if (uptr != mp->ldsc[j].uptr)
|
if (uptr != mp->ldsc[j].uptr)
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user