1
0
mirror of https://github.com/simh/simh.git synced 2026-01-11 23:52:58 +00:00

254 Commits

Author SHA1 Message Date
Mark Pizzolato
4fd9ded9ae CONSOLE: Add better support for SET CONSOLE TELNET=CONNECT
- Some OS support had a bug in the command passed to run telnet in the
  new window.
- Report when there appears to be no telnet client available on the
  local system.
- Add support for Fedora KDE.
2025-12-02 08:14:21 -10:00
Mark Pizzolato
d6a53f1c06 SCP: Cleanup allocated memory assignments for C++ compatibility 2025-10-24 08:19:42 -10:00
Mark Pizzolato
f4dbd05b59 CONSOLE: enable Log, and Debug to use caseindependent STDOUT and STDERR
- Avoid tmios debug output when not on macOS
2025-08-30 19:59:31 -10:00
Mark Pizzolato
df31a5b7f9 CONSOLE: Fix DBGINT support for behaviors with gdb and lldb
Input of the WRU character reliably causes return from the running
simulator.

- DBGINT works with gdb as a debugger with the default being the next
  character after the WRU value.  ^F when WRU is default ^E.
- lldb does not support DBGINT signaling.  Only Control-C causes
  break back to lldb.

Currently, a bug in lldb exists that causes console character input of the
CR character (^M) to actually be received as LF (^J).  A bug report has
been submitted to the llvm project describing the problem.
2025-08-14 08:45:58 -10:00
Mark Pizzolato
912f421144 CONSOLE: Add general support for SET CONSOLE SPEED=nnn
The original SET CONSOLE SPEED=nnn was added to a allow direct wired
terminal connected to a host system serial port to be a simulator's console.
The current change generalizes all console I/O such that speed is a reliable
option for direct console connections as well as serial and telnet connections.

The simple recipe to get well behaved console output speed is:
1) call tmxr_set_console_units() in the reset routine of the console DEVICE.
2) In the code path that engages console output do something similar
    to this as appropriate for the system being simulated:
        void txdb_wr (int32 data)
        {
        tto_unit.buf = data & 0377;
        tto_csr = tto_csr & ~CSR_DONE;
        CLR_INT (TTO);
        sim_activate (&tto_unit, tto_unit.wait);
        }

3) In the output unit's service routine the console output unit's service
    routine do something similar to this as appropriate for the system
    being simulated:
        t_stat tto_svc (UNIT *uptr)
        {
        int32 c;

        c = sim_tt_outcvt (tto_unit.buf, TT_GET_MODE (uptr->flags));
        if (c >= 0) {
            t_stat r;

            if ((r = sim_putchar_s (c)) != SCPE_OK) {           /* output; error? */
                sim_activate (uptr, uptr->wait);                /* retry */
                return ((r == SCPE_STALL)? SCPE_OK: r);         /* !stall? report */
                }
            }
        tto_csr = tto_csr | CSR_DONE;
        if (tto_csr & CSR_IE)
        SET_INT (TTO);
        }
The almost all of the current simh simulators already are implemented
with logic like the above example.  These will work just fine with the
newly regulated console speed.
2025-06-24 09:57:49 -10:00
Mark Pizzolato
fed5342f44 SCP: CONSOLE Cleanup and DBGSIGNAL help
- Add HELP language for SET CONSOLE DBGSIGNAL|NODBGSIGNAL.
- Remove obsolete sim_os_poll_kbd_ready platform specific routines
  which were only used with the never functional asynchronous TMXR
  code which has been otherwise removed everywhere else.
- Cleanup DBGSIGNAL related code comments

-
2025-03-20 17:12:50 -10:00
B. Scott Michel
474f84244d CONSOLE: Separate debug character from signal
Add the "DBGSIGNAL", "DBGSIG" options to enable sending the interrupt to
the user's debugger, which is presumably gdb.  Separates setting the
debugging interrupt character from the action so that it is possible to
turn debugger interrupts on and off:

     set console dbgint=1f dbgsignal
     set console nodbgsignal

Previously, this feature was only available if the compiler did not
define __OPTIMIZE__, which precludes optimized debugging code, i.e.,
compiling with "-O2 -g".
2025-03-20 16:29:35 -10:00
B. Scott Michel
0185df8fee CONSOLE: Remove Win32 console output overhead
Don't repeatedly call GetConsoleMode() on Win32 each time
sim_console_write() is called.

Use an output function pointer to invoke WriteConsoleA (console output)
or WriteFile (output is not a console). The console output destination
doesn't change during the lifetime of the simulator, so avoid
extraneous overhead for each character output (sometimes strings, but
mostly characters.)
2025-03-20 09:25:50 -10:00
Richard Cornwell
9b0d7a77d8 CONSOLE: On Windows fixed writing to Console when stdout is a file 2025-03-20 09:16:59 -10:00
Mark Pizzolato
0a22668b29 SCP: Properly output remote console command results when using Microsoft Telnet
Microsoft Telnet client doesn't properly implement the binary mode telnet
negotiation and therefore always follows input \r characters with \n.
2024-09-02 18:20:35 -10:00
Peter Schorn
c7df248f09 SIMH: Fix spelling errors in comments and strings 2024-07-16 12:04:53 -10:00
Mark Pizzolato
7ca7f0fb3a SCP: Tolerate quoted LOG(, DEBUG, etc.) filenames which can have spaces 2024-05-03 10:19:46 -10:00
Mark Pizzolato
b404ccd050 SCP: Make debug timestamps consistent when in NOCALIBRATE mode 2024-04-04 09:56:18 -10:00
Mark Pizzolato
d8e0e04dc8 CONSOLE: Show keyboard map info for Ascii FS character as ^\ 2023-12-30 13:31:31 -10:00
Mark Pizzolato
65d0ae2a44 SCP: Properly write debug output for commands run at the sim> prompt
- Without regard to whether the circular buffer data is otherwise in
   use while instructions are executing.
- When a circular debug buffer is in use, avoid writing out the contents
  with the periodic open file flushes and only do so on returns to the
  sim> prompt and when debug is closed
2023-11-12 12:49:07 -10:00
Mark Pizzolato
7c0f13cab2 CONSOLE: Add optional destination port SET CONSOLE TELNET=CONNECT{=port}
This allows SCP commands to create a local telnet session window connected
to either the local simulator console or another localhost tcp port.
2023-07-02 12:44:27 -10:00
Mark Pizzolato
287f2928ab SCP: Remove legacy support for OS2 and MetroWerks on Macintosh OS 9 2023-04-05 08:41:33 -10:00
Mark Pizzolato
194b313179 SCP: Fold up include files used by all simulators
- Add common system includes used in may places which are allowed
  and thus added directly in sim_defs.h.
- Separate completely private system data structures and system APIs
  for use only by SCP library routines into sim_scp_private.h.
2023-03-04 17:51:49 -10:00
Mark Pizzolato
ea07a8e260 CONSOLE: Cleanup Remote Console command interactions
- Fix potential buffer overrun while pending remote command actions
- Add debug abort interface to close debug file
- Flush partially read command line on EOF
- Flush partially read command line when WRU HALTs execution and switches
  to multi-command mode.
- Disable any pending repeat when WRU HALTs execution
2023-01-29 15:57:54 -10:00
Mark Pizzolato
a79c583053 TMXR: Remove all SIM_ASYNCH_MUX dependent code
Asynchronous MUX functionality was added long ago and never completely
tested and thus never completed and never actually used.

All of what it was supposed to achieve was independently achieved when
bit rate speed functionality was added.
2023-01-21 09:12:45 -10:00
Mark Pizzolato
a4360bc492 CONSOLE: Fix Remote Console reconfigure logic and properly name all units 2023-01-21 08:05:48 -10:00
Mark Pizzolato
78ebb4fe84 CONSOLE: Add appropriate unit names to remote console units based on roles 2023-01-16 18:11:14 -10:00
Mark Pizzolato
7a4ded8380 FRONTPANEL: Avoid potential deadlock when shutting down a panel application 2023-01-09 15:43:25 -10:00
Mark Pizzolato
135e69c4a1 SCP: Add SET CONSOLE TELNET=CONNECT to open a window running telnet to console 2022-12-30 21:34:07 -10:00
Mark Pizzolato
b0cdb3e831 frontpanel: Fix remote console event queuing when in HALT state
- Update sim_frontpanel API version to 13
- Correct event queuing when halted avoids sim_time running backwards
2022-12-28 10:58:08 -10:00
Mark Pizzolato
7ada0d6edb FIO: Fix relative path name logic for edge cases 2022-07-21 02:48:37 -10:00
Mark Pizzolato
5c301b0a8c SCP: Retain full path for open log files
There are cases where a log might be closed and reopened which might
be problematic if the current working directory had changed.
2022-07-18 04:11:48 -10:00
Mark Pizzolato
5cbf9df0df SCP: Fix memory debug buffer logic to properly flush and subsequently continue
Flushes happen:
1) when exiting sim_instr()
2) prior to explicitly aborting execution
2022-07-17 16:58:58 -10:00
Mark Pizzolato
ad9249d4c1 SCP: Add descriptive messages for SCPE_NOPARAM return cases 2022-05-12 13:13:15 -07:00
Mark Pizzolato
d3f1ee0998 CONSOLE: Set console input WAIT time to reflect console speed 2022-04-05 08:37:03 -07:00
Mark Pizzolato
35503f4765 TMXR: Add Access Control List (ACL) support for incoming network connections 2022-02-04 07:59:08 -08:00
Mark Pizzolato
b0dcd191bb SCP: Add missing console receive debug for telnet connect console 2022-01-15 19:32:55 -08:00
Mark Pizzolato
186fa30f37 SCP: Assure that remote console sessions continue after multiple reboots 2021-01-07 17:11:03 -08:00
Mark Pizzolato
852c0bc1bc SCP: Avoid seeking on attached sequential devices on non seekable files
As reported on #982
2020-12-14 18:48:14 -08:00
Mark Pizzolato
ddcc280a17 CONSOLE: Add binary mode option when opening the LOG file. 2020-11-01 09:47:22 -08:00
Mark Pizzolato
a02b87625c CONSOLE: Add REGister reflecting console character output count 2020-11-01 09:41:40 -08:00
Mark Pizzolato
9c1f4beae3 SCP: Migrate to use SCP internal timer base reference 2020-10-29 13:06:36 -07:00
Mark Pizzolato
31606161ce SCP: Avoid potential compiler warnings
Essentially all are non-functional problems but silencing them is a good idea
2020-10-09 05:09:41 -07:00
Mark Pizzolato
8fbec2d2aa REMOTE_CONSOLE: Properly support HELP
As reported in #931
2020-09-27 10:48:53 -07:00
Mark Pizzolato
0045601823 PDP11, PDP8: Allow console input to configure parity and KSR mode 2020-07-24 19:05:04 -07:00
Mark Pizzolato
d1f41d9c1f CONSOLE: Support auto WRU detection when sim_video is used 2020-06-12 06:25:04 -07:00
Mark Pizzolato
65778c7664 REMOTE_CONSOLE: Make STEP behavior consistent in master mode
As discussed in #866
2020-06-06 08:40:49 -07:00
Mark Pizzolato
e1a6a997eb REMOTE_CONSOLE: Avoid rate limiting output to remote console sessions
As discussed in #865
2020-06-02 12:06:18 -07:00
Mark Pizzolato
03a6d69c8d SCP: Assure that STEP is only allowed in MASTER mode remote console connections
The STEP command was inadvertently allowed to be parsed in non-master
mode connections, but it didn't actually work.  It has now been removed
from the generic remote console command table.

This was illuminated as of the discussion in #854
2020-05-25 09:55:24 -07:00
Mark Pizzolato
50ad9fbb82 SCP: Fix the allowed_remote_cmds to also list STEP before SAMPLEOUT
As discussed in #854
2020-05-22 15:54:38 -07:00
Mark Pizzolato
5ec4b3f2f4 SCP: Fix remote console command table ordering to have STEP near the beginning
This allowed user entered S to match the SAMPLEOUT command instead
of STEP.  That then identified a bug in the intended socket output
processing to attempt to be written to the undefined debug file.

As discussed in #854
2020-05-22 10:12:11 -07:00
Mark Pizzolato
4757632f9e SCP: Enable line wrapping at EOL on Windows console (Peter Schorn)
Simulators running directly in a Windows console session, that don't
have the console traffic redirected to a telnet session via
   SET CONSOLE TELNET=nnn
now behave similarly to the default behavior experienced on
non-windows hosts where the terminal session usually defaults to
wrapping at EOL.  Users who want more specific control of this behavior
can run their console via a telnet session with a terminal emulator that
lets them explicitly set these features in the emulator.

This change reintroduces this behavior which got lost when windows
support for ANSI (VT100) escape sequences were added to the console
sessions.
2020-05-16 03:57:36 -07:00
Mark Pizzolato
df63d4ff9f SCP: Reject undefined device with TESTLIB command
Also remove some otherwise unused variables (assignments but never used).
2020-05-05 12:57:43 -07:00
Mark Pizzolato
0170b7c6ab SCP: Convert more SHOW and debug output to use sim_vm_interval_units 2020-03-08 11:43:30 -07:00
Mark Pizzolato
b18912cda8 SCP: Silence GCC optimizer warnings about unused function results 2019-12-30 15:33:51 -08:00