Commit graph

156 commits

Author SHA1 Message Date
Mark Pizzolato
c1e7dfcf06 TMXR: Make sure all types of incoming connections properly support telnet
Per line listeners also need to potentially negotiate Telnet options.  Make sure
that the telnet option bookkeeping info is available.
2016-02-14 08:10:00 -08:00
Mark Pizzolato
5da0d954c4 MUX: Add line disconnect message when a simulated line is dropped due to DTR transition,
To promote clarity of experience, a user on a telnet connected line (which
supports modem control signaling) will receive a "Disconnected from
{simulator name}" message when a session is explicitly terminated by the
simulated system.  This allows the user to differentiate that case from the
simulator merely being powered off or otherwise crashing.  This behavior
mirrors the "Connected to the {simulator name}" message that is presented
when the connection is established.
2016-01-25 05:00:07 -08:00
Mark Pizzolato
d8f2647f93 SCP: general const cleanups and const change to sim_vm_parse_addr. 2016-01-24 08:27:08 -08:00
Mark Pizzolato
ca4a690174 TMXR: Fix multi-line input rate limiting logic 2015-12-19 12:12:53 -08:00
Mark Pizzolato
de0d251c75 TIMER, SCP: Change the sim_activate_after APIs to pass the delay value as uint32.
Also change all sim_defs.h structure declarations and references of sim_
structures to use the typedef names everywhere.
2015-12-10 06:33:59 -08:00
Mark Pizzolato
ed5353b4f4 TMXR Properly select the delay time considering all the lines on a mux.
A multiplexer may have a combination of speed limited behaviors on
different lines, and there may be lines which are idle and lines which
are actively receiving input.  Some of the problems described in #252
are fixed by this.
2015-12-08 17:10:05 -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
0f43551d8c TMXR: Minor typo in help text fixed. 2015-11-19 10:06:25 -08:00
Mark Pizzolato
833ba71c3b PDP11, VAX: Enhance VH, DZ, DL and DCI devices to provide input rate limiting. Fix #246
Data arriving on simulated serial ports can arrive faster than the OS running
on the simulated system can deliber it to user mode programs.  This happens
when chunks of data are delivered to the mux from a network connection.
This can be due to a file transfer program (kermit) running on the other end
of a network connection and the packet size being delivered exceeds the
simulated OS's type ahead buffer size OR from users who paste arbitrary
blocks of data into a telnet or console session.
2015-11-19 08:56:06 -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
d95d32b6d7 TMXR: Return reasonable error status when disconnecting a line without specifying the line 2015-11-01 20:19:59 -08:00
Mark Pizzolato
9fdd8a8706 TMXR: Fix debug output of remaining data after removing telnet negotiation from the input buffer 2015-09-02 16:49:47 -07:00
Mark Pizzolato
77152c6e20 MUX: Fix for connection establishment logic for virtual null modem connections.
Test case provided by Ed Marr using PDP11 DL devices.
2015-08-18 09:52:49 -07:00
Mark Pizzolato
9307fbdf54 MUX: Fix attach parsing of Log File names and no telnet options. Issue found by Ed Marr. 2015-08-16 11:05:44 -07:00
Mark Pizzolato
047a6b856f TMXR: Added delay to assure that simulator internally generated messages get fully transmitted on TMXR lines. 2015-06-26 11:46:49 -07:00
Mark Pizzolato
fa407e678b PDP10, PDP11, VAX, MUX: Fix allowed line attach syntax to accept UDP in any order among attach arguments 2015-05-23 17:08:51 -07:00
Mark Pizzolato
1d3ac294c4 SCP: Make sure that dynamically allocated print buffers have room for NUL character string terminator 2015-03-30 10:15:33 -07:00
Mark Pizzolato
137f825811 SCP: Removed unused conditional compile referenced to HAS_vsprintf_void and HAS_vsnprintf_void. Avoid emitting redundant \r characters when writing to stdout while a simulator is running. Suggestions from Bob Supnik. 2015-03-29 16:21:27 -07:00
Mark Pizzolato
71fe58b33a FRONTPANEL: Added better protocol debug support to debug simulator startup issues 2015-02-26 11:28:08 -08:00
Mark Pizzolato
e768629009 SCP: Added the capability for EXAMINE command output to be written directly to a socket. 2015-02-21 12:40:36 -08:00
Mark Pizzolato
ef9d1adce1 PDP10, PDP11, VAX: const cleanup 2015-02-13 06:18:24 -08:00
Mark Pizzolato
9accae5905 BESM6 and VAX: Cleanup for building on VMS 2015-02-12 12:32:39 -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
d6e60b88b7 TMXR: Extend Telnet option negotiation to explicitly reject uninteresting options. Fix #177 2015-01-21 06:05:20 -08:00
Mark Pizzolato
b8940f4e32 TMXR: Add default debug bits for SEND/EXPECT operations 2015-01-06 08:24:44 -08:00
Mark Pizzolato
c083b45c14 TMXR, SOCK: Properly declare as const string input only arguments. 2014-12-06 03:50:45 -08:00
Mark Pizzolato
4eed007607 SCP: Restructured timer/co-scheduling activities to support co-scheduling on specific timers 2014-12-02 05:33:59 -08: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
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
f6eb4bc4f5 SCP: Fix buffered console implementation to correctly retain buffering attributes across independent SET CONSOLE commands 2014-05-11 06:16:46 -07: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
84707acc7e Compiler suggested cleanup 2014-04-11 09:39:19 -07:00
Mark Pizzolato
74482ce448 PDP10, PDP11, VAX: Make sure that the DMC and DUP devices produce the right messages when an attach is attempted to an already attached line 2014-04-06 16:42:10 -07:00
Mark Pizzolato
ff0191cf29 TMXR: Properly enable packet mode (as inherited from the main mux) on each line. Only produce modem debug output when modem signals have changed. Cleanup the output of SHOW MUX. 2014-04-02 13:07:26 -07:00
Mark Pizzolato
edb475fcc1 PDP10, PDP11, VAX: Fix DMC & DUP unit attach strings for multi-line device configurations. 2014-04-02 08:47:35 -07:00
Mark Pizzolato
e79e41d9e4 TMXR: Change DSR to reflect attached state of line and DCD to reflect connected state of the line. 2014-04-01 19:45:47 -07:00
Mark Pizzolato
0f417ed4ca TMXR: Change modem DSR & DCD to never be indicated as on unless a connection is present. 2014-04-01 08:07:43 -07:00
Mark Pizzolato
017141c9a3 TMXR: Enable proper inheritance of mux global/default buffering value to individual lines. 2014-03-30 13:36:41 -07:00
Mark Pizzolato
6ce8d99cd8 SCP: Added generic output routine sim_printf to output to stdout and sim_log (and sim_deb when enabled)
The goals here being to simplify calling code while getting consistent output delivered everywhere it may be useful.

Modified most places which explicitly used sim_log or merely called printf to now avoid doing that and merely call sim_printf().
2014-03-28 08:20:05 -07:00
Mark Pizzolato
fc885f80dc TMXR: Be sure to correctly allocate the appropriate sized line transmit and receive buffers when a mux or line is attached. 2014-03-27 04:35:16 -07:00
Mark Pizzolato
66a02b877b TMXR: Avoid attempting to manage unit connect strings for never attached devices 2014-03-25 06:47:37 -07:00
Mark Pizzolato
090b2f83f2 PDP10, PDP11, VAX: Avoid corrupting a DMC/DMR unit attach string when a line state transitions 2014-03-17 08:48:02 -07:00
Mark Pizzolato
194b35f6e8 TMXR: avoid calling strcpy with overlapping arguments 2014-03-11 19:30:28 -07:00
Mark Pizzolato
44f66e90eb MUX: Added delay after closing a socket created to validate a port specification. Suggested by Mark Emmer
The network stack on Windows XP needs an opportunity to cleanup after closing a listening socket which was created but not used,
2014-02-23 08:54:00 -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
cde0be5573 TMXR: Added support to reasonably set modem bits when a line has dedicated listen port defined or uses datagram transport. 2014-02-06 17:08:38 -08:00
Mark Pizzolato
9ab6c4d1c1 SOCKET: Extended TMXR packet capabilities to disable the Nagle algorithm when TCP packets transports are used. 2014-01-23 09:31:05 -08:00