Commit graph

214 commits

Author SHA1 Message Date
Mark Pizzolato
80289e1e3b Enhanced Remote Console support to allow two separate command processing modes.
1) Single Command Mode:  commands are processed between simulated instructions once CR is received.
 2) Multiple Command Mode: commands are initiated with the WRU character (usually *E) which suspends simulation execution and commands are processed until a CONTINUE command is entered (or automatically provided if the SET REMOTE TIMEOUT=seconds interval has elapsed).
2013-05-10 16:10:07 -07:00
Mark Pizzolato
782bec605d Fix potential remote console memory leak 2013-05-10 05:02:07 -07:00
Mark Pizzolato
6c6d641034 Tolerate race condition which results in spurious timer thread wakeups which were causing the timer thread to exit. (SIM_ASYNCH_CLOCKS) 2013-05-07 11:40:07 -07:00
Mark Pizzolato
6cf54e8341 Fixes for stable operation with SIM_ASYNCH_CLOCKS defined 2013-05-07 11:22:29 -07:00
Mark Pizzolato
cc8c79eb0f Added a more unique naming paradigm for remote console temporary log files to avoid potential collisions when multiple simulators may be running concurrently 2013-05-02 07:46:07 -07:00
Mark Pizzolato
242103e79f Added remote console support when a persistent console log is not enabled. 2013-05-01 16:48:55 -07:00
Mark Pizzolato
b1e31a7034 Fixed Remote Console to tolerate bare LF as a line terminator and enhanced the tmxr debug output for special characters 2013-04-30 08:37:11 -07:00
Mark Pizzolato
02ebf6bdfc Added support for STEP command execution in Remote Console sessions 2013-04-24 11:43:44 -07:00
Mark Pizzolato
9844ba6696 Added DIR (LS) command to list the files in a directory. This command is usable in Remote Console sessions. 2013-04-23 12:39:03 -07:00
Mark Pizzolato
02b3477d20 Ensure correct Remote Console functionality when log files get big 2013-04-21 05:46:52 -07:00
Mark Pizzolato
de22137d1b Enhanced Remote Console support
- Added HELP REMOTE for remote console sessions to display the available remote console commands
 - Added input timeouts to remote console sessions to automatically continue the simulator
 - Added suspend/resume announcements to all remote console sessions
2013-04-20 06:52:02 -07:00
Mark Pizzolato
ba09b2d3f2 Avoid crash in remote console when invalid command is entered and notification to alternate remote consoles. 2013-04-19 15:42:22 -07:00
Mark Pizzolato
99c13051e6 Merge remote-tracking branch 'origin/master' into Operator-Commands 2013-04-19 14:23:00 -07:00
Mark Pizzolato
b886fb23b6 Add Remote Console support 2013-04-19 13:54:19 -07:00
Mark Pizzolato
4bd72e666c Compiler and static analyzer fixes from Peter Schorn. 2013-04-13 16:59:54 -07:00
Mark Pizzolato
414cf3335f Compiler identified issues in AltairZ80 simulator 2013-04-12 06:39:28 -07:00
Mark Pizzolato
e3207c2009 Compiler suggested cleanups 2013-01-23 05:07:44 -08:00
Mark Pizzolato
83c1d80194 Merge branch 'master' into AsyncTmxr
Conflicts merged and missing changes in new modules added as needed for clock co-scheduling.
2013-01-21 16:52:42 -08:00
Mark Pizzolato
d46ebc7d49 Untangle circular include references between tmxr serial and sock include files. 2013-01-21 11:29:27 -08:00
Mark Pizzolato
19c4ccbf10 Added dynflags to the unit structure to track dynamic flags used by scp & libraries. This avoids expanding the set of unit flags and encroaching on the available user flags . 2013-01-18 09:46:13 -08:00
Mark Pizzolato
4f19d08869 Initial merge of Asynchronous Multiplexer and Asynchronous Clock support 2013-01-17 11:34:51 -08:00
Mark Pizzolato
1213f098e2 Fixed Buffered Console behavior which ended up flushing buffer contents once a second and clearing the buffer. We were also incorrectly flushing buffer contents when a connection dropped. 2013-01-11 16:34:05 -08:00
Mark Pizzolato
784ae24324 - Fixed asynchronous i/o hangs introduced when asynchronous cancel support was added
- Added event debug support to scp and the vax simulator
- Moved external declarations into include files related to modules which define them and removed random externs from modules which referenced them
- Fixed typos in sim_ether
- Fixed sim_disk and sim_tape to properly manage asynchronous threads on an i/o flush
2013-01-09 17:02:58 -08:00
Mark Pizzolato
375a02181e Retained the prior SET CONSOLE DEBUG={stdout|log} behavior which deprecated and replaced by SET DEBUG={stdout|log}. Reported by Rob Jarratt 2013-01-05 14:34:10 -08:00
Mark Pizzolato
3b5870c66b Fix the occasional pause which may happen when the console is connected to a serial port at a slow port speed and large bursts of output cause buffers to fill up. 2012-12-19 05:43:06 -08:00
Mark Pizzolato
1370ad6a2c Fixed console serial port connection checking 2012-12-18 15:41:34 -08:00
Mark Pizzolato
a72d85b2bd Fix TMXR for devices which reference the TMLN conn variable as a connection state flag 2012-12-18 09:53:01 -08:00
Mark Pizzolato
6cabdb9f9f Fixed duplicate logging output when output buffers are full and potential pauses in console output (reported by Mark Benson) 2012-12-15 11:40:20 -08:00
Mark Pizzolato
60a0881c71 Fixes after Dave Bryan's testing. 2012-12-15 07:58:11 -08:00
Mark Pizzolato
7f6a1af5bf Added an optional validation argument to sim_parse_addr for callers which need to confirm incoming connections come from expected sources 2012-12-09 12:12:09 -08:00
Mark Pizzolato
c6c66487ac Compiler suggested cleanups 2012-11-30 13:22:15 -08:00
Mark Pizzolato
f8ae8d2741 Periodically flush buffered console mux data. This is necessary to cover the situation when data was buffered and sending data out the connection stalled due to OS/network buffering and no more output traffic happens to be generated. 2012-11-07 14:26:07 -08:00
Mark Pizzolato
1fda1b1708 scp.h, sim_console.h, sim_console.c - Changed SET CONSOLE DEBUG= and SET CONSOLE NODEBUG to enable/disable debugging for the console device 2012-10-23 14:37:19 -07:00
Mark Pizzolato
02cb620c9b Change to support serial ports on multiplexer devices without any changes to existing multiplexer device emulation code.
Added support for per line tcp listen ports.
Added support for per line outgoing tcp/telnet connections.

Removed DEV_NET from pdp11_dz and pdp11_vh emulators to allow proper restore of
2012-10-17 08:40:01 -07:00
Mark Pizzolato
30ce7fdbaa Revised the socket library sim_sock(.c & .h) to support both IPv4 and IPv6 leveraging the RFC3493 APIs.
All dependent code has been updated to use the revised interfaces.
2012-09-28 15:34:55 -07:00
Mark Pizzolato
030d790b4c Asynchronous Timer Support
scp.c, scp.h
	- Change the sim_clock_queue event list to be terminated by the value QUEUE_LIST_END instead of NULL.  This allows easy determination of whether a unit is on a list since when it is not on a list the next pointer is NULL.
	- standardized the usage of UPDATE_SIM_TIME
	- Added support for internal/pseudo devices to support the TIMER and CON-TEL pseudo devices (to enable and disable debugging)
	- Reverted to the prior "SET CONSOLE DEBUG" command semantics since the console debug can be manipulated via the generic "SET <dev> DEBUG" command (i.e. SET CON-TEL DEBUG=TRC;XMT;RCV)
	- Changed "SHOW TIMERS" to "SHOW CLOCKS" to display the current calibrated timer information
	- Added sim_is_active_bool API to return the boolean active status avoiding the potential work walking the list when most callers aren't interested in the event firing time
	- Fixed run_boot_prep to properly record the not queued status of any units which are removed from the sim_clock_queue during initialization
	- Added display of DEBUG, NODEBUG options to the SHOW SHOW command

    sim_timer.c, sim_timer.h
	- Added asynchronous timer capabilities with support for calibration and idling
	- Added internal/pseudo device to support debugging of Idle, Calibration and asynch timer activites.
	- Added suppression of timer calibration when idling has occurred

    sim_tmxr.c, sim_tmxr.h
	- Added tmxr_activate_after and macro definition for sim_activate_after to invoke it for proper behavior with multiplexer devices
	- Added all polling units to the standard timer queue when dropping back to the simulator command prompt to accommodate the potential to disable asynch mode
	- Fixed synchronization to operate with pthread synchronized asynch queue and proper stopping of poll when dropping back to the simulator command prompt
	- Fixed calls to select to have a timeout with properly ranged tv_usec values and dealt with possible EINTR return from select

    sim_console.c, sim_console.h
	- Changed internal/pseudo console telnet device name to CON=TEL
	- Reverted to the prior "SET CONSOLE DEBUG" command semantics since the console debug can be manipulated via the generic "SET <dev> DEBUG" command (i.e. SET CON-TEL DEBUG=TRC;XMT;RCV)
	- Fixed synchronization to operate with pthread synchronized asynch queue and proper stopping of poll when dropping back to the simulator command prompt
	- Fixed calls to select to have a timeout with properly ranged tv_usec values

    sim_defs.h
	- Added necessary unit fields to support asynchronous timing activities
	- Added asynchronous macros to support async timing activities
	- Fixed asynch pthread only macros (not using AIO_INTRINSICS).
	- Fixed the definition of the UDATA macro which was never adjusted to accommodate the insertion of 2 extra fields in the unit structure and thus made the initialization of the unit wait field meaningless.
	- Changed the NOQUEUE_WAIT value from 10000 to 1000000.  This is only used when the sim_clock_queue is empty, which normally never happens on any simulator since they all have clocks and/or other frequently polling devices.  With asynchronous multiplexer and timing support the queue is often empty and this value is then used when calculating idling delays.  If it is too small, idling will be inefficient.  Being large should not be a problem otherwise.

    Interdata/id16_cpu.c
	- removed test of sim_idle_enab before calling sim_idle

    Interdata/id32_cpu.c
	- removed test of sim_idle_enab before calling sim_idle

    vax/vax_cpu.c
	- removed test of sim_idle_enab before calling sim_idle

    vax/vax_stddev.c
	- converted CLK device to use the internal timer service API sim_activate_after to leverage asynchronous timing when available
2012-05-26 07:16:04 -07:00
Mark Pizzolato
7c38b83d7c Asynchronous Multiplexer and Console Support
scp.c, scp.h, sim_defs.h
     - Added commands:
          SHOW MULTIPLEXER (MUX)
          SHOW TIMERS
     - Added facilities/APIs:
          sim_activate_after - time specific event scheduling (vs instruction scheduling) API visible, optional separate thread implementation in a later revision
     - Changed Commands:
          SET CONSOLE DEBUG no longer affects global debugging, but merely debugging for the console subsystem.  Use SET DEBUG and SET NODEBUG to affect global debugging.
     - Added Asynchronous polling support

sim_tmxr.h, sim_tmxr.c
     - Added Asynchronous capabilities to the multiplexer subsystem to avoid polling for input and to deliver input data instantly when it arrives instead of delaying for up to one or more full simulated clock ticks.
     - Added debug trace support
     - Added statistic tracking of total bytes transmitted on each line
     - Added more aggressive attempts to flush transmit buffers when they fill before dropping tranmitted characters
     - Fixed status return of tmxr_putc_ln to return SCPE_LOST if the transmitting line isn't connected or buffered.

sim_console.h, sim_console.c
     - Fixed issue where connections to console telnet sessions would succeed for the first connection, but hang indefinitely for additional connects without rejecting due to all lines being busy.  This is handled by using an internal device and unit to hang the required polling on.  Connection polls happen once per second.
     - Added console debugging/trace support.
     - Added Asynchronous capabilities to the console subsystem to avoid polling for input and to deliver input data instantly when it arrives instead of delaying for up to one or more full simulated clock ticks.
     - Added tmxr_set_console_input_unit() API to support asynchronous simulator console I/O

sim_timer.h, sim_timer.c
     - Added SHOW TIMERS support
     - Added mechanism to capture the timer the simulator uses for its clock tick and make this timer globally available for other uses

PDP11/pdp11_dz.c
     - Added debug trace support

PDP11/pdp11_vh.c
     - Added debug trace support
     - Changed timing mechanisms to not assume that the count unit service routine calls measures the passage of time, and created a separate unit to measure time.

VAX/vax_stddev.c
     - Added call to tmxr_set_console_input_unit to leverage Asynchronous console I/O
2012-05-12 13:42:44 -07:00
Mark Pizzolato
0f8e6cfe95 Cleanup for warning messages produced by the clang C compiler. Mostly adding parentheses in conditional assignments and clarification parentheses in complex boolean expressions. 2012-04-29 11:59:44 -07:00
Mark Pizzolato
6e813b8364 Merge with v3.9-0-rc2 first pass 2012-03-24 19:46:37 -07:00
Mark Pizzolato
5863e1bc38 HP2100 Update from Dave Bryan 2012-03-23 11:11:07 -07:00
Mark Pizzolato
0270d0ea0d Cleanup based on reports from Michael Bloom 2012-03-22 12:20:00 -07:00
Mark Pizzolato
4ab52659be Provided Console Control Event explanation as comments in the sim_console code. 2012-02-28 14:02:49 -08:00
Mark Pizzolato
01369c13da Added sim_ttisatty to support reasonable behaviour (i.e. avoid in infinite loop) in the main command input loop when EOF is detected and input is coming from a file (or a null device: /dev/null or NUL:) This may happen when a simulator is running in a background process. 2011-12-07 10:01:07 -08:00
Mark Pizzolato
ec4f002531 Standardized the simulatar transition messages which is needed on hosts with raw console tty I/O (From the OSX community) 2011-10-28 10:06:12 -07:00
Mark Pizzolato
eef35bd1dc Added a console log flush when starting a simulator and potentially waiting for a telnet connection 2011-09-27 07:22:25 -07:00
Mark Pizzolato
3ae8a42dae Allowed SET CONSOLE TELNET=nnn to be issued multiple times, with an automatic SET CONSOLE NOTELNET done as needed. 2011-09-26 11:49:43 -07:00
Mark Pizzolato
d81365b7af Compile cleanups.
i1620_sys.c - fixed printf calls without a format argument.
ibm1130_cr.c - fixed printf calls without a format argument.
scp.c - corrected argument types
vax780_sbi.c - corrected argument types
vax_sysdev.c - corrected argument types
pdp11_tu.c - Fixed t_addr printouts for 64b big-endian systems
sim_console.c - fixed formats to consistently print file names
2011-04-19 16:18:26 -07:00
Mark Pizzolato
bafbba4df8 Fixed bug with shared log file references 2011-04-18 16:06:19 -07:00
Mark Pizzolato
94ad4e303f Cleaned up to support running in a background/detached process 2011-04-17 15:29:35 -07:00
Mark Pizzolato
fe8b1f06de Merge branch 'FastAsynchIO' into simhv38-2-rc2
Conflicts:
	PDP11/pdp11_tq.c
	PDP11/pdp11_ts.c
	PDP11/pdp11_xq.h
	VAX/vax780_sbi.c
	VAX/vax_cpu.c
	makefile
	scp.c
	sim_defs.h
	sim_ether.c
	sim_timer.c
2011-04-15 10:47:35 -07:00