Commit graph

824 commits

Author SHA1 Message Date
Mark Pizzolato
c5d5a9dfbf VAX780: Fix Interval Timer logic
- Previous changes made to support 32V's 60HZ clock tick introduced changes
  which didn't properly handle increments and interrupt generation while single
  stepping the timer.

- The icr_rd routine returned an incorrect value when interpolation was
  necessary due to a missing cast when converting from double to uint32.

- Properly start the timer from the current state of the interval count register
  when the timer was previously stopped.
2016-06-20 15:56:19 -07:00
Mark Pizzolato
b935a2dafc SCP: Make sure SIM_BIN_NAME environment variable is always defined.
Previously it would only be defined in certain instances and after
processing some combinations of startup files.
2016-06-20 11:54:28 -07:00
Mark Pizzolato
e158408268 SCP: Add simulator binary name in a SIM_BIN_NAME environment variable 2016-06-19 22:10:17 -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
f3467d678c SCP: Extend RUN and GO commands with optional UNTIL criteria.
The new RUN/GO command syntax supports a stop criteria.
There are two forms of stop criteria:

1) A normal breakpoint (which exists only until it is encountered)
2) A user specified output string is emitted by the simulated system.

Command syntax is:

    RUN|GO {START-PC-VALUE} {UNTIL breakpoint|"output-string"}
2016-06-05 02:39:41 -07:00
Mark Pizzolato
c5ee1ad971 SCP: Enhance EXPECT support to allow multiple rules with the same match string
Multiple rules with the same match string are processed in the order the EXPECT
commands are entered.  NOEXPECT will remove all pending EXPECT rules which
have the match string provided on the NOEXPECT line.
2016-06-05 01:40:38 -07:00
Mark Pizzolato
8b08e6c2d9 SCP: Allow spawn commands to not require space after ! 2016-05-30 04:14:45 -07:00
Mark Pizzolato
e67bf602a0 SCP: Added shutdown flag for detach_all 2016-05-28 13:32:15 -07:00
Mark Pizzolato
b0e67d5900 SCP: Fixed potential memory leak in get_asearch 2016-05-28 13:31:50 -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
fdca6384f2 SCP: Issue reason message before calling abort when sim_cancel fails 2016-05-13 11:22:39 -07:00
Mark Pizzolato
576f5b39e5 SCP: Add ability to display device description if -D specified on SHOW DEVICE
The SHOW FEATURES will enumerate all devices in a simulator and for each of
them display the device specific description if one is available.

This change allows the description to be optionally visible for a single device
displayed with SHOW DEVICE.
2016-05-07 15:21:40 -07:00
Mark Pizzolato
b502558df7 SCP: Change handling of EXPECT return status to allow message in verbose mode
The previous change in handling or SCPE_EXPECT transformed it to SCPE_OK
to avoid unexpected exiting or condition trapping.  This didn't allow the
SCPE_EXPECT reason to be display if verbose mode was on.
2016-04-13 15:57:56 -07:00
Mark Pizzolato
313a8e2608 SCP: Defer readline initialization until immediately before it will be used.
On some platforms, readline seems to behave in unexpected ways if another
file is already open when it is initialized.  Fix: #291
2016-03-22 18:41:50 -07:00
Mark Pizzolato
f71acb307d SCP: Fix expect exit behavior to not be a reason a DO command procedure exits.
The exploit purpose of an EXPECT command is to return control to the SCP
interpreter when data output matches the expect condition;  This will then
allow either related action commands specified on the EXCEPT command to
be performed or subsequent commands in the running command file.
2016-03-15 14:48:53 -07:00
Mark Pizzolato
37733cabee SCP: Add support REGister data in arrays of arbitrary structures. 2016-03-14 15:07:22 -07:00
Mark Pizzolato
5ffd11c636 SCP: Fix year offset used when expanding DATE_19XX_YY and DATE_19XX_YYYY 2016-02-19 06:58:30 -08:00
Mark Pizzolato
445bc9935b SCP: Add DATE_19XX_YY and DATE_19XX_YYYY variable insertion.
These variables can be used in SEND scripts which are setting the
date/time on non Y2K compliant operating systems.
2016-02-18 18:50:06 -08:00
Mark Pizzolato
5eb6750800 SCP: Avoid using tempnam() to produce OS component of SHOW VERSION output 2016-02-11 09:47:02 -08:00
Mark Pizzolato
2b3680ac61 SCP: Avoid potential file access error when producing SHOW VERSION output. 2016-02-08 23:57:32 -08:00
Mark Pizzolato
f285d52b1c SCP: More thorough OS version display in SHOW VERSION 2016-02-08 23:48:22 -08:00
Mark Pizzolato
0897320a16 SCP: Add TYPE/CAT command 2016-01-28 06:49:56 -08:00
Mark Pizzolato
dce0aa2935 VIDEO: Add SDL audio support to generate a beep. Add absolute pointer position to mouse events. 2016-01-25 17:14:08 -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
5a99bcf185 SCP: Assure that files attached honor the unit Read-Only flag in addition to -R switches. 2016-01-12 09:52:14 -08:00
Mark Pizzolato
ff0f9a7198 SCP: Add EBCDIC and RADIX-50 data to debug output of block data.
Tape and Disk contents may exist in various formats.  The -D and -E
debug switches add RADIX-50 and EBCDIC output respectively.
2016-01-04 14:43:32 -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
b942bac409 SCP: Allow command switches -N and -Y to specify the answer to Yes/No prompts during command execution. 2015-12-06 10:25:33 -08:00
Mark Pizzolato
ad3dc29d5d SCP: Added flag indicating to device simulations that an event dispatch is active 2015-12-06 05:34:27 -08:00
Mark Pizzolato
0e8c0aeaf3 SCP: Add debug flag description details to HELP dev DEBUG output 2015-12-02 08:16:44 -08:00
Mark Pizzolato
44ef17f971 TIMER: Fix recently revised sim_idle_capable for hosts which aren't idle capable. 2015-11-23 15:45:46 -08:00
Mark Pizzolato
668761a460 SCP: Add display of host OS clock resolution to SHOW VERSION 2015-11-23 07:30:28 -08:00
Mark Pizzolato
099dd40657 SCP: Add sim_activate_after_abs API like sim_activate_abs only specifying a used time delay. 2015-11-18 09:41:16 -08:00
Mark Pizzolato
73d7aee71f SCP: Add printf style format argument validation for all functions which take printf arguments.
These include: sim_printf(), sim_messagef(), Fprint() and sim_debug().

Fix current use of these functions which had invalid arguments.
2015-10-09 04:12:25 -07:00
Mark Pizzolato
c3a879da2d VAX: Change to load ROMs or other boot code directly from built in memory arrays.
Prior logic attempted to load the desired file from the current default directory and if that failed wrote the in memory boot code image to the desired file and then retried the desired load..

A user can still explicitly load a ROM image with a "LOAD -R romfile.bin" command prior to a BOOT attempt if they want to test or otherwise run with a different ROM.
2015-09-28 09:19:38 -07:00
Mark Pizzolato
4921d92650 VIDEO: Produce SCREENSHOT images in PNG format if libpng is available in the host build environment 2015-09-27 16:14:55 -07:00
Mark Pizzolato
389c08a81e SCP: Added missing help for SET REMOTE MASTER command. 2015-09-21 12:13:36 -07:00
Mark Pizzolato
751e1c0a7d SCP: Added missing REMOTE from scp_errors array. Reported by Dave Bryan 2015-09-20 14:07:47 -07:00
Mark Pizzolato
1ef6c3d6b9 SCP: Added REG_V_UF and REG_UFMASK to support user-defined register flags. From Dave Bryan
Altered the calling sequences to fprint_sym and parse_sym in ex_reg and dep_reg to merge user-defined register flags with the radix in the addr parameter.  This allows the print and parse routines to identify the register or determine how it is to be handled.  These are called in lieu of the standard print and parse routines if a register has REG_VMIO or at least one user-defined flag set.
2015-09-20 14:04:24 -07:00
Mark Pizzolato
0986c6ff9e VAX750: Fixed ROM based boot from console TU58
Problem was the console storage output buffer was masked with a WMASK instead of a BMASK (it is only a 8 bit register).
Also, the input interrupt processing cleared the output interrupt state instead of the input interrupt state.  This would only be a problem when interrupts are actually used instead of polled I/O.
2015-09-17 17:48:02 -07:00
Mark Pizzolato
23e552e9fc SCP, VIDEO: Properly reject SCREENSHOT command when no devices use sim_video. 2015-09-17 14:49:10 -07:00
Mark Pizzolato
78399f10cb SCP: Added a SCREENSHOT command to record the video display window. 2015-09-17 11:49:01 -07:00
Mark Pizzolato
f602b132dd SCP: Make output of SHOW commands also appear in debug output while debugging 2015-08-17 11:47:19 -07:00
Mark Pizzolato
bd2f592918 Revert "SCP: Remove ASCII source code character set dependency"
This reverts commit 7c7b44e409.

The prior commit didn't work for static initializers.  There are other ASCII dependencies in simh.  They should all be solved together or not at all.
2015-08-07 00:54:23 -07:00
Mark Pizzolato
7c7b44e409 SCP: Remove ASCII source code character set dependency
Provide reasonable behavior on any platform which doesn't use ASCII as a character set.  Method suggested by Dave G4UGM.
2015-08-03 12:35:08 -07:00
Mark Pizzolato
dee7135cfb SCP: More immediate detection of changed stop_cpu during event processing. 2015-04-25 03:49:48 -07:00
Mark Pizzolato
71b99c6fa1 SCP: Add -D switch to RESTORE command to suppress detach/attach activities during a restore. Fix #197 2015-04-19 05:28:28 -07:00
Mark Pizzolato
d75ec66607 FRONTPANEL: Added support for a register array to be returned as part of a register set 2015-04-17 14:46:06 -07:00
Mark Pizzolato
04142da99c SCP: Added simulator version checking while performing a RESTORE operation.
Added -Q switch to suppress version check messages
Added -D switch to disable the detach_all at the beginning of a restore and any actual attach operations during the restore
2015-04-17 14:43:52 -07:00
Mark Pizzolato
674b8e0ced SCP: Fix incorrect version check in RESTORE command and add logic to report git version differences (#197), Fix #206 2015-04-11 11:33:52 -07:00