From 52c1b5416f0f8f95571eddd5b29c1e72cbefbb64 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Tue, 2 Jun 2020 11:42:51 -0700 Subject: [PATCH] TMXR: Change output rate limit to 1 ms when cpu is stopped As reported in #865 When instruction execution is stopped, forced mux output rate limiting can't leverage instruction execution rate to time inter-character delays. A direct sleep is used but that has a minimal granularity measured in milliseconds. The prior default for a non speed controlled line was 10ms sleep between character output. This has been changed to 1ms which is reasonable for most situations. Meanwhile, since the remote console facility uses TMXR, and it has the reasonable ability to generate output when instructions are not being executed, this is better but not perfect. --- sim_tmxr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sim_tmxr.c b/sim_tmxr.c index 6f81b78a..49670e8c 100644 --- a/sim_tmxr.c +++ b/sim_tmxr.c @@ -2209,7 +2209,7 @@ if ((lp->txbfd && !lp->notelnet) || (TXBUF_AVAIL(lp) > 1)) {/* room for char (+ tmxr_send_buffered_data (lp); /* put data on wire */ sim_os_ms_sleep(((lp->txbps) && (lp->txdeltausecs > 1000)) ? /* rate limiting output slower than 1000 cps */ (lp->txdeltausecs - 1000) / 1000 : - 10); /* wait an approximate character delay */ + 1); /* wait an approximate character delay */ } return SCPE_OK; /* char sent */ }