PDP11, Unibus & Qbus VAX: Properly manage CSR TRDY bit status changes
As reported in #782
This commit is contained in:
parent
e333a691d0
commit
750b8f40cb
1 changed files with 15 additions and 12 deletions
|
@ -520,6 +520,8 @@ switch ((PA >> 1) & 03) { /* case on PA<2:1> */
|
||||||
}
|
}
|
||||||
dz_tcr[dz] = data;
|
dz_tcr[dz] = data;
|
||||||
tmxr_poll_tx (&dz_desc); /* poll output */
|
tmxr_poll_tx (&dz_desc); /* poll output */
|
||||||
|
if (0 == (data & (1 << CSR_GETTL (dz_csr[dz]))))/* Line being disabled */
|
||||||
|
dz_csr[dz] &= ~CSR_TRDY; /* clear TRDY */
|
||||||
dz_update_xmti (); /* update int */
|
dz_update_xmti (); /* update int */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -535,7 +537,7 @@ switch ((PA >> 1) & 03) { /* case on PA<2:1> */
|
||||||
c = sim_tt_outcvt (dz_tdr[dz], TT_GET_MODE (dz_unit[0].flags));
|
c = sim_tt_outcvt (dz_tdr[dz], TT_GET_MODE (dz_unit[0].flags));
|
||||||
if (c >= 0) { /* store char */
|
if (c >= 0) { /* store char */
|
||||||
tmxr_putc_ln (lp, c);
|
tmxr_putc_ln (lp, c);
|
||||||
sim_activate_after_abs (&dz_unit[1], lp->txdeltausecs);
|
sim_activate_abs (&dz_unit[1], 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -661,8 +663,8 @@ void dz_update_xmti (void)
|
||||||
int32 dz, linemask, i, j, line;
|
int32 dz, linemask, i, j, line;
|
||||||
|
|
||||||
for (dz = 0; dz < dz_desc.lines/DZ_LINES; dz++) { /* loop thru muxes */
|
for (dz = 0; dz < dz_desc.lines/DZ_LINES; dz++) { /* loop thru muxes */
|
||||||
|
if (0 == (dz_csr[dz] & CSR_TRDY)) { /* if not ready then check */
|
||||||
linemask = dz_tcr[dz] & DZ_LMASK; /* enabled lines */
|
linemask = dz_tcr[dz] & DZ_LMASK; /* enabled lines */
|
||||||
dz_csr[dz] &= ~CSR_TRDY; /* assume not rdy */
|
|
||||||
j = CSR_GETTL (dz_csr[dz]); /* start at current */
|
j = CSR_GETTL (dz_csr[dz]); /* start at current */
|
||||||
for (i = 0; i < DZ_LINES; i++) { /* loop thru lines */
|
for (i = 0; i < DZ_LINES; i++) { /* loop thru lines */
|
||||||
j = (j + 1) & DZ_LNOMASK; /* next line */
|
j = (j + 1) & DZ_LNOMASK; /* next line */
|
||||||
|
@ -674,6 +676,7 @@ for (dz = 0; dz < dz_desc.lines/DZ_LINES; dz++) { /* loop thru muxes */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if ((dz_csr[dz] & CSR_TIE) && (dz_csr[dz] & CSR_TRDY)) /* ready plus int? */
|
if ((dz_csr[dz] & CSR_TIE) && (dz_csr[dz] & CSR_TRDY)) /* ready plus int? */
|
||||||
dz_set_txint (dz);
|
dz_set_txint (dz);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Reference in a new issue