Commit graph

229 commits

Author SHA1 Message Date
Mark Pizzolato
a9e17075ce TMXR: Reworked output to physical serial ports to avoid host OS buffering 2016-07-15 03:55:21 -07:00
Mark Pizzolato
a24aba69ae VIDEO: Added priority boost to thread performing SDL processing and updates
Reworked all priority adjustment code to leverage a new
sim_os_set_thread_priority API which is coded to use pthreads or OS
priority adjustment APIs as necessary.
2016-06-11 09:52:33 -07:00
Mark Pizzolato
5531ccb175 ALL: Massive 'const' cleanup
These changes facilitate more robust parameter type checking and helps
to identify unexpected coding errors.

Most simulators can now also be compiled with a C++ compiler without
warnings.

Additionally, these changes have also been configured to facilitate easier
backporting of simulator and device simulation modules to run under the
simh v3.9+ SCP framework.
2016-05-15 15:25:33 -07:00
Mark Pizzolato
6582aeead2 SCP. PDP11: Add ESC and ENQ to the default set of console output characters in 7P mode.
Revert change to add ESC and ENQ to printable characters for all simulators
and make that change only for the PDP11.
2016-01-02 05:07:18 -08:00
Mark Pizzolato
9c977e9392 SCP: Add ESC and ENQ to the default set of console output characters in 7B mode.
Also added mnemonic character names to the output produced when
displaying the printable character mask with SHOW CONSOLE PCHAR.
2015-12-31 16:12:14 -08:00
Mark Pizzolato
bbd5f9bf95 SCP: Add internal device debug state to output of SHOW DEBUG command 2015-12-19 11:26:27 -08:00
Mark Pizzolato
0938d31e59 PDP11, VAX: MUX input rate limiting works correctly with input arriving on multiple lines concurrently. 2015-11-28 12:49:54 -08:00
Mark Pizzolato
f322f4b044 TMXR: Support input speed limits with a multiplier factor
Many simulators run instructions one or more orders of magnitude faster
than the original systems did.  Limiting simulated serial port input speeds
to legacy bits per second values presents the arriving data much slower
than the original systems ever saw it.  Given the processing capacity of the
simulated systems and the fact that the software and device interfaces
only know how to deal with the legacy speed values there is a need to
provide a way to allow input to arrive faster.  This problem is solved by
providing a speed factor as a part of a speed specification.  For example
a speed can be specified as "speed*factor" or "9600*10".
2015-11-27 13:47:53 -08:00
Mark Pizzolato
62e36241a4 PDP11, VAX: Support multiplexer input speeds greater than 9600bps for console, DZ, VH, DL and DC devices
Each of the speeds greater than 9600bps deliver a character in less than
1ms.  Computing inter-character delays in microseconds therefore can't
be precise enough to be well behaved.  Measuring the inter-character
delays in instructions (scalled by the calibrated clock) gets us the needed
precision.
2015-11-25 04:25:21 -08:00
Mark Pizzolato
53796ba961 TMXR, CONSOLE: Add optional ability to rate limit input data to approximate bps values
A SET CONSOLE SPEED=nnn, where legal values for nnn are common serial
port rates.  The speed value will attempt to limit the input data rates to a
simulator to approximately the specified bits per second.
2015-11-18 10:44:19 -08:00
Mark Pizzolato
4ddee84faf EXPECT: Fix deprecated SET CONSOLE HALT behavior to reflect Dave's original behavior. 2015-09-20 14:15:42 -07:00
Mark Pizzolato
325e369bfd FRONTPANEL: Added mount and dismount commands for removable media 2015-04-04 16:37:43 -07:00
Mark Pizzolato
9d47891971 FRONTPANEL: Added logic to pass simulator startup messages in panel error text if the connection to the simulator shuts down while it is starting. 2015-04-04 09:18:02 -07:00
Mark Pizzolato
ef6528bf32 SCP: Added automatic saving of console WRU, DEL, BRK and PCHAR console variables and provided a way for a simulator to declare that is doesn't have a console port so automatic WRU detection can be performed. 2015-04-03 16:05:01 -07:00
Mark Pizzolato
f5cd5439f5 FRONTPANEL: Minimuze the latency for register content queries by coalescing all response data into a single response packet. 2015-02-20 16:20:18 -08:00
Mark Pizzolato
8789172e4a Remote Console: Fixed logic to enter Multi-Command mode (i.e. HALT execution) when input data is queued. 2015-02-15 11:54:48 -08:00
Mark Pizzolato
2c2ffe39bf Remote Console: Restructured so that commands are not executed within the sim_instr() routine.
This approach removes the burden from any simulator code to perform instruction execution postlude before calling sim_process_event and prelude activites when sim_process_event returns.

Remote Console commands are now executed from the same simulator context as if entered from the initial sim> prompt.
2015-02-15 11:00:01 -08:00
Mark Pizzolato
9accae5905 BESM6 and VAX: Cleanup for building on VMS 2015-02-12 12:32:39 -08:00
Mark Pizzolato
c869a973d3 Remote Console: Exit simulation when a master mode connection is dropped (equivalent to master power switch). 2015-02-11 11:14:52 -08:00
Mark Pizzolato
c7131700c0 Remote Console: Enhancements
- Accept input comments
 - Allow leading and trailing spaces in remote console input commands
 - Force prompt to be "sim> " or "SIM> " when in a master mode console session. "SIM> " used during single command mode.
 - Enhance performance of single command mode input processing by processing all available input characters before actually flushing output buffers

TMXR API extension to add tmxr_input_pending_ln that reports the existence of additional input data

TMXR also now conforms to revised sim_sock API changes
2015-02-11 09:48:05 -08:00
Mark Pizzolato
94b1da0a53 Remote Console: Add EXAMINE and EVALUATE to the single command mode command set and removed IEXAMINE from all command modes since it doesn't work. 2015-02-06 08:17:09 -08:00
Mark Pizzolato
cadf1da832 SCP: Fix duplicate prompt output before each multiple command mode command set. 2015-02-05 09:43:44 -08:00
Mark Pizzolato
e40d81dbf2 VIDEO: Add proper WRU detection when SIM_VIDEO is used on OS X. 2015-02-05 08:44:16 -08:00
Mark Pizzolato
2f662f2053 SCP: Make sure that WRU is detected by console read processing in the event that it isn't detected by SIGINT 2015-02-05 06:36:13 -08:00
Mark Pizzolato
191566fdd8 NOVA: Add parity generation for input characters on the TTI device
John Kichury revived Startrek II running under DCC Basic which originally ran on  the Digital Computer Controls (DCC) D-116 DG Nova clone

This program (or the Basic interpreter) requires console input with even parity.

SET TTI EVEN

will now enable that.
2015-01-16 12:03:07 -08:00
Mark Pizzolato
e932324098 SCP: Changed sim_poll_kbd() to set the global stop_cpu when the WRU character has been received.
Thus behaving consistently with platforms which learn about the WRU character by the delivery of a SIGINT.
2015-01-01 17:05:41 -08:00
Mark Pizzolato
b7456e988f SCP: Fix log and debug file reference count management. 2014-12-29 03:40:56 -08:00
Mark Pizzolato
f6ba323891 SCP: Fix bug when debug file is opened with -N option. 2014-12-18 10:41:31 -08:00
Mark Pizzolato
95740f1f2d SCP: Add a "-N" (new file) option to the SET LOG and SET DEBUG commands. From Dave Bryan. 2014-12-17 20:07:28 -08:00
Mark Pizzolato
7258490c42 SCP: Fix potential infinite loop when EOF is encountered on stdin for hosts using BSDTTY tty I/O. 2014-12-06 16:14:17 -08:00
Mark Pizzolato
c2603539ff SCP: Fix simh console session output of remote console commands to avoid stairstepping as described in issue #165 2014-12-04 15:49:00 -08:00
Mark Pizzolato
e2c7141675 Remote Console: Fixed "SET REMOTE NOMASTER" command to properly disable Remote Console Master mode and return control to the simulator initiating session. 2014-10-28 08:40:48 -07:00
Mark Pizzolato
c548b34772 Compiler suggested cleanups. 2014-10-27 17:14:28 -07:00
Mark Pizzolato
2e1167d4a0 Compiler suggested cleanups - mostly const fixups 2014-10-26 17:06:24 -07:00
Mark Pizzolato
5c45aec68f SCP: Cleanup minor remote console behaviors (stutter prompt and broken single mode command) 2014-10-26 15:55:36 -07:00
Mark Pizzolato
611a7e94f0 SCP: Added a Remote Console Master Mode.
This capability will allow a GDB RSB stub to be created to support dynamic debugging of code running in a simulator.

This capability will also allow a complete front panel emulation system to operate a simulator.

This capability is engaged in a simulator by:
     sim> set remote telnet=remoteconsoleport#
     sim> set console telnet=consoleport#
     sim> set remote master

Master mode will provide a TCP session which accepts SCP commands that allow full control of the simulator.
2014-10-26 15:15:31 -07:00
Mark Pizzolato
ebf4e0cb64 SCP: Add support for legacy form of console expect and send string commands (from Dave Bryan) 2014-10-23 05:58:43 -07:00
Mark Pizzolato
593a5950d1 SCP: Cleaned up the Remote Console Help output 2014-10-22 13:39:33 -07:00
Mark Pizzolato
bff7521c56 SCP: Migrate more output written to sim_log to use sim_printf. 2014-10-22 13:25:42 -07:00
Mark Pizzolato
ddc29fb2c9 SCP: Added debugging support for EXPECT and SEND activities. Fixed SEND buffer queuing bug. 2014-10-17 11:34:06 -07:00
Mark Pizzolato
02e90de6a4 SCP: Added EXPECT and SEND commands to react to data from and inject data into the simulated console port (and other MUX ports)
Ideas based on Dave Bryan's console halt efforts.

	sim> SEND {<mux>:line} {DELAY=n,}"string"

Where <mux> is the name of the device pointed to by the TMXR structure.  If <mux>:line isn't specified, then the console device is implicitly being referenced.
Delay is optional and once set persists for subsequent SEND operations to the same device.  Delay defaults to 1000.  The DELAY value is a minimum number of instructions which must execute before the next character in the provided string will be injected to the console port.  The DELAY value has effect between the characters delivered as well.  "string" requires quotes and within the quoted string, common C escape character syntax is available (\r\r\t, etc.).

Each device (console, and each line in each mux) has a separate value for DELAY.

An arbitrary number of 'expect' conditions can be defined.  The command syntax is:

              sim> EXPECT {<mux>:line} {[cnt]} "matchstring" {actioncommand {; actioncommand ...}}

Where <mux> is the name of the device pointed to by the TMXR structure.  If <mux>:line isn't specified, then the console device is implicitly being referenced.
"matchstring" requires quotes and within the quoted string, common C escape character syntax is available (\r\r\t, etc.).  The quotes used can be single or double quotes, but the closing quote must match the opening quote.  The match string might be extended to allow the use of perl style regular expressions in the "matchstring" when a -R switch is specified on the command line.

              sim> EXPECT "Enter Color: "  SEND "Red\r"; g

A specific 'expect' condition can be removed with:

              sim> NOEXPECT {<mux>:line} "matchstring"

All 'expect' conditions can be removed with:

              sim> NOEXPECT {<mux>:line}

'expect' conditions can be examined with:

              sim> SHOW EXPECT {<mux>:line}

Expect rules are one-shots (i.e. they disappear once a match has occurred) unless they are explicitly described as persistent with the -P switch.
The -C switch is available when defining expect rules.  The effect of a rule defined with the -C flag is that when an expect match occurs for that rule, ALL rules are cleared for that device (console or <mux>:line).
2014-10-14 10:49:24 -07:00
Mark Pizzolato
ab7befb4da SCP: Fix SET TELNET command to process all arguments on a command line. 2014-10-05 06:50:48 -07:00
François Revol
2b718becd2 Work around missing nice() on Haiku 2014-08-31 22:31:19 +02:00
Mark Pizzolato
746e5ab88c SCP: Fix reporting of console's buffering status. Fix parsing of MUX settings which were simply interpreted by matching a single token. Reported by Mark Bensen. 2014-05-05 05:30:35 -07:00
Mark Pizzolato
9022de500d SCP: Removed the irrelevant sim_deb_PC variable since it duplicates the role sim_PC simulator variable. 2014-03-05 12:53:32 -08:00
Mark Pizzolato
02cb5c2d88 Compiler suggested cleanups.
Mostly silencing noise warnings, but bugs were found in sim_console.c and pdp11_dmc.c
2014-02-14 17:07:45 -08:00
Mark Pizzolato
da134ebb2a SCP: Added detailed help (including switches) for SET DEBUG command and an auto flush of the debug output when instruction execution stops. 2014-02-04 15:45:26 -08:00
Mark Pizzolato
bebb787325 SCP: Fix problem on Windows which inhibited the ability to enter console input (^E) when bells characters were being output too often. Fixes #102 2014-01-23 09:21:07 -08:00
Mark Pizzolato
b61e5ae176 Compiler indicated cleanups 2014-01-08 13:06:42 -08:00
Mark Pizzolato
ae8bcecd29 I1620 : Changes from Bob Supnik re: Bob Armstrong has been running diagnostics and software, and these changes reflect fixes to bugs that were found.
We're not absolutely sure that all of the changes are correct - in particular the treatment of record marks in add/compare - but they do make the diagnostics pass, which they didn't before.

Bob asked for variable tab stops on the typewriter, and those are implemented as well. The routines were general enough that I put the SET/SHOW processors in sim_console.c, so I'm enclosing that and its header file.

Conflicts:
	I1620/i1620_cpu.c
	sim_console.c
	sim_console.h
2014-01-05 14:45:08 -08:00