From 34b111bc2c6fc574ae0756b3a2476316fba3b210 Mon Sep 17 00:00:00 2001 From: Richard Cornwell Date: Wed, 3 Jun 2020 21:46:23 -0400 Subject: [PATCH] SCP: Update SCP to current. --- display/ng.c | 2 +- makefile | 8 ++++++++ sim_console.c | 7 +++++++ sim_console.h | 1 + sim_ether.h | 2 +- sim_tmxr.c | 5 +++-- 6 files changed, 21 insertions(+), 4 deletions(-) diff --git a/display/ng.c b/display/ng.c index 53914d2..c404550 100644 --- a/display/ng.c +++ b/display/ng.c @@ -257,7 +257,7 @@ void delta (uint16 inst) int delta = inst & 01777; if (inst & 01000) - delta |= -1 << 10; + delta |= ~0u << 10; switch (inst & 014000) { case 000000: diff --git a/makefile b/makefile index 8632d65..e05528f 100644 --- a/makefile +++ b/makefile @@ -36,6 +36,10 @@ # simulators without networking support, invoking GNU make with # NONETWORK=1 will do the trick. # +# By default, video support is enabled if the SDL/SDL2 development +# headers and libraries are available. To force a build without video +# support, invoke GNU make with NOVIDEO=1. +# # The default build will build compiler optimized binaries. # If debugging is desired, then GNU make can be invoked with # DEBUG=1 on the command line. @@ -145,6 +149,10 @@ endif ifneq ($(NONETWORK),) NETWORK_USEFUL = endif +# ... or without video support +ifneq ($(NOVIDEO),) + VIDEO_USEFUL = +endif find_exe = $(abspath $(strip $(firstword $(foreach dir,$(strip $(subst :, ,${PATH})),$(wildcard $(dir)/$(1)))))) find_lib = $(abspath $(strip $(firstword $(foreach dir,$(strip ${LIBPATH}),$(wildcard $(dir)/lib$(1).${LIBEXT}))))) find_include = $(abspath $(strip $(firstword $(foreach dir,$(strip ${INCPATH}),$(wildcard $(dir)/$(1).h))))) diff --git a/sim_console.c b/sim_console.c index 284e41c..7d3cb2c 100644 --- a/sim_console.c +++ b/sim_console.c @@ -2007,6 +2007,13 @@ sprintf(cmdbuf, "BUFFERED=%d", bufsize); return tmxr_open_master (&sim_rem_con_tmxr, cmdbuf); /* open master socket */ } +t_bool sim_is_remote_console_master_line (void *lp) +{ +return sim_rem_master_mode && /* master mode */ + (((TMLN *)lp) >= sim_rem_con_tmxr.ldsc) && /* And it is one of the Remote Console Lines */ + (((TMLN *)lp) < sim_rem_con_tmxr.ldsc + sim_rem_con_tmxr.lines); +} + /* Enable or disable Remote Console master mode */ /* In master mode, commands are subsequently processed from the diff --git a/sim_console.h b/sim_console.h index 37a1fe0..ae0ab86 100644 --- a/sim_console.h +++ b/sim_console.h @@ -126,6 +126,7 @@ int32 sim_tt_inpcvt (int32 c, uint32 mode); int32 sim_tt_outcvt (int32 c, uint32 mode); t_stat sim_tt_settabs (UNIT *uptr, int32 val, CONST char *cptr, void *desc); t_stat sim_tt_showtabs (FILE *st, UNIT *uptr, int32 val, CONST void *desc); +t_bool sim_is_remote_console_master_line (void *lp); extern int32 sim_rem_cmd_active_line; /* command in progress on line # */ diff --git a/sim_ether.h b/sim_ether.h index 598f8b8..f3edab8 100644 --- a/sim_ether.h +++ b/sim_ether.h @@ -381,7 +381,7 @@ t_stat ethq_destroy(ETH_QUE* que); /* release FIFO queue */ const char *eth_capabilities(void); t_stat sim_ether_test (DEVICE *dptr); /* unit test routine */ -#if !defined(SIM_TEST_INIT) /* Need stubs for test APIs */ +#if !defined(SIM_TEST_INIT) /* Need stubs for test APIs */ #define SIM_TEST_INIT #define SIM_TEST(xxx) #endif diff --git a/sim_tmxr.c b/sim_tmxr.c index 6f81b78..353bc7b 100644 --- a/sim_tmxr.c +++ b/sim_tmxr.c @@ -2205,11 +2205,12 @@ if ((lp->txbfd && !lp->notelnet) || (TXBUF_AVAIL(lp) > 1)) {/* room for char (+ sim_oline = save_oline; /* resture output socket */ } sim_exp_check (&lp->expect, chr); /* process expect rules as needed */ - if (!sim_is_running) { /* attach message or other non simulation time message? */ + if (!sim_is_running && /* attach message or other non simulation time message? */ + !sim_is_remote_console_master_line (lp)) { 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 */ }