Commit graph

811 commits

Author SHA1 Message Date
Mark Pizzolato
a4054f33b8 SCP: Add command argument passed into library unit test routines 2022-02-07 04:21:16 -08:00
Mark Pizzolato
2209f25086 SCP: Add a success or failure indicator preceeding messages 2022-02-06 11:16:57 -08:00
Mark Pizzolato
54eda7a050 SCP: Extend BITFIELDS to allow alternate descriptions for same fields 2022-02-04 07:56:15 -08:00
Mark Pizzolato
dd92be296c SCP: Add host system processor name to SHOW VERSION output 2022-02-04 07:51:08 -08:00
Mark Pizzolato
370bfe006d SCP: Avoid using strlcpy for overlapping string copy 2022-01-16 07:44:15 -08:00
Mark Pizzolato
b5052c81d6 makefile, SCP: Enrich support for compile time SIM_VERSION_MODE
- Pass make command line SIM_VERSION_MODE argument into the compiler.
- Tolerate quoted and unquoted SIM_VERSION_MODE values.
2022-01-15 10:01:49 -08:00
Mark Pizzolato
b24e3580dc SCP: Add clarifying context to various device/unit error messages 2022-01-12 12:17:21 -08:00
Paul Koning
5cd1e8b7ac TMXR, PDP11, PDP10, VAX: Add DDCMP sync framer support
This adds support for the "framer" device, which is a USB-connected
device built around a Raspberry Pico that connects to a synchronous
line, either RS-232 or DEC "integral modem" coax connection.  It
implements the framing portion of DDCMP: clock recovery for the
integral modem case, byte sync, and DDCMP frame handling including
CRC.  The actual DDCMP protocol state machine, with its handling of
sequencing, timeout and retransmit, etc. is left to the host
software.  All the design files for the framer may be found at
https://github.com/pkoning2/ddcmp .

This commit adds code to drive the framer from the TMXR library,
allowing it to be used either from simulated DMC-11 or simulated
DUP-11 devices.  Both have been tested, using RSTS/E, RSX-11/M+, and
TOPS-20.

Fixed the one-digit limit on eth<n> device names, the limit is now 2.
2022-01-08 14:24:42 -08:00
Mark Pizzolato
fa5e0ed157 SCP: Assure that debug writes that check errno get a correct value
The original solution provided in response to #957 needs to be adjusted
to reflect that errno is only guaranteed to be set by fwrite() if an error
occurred. otherwise a non zero value may have been set by some other
call elsewhere in the program.  All other cases where errno is explicitly
check in simh, it is only done after receiving a return status from a
system call.

Fix problem reported in #1108
2022-01-06 12:18:10 -08:00
Mark Pizzolato
ff4c7b154e SCP: Minor Coverity cleanup 2022-01-02 09:47:33 -08:00
Mark Pizzolato
cea76d59bd SCP: Add newer baseline libreadline support. 2021-12-15 16:52:49 -08:00
Mark Pizzolato
c5cd38afbf SCP, makefile: Rename build conditional HAVE_DLOPEN to SIM_HAVE_DLOPEN
Some dependent packages on some platforms may also define HAVE_DLOPEN
and that definition may have different syntax or semantics.  This change
avoids the potential symbol conflict.

As reported in #1098
2021-12-04 17:44:57 -08:00
Mark Pizzolato
3621db4e6a SCP: Prefer Posix 'command -v' over 'which' 2021-12-04 11:48:49 -08:00
Mark Pizzolato
6d9a55d351 SCP: Provide commit id information when archived simh content is used 2021-11-01 15:33:43 -07:00
Mark Pizzolato
079e4780d2 FIO: Add support to set file access and modify times 2021-10-31 04:20:39 -07:00
Mark Pizzolato
e897dfc3c9 SCP: Fix missing void parameter declarations 2021-09-30 21:08:01 -07:00
Mark Pizzolato
feec1da242 DISK, TAPE: Add optional library specific DEVICE context structure
- add disk and tape library initialization routines
- cleanup snprintf arguments
- truncate disk container trailing zero sectors when zapping
2021-09-20 12:28:11 -07:00
Mark Pizzolato
2834bfb1f9 SCP: Avoid 'not found' error in tool path locater on Windows 2021-09-20 07:37:14 -07:00
Mark Pizzolato
0bc77c4d90 PDP11, VAX: Add or correct help output for some SET commands
As discussed in #1077
2021-09-10 11:38:37 -07:00
Mark Pizzolato
82f9f5b966 SCP: Allow for simulator specific processing of DO commands. 2021-09-06 10:18:36 -07:00
Mark Pizzolato
d57b182701 SCP: Expose _sim_vdebug for use by external libraries 2021-09-06 09:58:41 -07:00
Mark Pizzolato
6d04cf814a SCP: add sim_get_tool_path to get the expanded path to a local command
This logic was previously within the static SCP function _get_tool_version
and is now exposed for use elsewhere.
2021-08-28 04:27:41 -07:00
Mark Pizzolato
3f3884ddb6 SCP: Fix memory leak when accessing externally defined environment variables 2021-08-23 12:17:18 -07:00
Mark Pizzolato
0bfb902b56 SCP: Enhance hierarchical help prompting
- A prompt answer which exactly matches a topic name is given
  preference over the potential ambiguity of other topics which start
  with the same text.
- Prompt with the parent topic's prompt when a just displayed subtopic
  has no subtopics.
- Allow either ^D or ^Z entered to act as EOF.

These changes reflect the behavior of the VMS help system which the
hierarchical help system is modeled on.
2021-08-14 19:43:41 -07:00
Mark Pizzolato
f95b20e1f3 SCP: Cleanup potential compiler warnings 2021-08-13 09:09:53 -07:00
Mark Pizzolato
78d3d1b560 SCP: Add register validation tests as part of the SCP library test 2021-08-11 07:28:08 -07:00
Mark Pizzolato
dcbfba0f9a SCP: Fix register formatting and quiet unused variable warning 2021-08-03 13:23:25 -07:00
Mark Pizzolato
77d7df7a56 SCP: HELP command output formatting cleanup
- Add column header to output of HELP device register list.
- Format HELP output for REGISTER, SET and SHOW commands to accommodate long
   descriptor text (wrapping as needed).
- Add HELP DEVICE * to display help for all devices
2021-08-01 18:59:00 -07:00
Mark Pizzolato
2c820dca5c SCP: Pass all external environment variables through to spawned commands
As discussed in #1057
2021-07-31 12:49:56 -07:00
Mark Pizzolato
9ef08cba0d SCP: Allow all external environment variable expansion
as discussed in #1057
2021-07-29 21:17:44 -07:00
Mark Pizzolato
5f8a8cca9d SCP: Avoid using externally defined aliases for SCP commands
As discussed in #1057
2021-07-29 10:15:54 -07:00
Mark Pizzolato
d23942bc37 SCP: Allow ; and # comments on SET and SHOW command lines 2021-06-05 12:24:57 -07:00
Mark Pizzolato
cf1ac44d4a SCP: Allow SET/SHOW commands to operate on explicitly set unit names
simh UNITs that have their name set via sim_set_uname() can now be
referenced via MTAB entries for the related DEVICE as well as attach
commands.
2021-05-30 15:37:01 -07:00
Mark Pizzolato
7008edc561 SCP: Fix SHOW writeenable MTAB entries
As discussed in #1034
2021-04-20 09:28:41 -07:00
Mark Pizzolato
a015e44c10 ALL: Standardize writelock behavior adding global UNIT_WLK & UNIT_WPRT
Historically this functionality was reimplemented within each
DEVICE simulator often with slightly different implementations
and inconsistencies.  Solving this globally within SCP required
changes in many places, but should henceforth be reasonably
managed.

As discussed in #1034
2021-04-19 10:58:51 -07:00
Mark Pizzolato
7276dc1f8d SCP: Make ATTACH messages report the UNIT name
As discussed in #1034
2021-04-16 11:28:43 -07:00
Mark Pizzolato
f77332112f SCP: Fix HELP DISKINFO
As reported in #1031
2021-04-12 10:24:32 -07:00
Mark Pizzolato
e1d60d1035 SCP: Avoid redundant HELP SET output for single unit DEVICEs 2021-04-12 03:50:52 -07:00
Mark Pizzolato
dea084a908 SCP: Fix Coverity issue 2021-04-11 15:54:11 -07:00
Mark Pizzolato
c004fcc2ba SCP: Fix Coverity identified issues 2021-04-11 15:48:01 -07:00
Mark Pizzolato
fc5bda9070 SCP: Add unit test for scp token parsing routines 2021-04-06 02:19:27 -07:00
Mark Pizzolato
8dbffbc00a SCP: Add debug support to capture details of SAVE and RESTORE commands 2021-04-06 00:28:22 -07:00
Mark Pizzolato
e62070ad8f SCP: Clean up formatting of EXAMINE/DEPOST help text 2021-03-29 17:10:52 -07:00
Mark Pizzolato
e51d918adb SCP: Assure consistent PC state while preparing RUN command execution
Some simulator reset routines may reference the RUN target PC value
while others may change the PC, so we set the PC value both before
and after any reset is performed.

As reported in #1020
2021-03-13 12:38:39 -08:00
Mark Pizzolato
076c1ef094 SCP: Add support for ~/ references to user home directory when opening files 2021-03-06 14:04:54 -08:00
Mark Pizzolato
06cedc7cbe SCP: Explicitly use sim_fopen rather than the CRTL fopen directly 2021-03-06 05:24:49 -08:00
Mark Pizzolato
a1785ac1d0 SCP: Add optional VM routine that is invoked on specific REGister updates
The new REG_DEPOSIT register flag bit indicates that updates to a
REGister with this flag specified will invoke the sim_vm_reg_update
routine after the data has been updated.
2021-03-02 05:35:04 -08:00
Mark Pizzolato
1a54a2515d SCP: Add HELP SET/SHOW for unit specific commands for DEVICEs with single units 2021-02-28 15:35:50 -08:00
Mark Pizzolato
e9d774908e SCP: Fix compile errors in recent commits 2021-01-13 05:12:30 -08:00
Mark Pizzolato
749dd7d333 SCP: Move utility functions to sim_fio 2021-01-12 07:58:56 -08:00