Commit graph

195 commits

Author SHA1 Message Date
Mark Pizzolato
bacf1a7445 SCP: Use internal device SCP-PROCESS for SCP level debugging 2019-01-22 15:48:48 -08:00
Mark Pizzolato
0e544b71ff SCP: Fix various compiler warnings 2018-09-28 18:05:39 -07:00
Mark Pizzolato
be52190067 All VAX: extend REI debugging support
Identify reserved operand fault reason details.
2018-09-27 06:41:40 -07:00
Mark Pizzolato
d35b8725a3 SCP: Add optional status value to EXIT command 2018-09-18 14:24:14 -07:00
Mark Pizzolato
6070692581 SCP: Add unit to AIO_VALIDATE context message 2018-08-08 11:51:54 -07:00
Mark Pizzolato
44bc5116e7 SCP: Add file:line context reporting when abort() is invoked from macros 2018-08-08 10:00:53 -07:00
Mark Pizzolato
97bee79faa TIMER: Fix overflow error in sim_idle_ms_sleep() timespec tv_nsec field
Backed out commit 484889ea5a since the overflow of the timespec tv_nsec
field was the real cause of the problem.  No need for an extra mutex.

As reported in #595
2018-07-15 10:11:14 -07:00
Mark Pizzolato
e2e17e1594 SCP: Widened the DEVICE type field to 4 bits 2018-07-13 20:26:36 -07:00
Mark Pizzolato
48033d86c9 SCP: Add DEV_CARD device type for devices that use sim_card 2018-07-12 11:42:32 -07:00
Mark Pizzolato
484889ea5a TIMER: Changed sim_idle_ms_sleep() to use a mutex which is unique to idling
It seems that the prior use of sim_asynch_lock RECURSIVE mutex could
cause a pthread_cond_timedwait() failure with EINVAL returned.
As discussed in #595
2018-07-11 11:59:05 -07:00
Mark Pizzolato
188e8cfe8f SCP: Add missing change to sim_defs.h which broke build 2018-06-08 18:27:58 -07:00
Mark Pizzolato
c294787aed SCP: Fix expression evaluation divide by zero, and avoid parameter substitution
This allows bare the % character to to properly be the moduls operator and
avoids potential ambiguous variable insertions.
2018-05-24 12:59:23 -07:00
Mark Pizzolato
96d3b5d26b SCP: Add SCP debug options to default device debug setup 2018-05-03 11:49:42 -07:00
Mark Pizzolato
4e508cfc29 SCP: Add C style expression support for IF conditions and SET ENV -A
Expression evaluation code provided by Gabriel Pizzolato.
2018-05-01 22:08:06 -07:00
Mark Pizzolato
b4ca9174fd SCP: Add formatting support for signed t_value (t_svalue).
PV_LEFTSIGN - left justified signed value
PV_RCOMMASIGN - right, space filled, Comma separated every 3 treat as signed
2018-04-30 21:35:20 -07:00
Mark Pizzolato
114a29bc2f SCP: Add PCRE version to SHOW VERSION output 2018-04-08 17:13:54 -07:00
Mark Pizzolato
28e4311039 SCP: Extended debugging to allow for unit specific debug for disk and tape 2018-04-07 21:38:26 -07:00
Mark Pizzolato
ce8aea13bc MINGW: Reorder windows include files to avoid future complications 2018-02-12 20:48:39 -08:00
Mark Pizzolato
2b9ce757fd MINGW: Fix build with newest MinGW tool chain
Newest Win32 include files changed the include file order as compared to the
Microsoft MS compilers.

This is arguably a bug in the MinGW codebase, but working around it is too trivial
to complain about.
2018-02-08 19:07:17 -08:00
Mark Pizzolato
3a81f63ec1 SCP: Add support to handle CTRL+C while executing command files 2018-01-30 03:36:15 -08:00
Mark Pizzolato
11df2a2fd9 SCP: Set proper bound on error arrays 2018-01-23 23:06:39 -08:00
Mark Pizzolato
6487d319cd VMS Build: Restore VAX/VMS host build support
The C RTL on the latest VAX/VMS does not provide a snprintf function.
We provide a 'basic' one which meets the needs of simh as suggested
by Jordi Guillaumes Pons.
2017-12-09 11:21:38 -08:00
Mark Pizzolato
9b1f44f787 SCP: Remove optional write_callback in the REGister structure
The REG structure exists to serve SCP's various activities.  It is
does not exist to provide capabilities to a VM.
2017-12-09 02:54:10 -08:00
Mark Pizzolato
a4a6a1d409 SCP: Fix regression which disabled limit check when parsing unsigned integers
This affected unit and tmxr line checks when there was only one unit or line.
2017-12-05 12:23:31 -08:00
Mark Pizzolato
243ee968fb SCP: Fix REGister initialization macros to avoid nested macro insertion 2017-11-21 01:20:49 -08:00
Mark Pizzolato
61679ed8f0 SCP: Add optional write_callback to REGister structure called only on DEPOSIT
Add necessary macros to populate this field and cleanup all the
existing macros to be simpler.
2017-11-19 08:18:02 -08:00
Mark Pizzolato
932d16da53 SCP: Rework SEND and EXPECT commands to provide default and temporary arguments
- EXPECT HALTAFTER=nnn
     --> sets "nnn" as the global/default value

 - EXPECT "some string"
     --> uses the "nnn" global/default value

 - EXPECT HALTAFTER=ttt "some string"
     --> uses the "ttt" temporary value for this EXPECT only

and:

 - SEND AFTER=nnn
     --> sets "nnn" as the global/default value

 - SEND "some string"
     --> uses the "nnn" global/default value

 - SEND AFTER=ttt "some string"
     --> uses the "ttt" temporary value for this SEND only

(and similarly for the SEND DELAY value).
2017-10-16 13:10:10 -07:00
Mark Pizzolato
2574100ec5 SCP: Fix EXPECT processing to avoid comparing against old data 2017-09-13 17:02:16 -07:00
Mark Pizzolato
e9d5e2e3c9 SCP: Leverage stdint.h for environments where it is available 2017-09-07 09:12:06 -07:00
Mark Pizzolato
727cd8e217 SCP: Fix potential conflics with library provided ctype routines 2017-09-03 18:23:58 -07:00
Mark Pizzolato
23f4c90a6d SCP: Generalized numeric switch processing 2017-09-03 09:19:20 -07:00
Mark Pizzolato
245818d348 SCP: Added extended radix options (-2, -8, -10 and -16) for EXAMINE and DEPOSIT 2017-08-25 15:48:11 -07:00
Mark Pizzolato
b6f549ef18 SCP: Properly name registers when name might be a macro name 2017-06-23 12:33:58 -07:00
Mark Pizzolato
f404343b56 SCP: Make sure that SIMH version information is always available
include sim_rev.h in sim_defs.h
2017-06-23 04:24:54 -07:00
Mark Pizzolato
2c6c8f4ef8 SCP: Always invoke strlcpy, strlcat, strcasecmp and strcasencmp vs sim_ forms 2017-05-07 19:19:55 -07:00
Bob Supnik
3eb4598456 SCP: Removed KBD_WAIT and friends 2017-03-20 22:33:38 -07:00
Mark Pizzolato
14b9265af3 PDP11, VAX: Cleaned MSCP/TMSCP packet queues to be uint16 2017-03-12 19:06:46 -07:00
Mark Pizzolato
9d013e9b44 SCP: Fix asynchronous event queue updates without intrinsic instructions.
As discussed in #393
2017-03-09 07:55:21 -08:00
Mark Pizzolato
8882cebe27 SCP: Produce detailed message when REG names are ambiguous.
As discussed in #402 and #398
2017-02-14 14:20:09 -08:00
Mark Pizzolato
69d2ba5193 SCP: Avoid use of 64 bit integers in SCP when host doesn't support it
As mentioned for VAX in #394
2017-02-08 16:44:49 -08:00
Mark Pizzolato
692b9abe5f SCP: Add ability to descriptively name UNITs
This allows a device simulator to specifically name the units that it uses
for different purposes.  This info is visible in the output of SHOW QUEUE
and debug output.

Once specified or dynamically determined (as previously occurred with
each call to sim_uname()), that name is saved for fast delivery on subsequent
calls.  This will remove some overhead when running with debugging on.
2017-02-06 10:27:01 -08:00
Mark Pizzolato
8dcc8c0678 SCP: Add the ability to Fprintf to memory buffer 2017-01-23 10:25:06 -08:00
Mark Pizzolato
9851a36dd8 SCP: Fix Async I/O primitives operations for hosts without Intrinsic CAS 2017-01-10 23:40:25 -08:00
Mark Pizzolato
b800587f34 TIMER: Add calibrated ROM memory access support 2017-01-05 05:50:46 -08:00
Mark Pizzolato
aa82b57d10 TIMER: Fix various inconsistent timing behaviors
- Support for arbitrary long wait intervals in sim_activate_after with
   precisely correct delays aligned with the calibrated clock once
   per second.
- Proper handling of calls to sim_cancel for calibrated timer units
- Properly allow stopping of calibrated clock by calling sim_rtcn_calb
   with a ticksper == 0
- Only schedule asynchronous timer activities for delays longer than
   the minimal OS sleep time
- Only wake asynchronous timer thread to queue new timer events
   that are shorter than the currently shortest scheduled event
2016-12-26 12:42:25 -08:00
Mark Pizzolato
7c2d20f26f SCP: Make sim_cancel more efficient by stopping search as soon as canceled 2016-12-24 09:49:32 -08:00
Mark Pizzolato
7964e2b72d PDP8: Fix SHOW TTIX SUMMARY
It was defined in lowercase and has now been made upper case for consistency.
The code which performs the match also has been change to do a case
insensitive compare.
2016-12-17 13:38:22 -08:00
Mark Pizzolato
ae52f4c331 TIMER: Add correct sim_activate_time functionality for all timer cases.
Also:
- allow a timer to dynamically stop itself (by calling sim_rtcn_calb
   with tps=0), and then to start the internal timer to provide a calibration
   baseline if necessary.
- Fix coschedule interval computation when the queue is empty.
- Properly select the correct timer for coscheduling without a specific tmr
- Properly adjust the coschedule queue's next time value when entries are
   canceled.
- Cleaned up throttling to behave well with all potential throttling rates and
   to make visible what is happening when boundaries are reached.
2016-12-15 09:57:34 -08:00
Mark Pizzolato
89e372ba92 TIMER: Restore functionality for clocks devices that don't use sim_activate_after
Clock devices which call sim_register_clock_unit or sim_register_clock_unit_tmr
are best behaved if they use sim_activate_after to schedule their tick events.
2016-11-22 01:24:26 -08:00
Mark Pizzolato
f046171269 TIMER: Fix problem activation time for clock units 2016-11-20 13:06:41 -08:00