1
0
mirror of https://github.com/simh/simh.git synced 2026-04-29 21:16:46 +00:00

Changed VAX console input polling to only poll for input if the last character received has been processed by the VM

This commit is contained in:
Mark Pizzolato
2013-01-26 10:43:10 -08:00
parent 7a9db0fe64
commit d674bb1f8d
6 changed files with 38 additions and 6 deletions

View File

@@ -97,6 +97,7 @@ extern int32 int_req[IPL_HLVL];
extern int32 hlt_pin;
int32 tti_csr = 0; /* control/status */
uint32 tti_buftime; /* time input character arrived */
int32 tto_csr = 0; /* control/status */
int32 clk_csr = 0; /* control/status */
int32 clk_tps = 100; /* ticks/second */
@@ -331,6 +332,9 @@ int32 c;
sim_clock_coschedule (uptr, KBD_WAIT (uptr->wait, tmr_poll));
/* continue poll */
if ((tti_csr & CSR_DONE) && /* input still pending and < 500ms? */
((sim_os_msec () - tti_buftime) < 500))
return SCPE_OK;
if ((c = sim_poll_kbd ()) < SCPE_KFLAG) /* no char or error? */
return c;
if (c & SCPE_BREAK) { /* break? */
@@ -339,6 +343,7 @@ if (c & SCPE_BREAK) { /* break? */
tti_unit.buf = TTIBUF_ERR | TTIBUF_FRM | TTIBUF_RBR;
}
else tti_unit.buf = sim_tt_inpcvt (c, TT_GET_MODE (uptr->flags));
tti_buftime = sim_os_msec ();
uptr->pos = uptr->pos + 1;
tti_csr = tti_csr | CSR_DONE;
if (tti_csr & CSR_IE)