Commit graph

225 commits

Author SHA1 Message Date
Mark Pizzolato
96512043bd SCP: Fix UDATA initialization macro to include newly added UNIT member 2022-02-14 01:32:18 -08:00
Mark Pizzolato
315a07cbc7 SCP: Avoid writing out memory buffered devices on detach that haven't changed
As discussed in #1109
2022-02-13 22:50:37 -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
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
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
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
b2a63a5678 IMD: Remove need for -DUSE_SIM_IMD in preparation for wider use of sim_imd 2021-01-18 10:44:33 -08:00
Mark Pizzolato
ae825c9afb All: Declare sim_stop_messages as an array SCPE_BASE long
This avoids a potential invalid pointer dereference when formatting
the return value from sim_instr() if it is < SCPE_BASE but greater
than the previously defined static array size.sizeof

Update simh.doc to reflect this generic change.
2020-09-02 15:56:07 -07:00
Mark Pizzolato
f519513f50 SCP, HP2100, HP3000, I650: Move one time initialization activities to cpu_reset
The paradigm of using a "weak" linker reference to find what was
previously the vm_init_routine() doesn't work reliably on all compile
environments supported by the simulators.  This has been reported
in #794 and it came up again in #862.  This change assures that
it will not come up again AND it reliably solves the problem with
Visual Studio compilers (and linker) that randomly chooses whether
to have the desired effect or not.

Of the 82 simulators which are currently part of simh, only these
three used the sim_vm_init() interface, so removing it had relatively
minor impact.
2020-05-26 06:25:01 -07:00
Mark Pizzolato
049ba32505 DISK: Add robust disk container validation 2020-04-11 13:01:48 -07:00
Mark Pizzolato
73df9b1c4e PDP10, PDP11, Massbus VAXen, DISK: Rework PDP10 use of sim_disk
- Make all PDP11, VAX RP and RQ devices autosizing behave similarly
- Generalize the attach help to be specific to the device/system being
   attached
- Remove the sim_disk_pdp10_* calls which weren't correct or needed
   since sim_disk_attach_ex provides sector size which is used correctly
2020-04-03 17:32:14 -07:00
John Forecast
f8a369e6d4 TAPE: Add DOS11 tape support for dynamic tape containing local files 2020-04-02 10:20:47 -07:00
Mark Pizzolato
77edf89ef5 SCP: Add macro's to support packed structures for network traffic 2020-03-10 11:26:23 -07:00
Mark Pizzolato
4b45b04c29 SCP: Enable Runtime REGister entry validation and checking during build 2020-03-07 20:17:36 -08:00
Mark Pizzolato
b76fd3ed44 SCP: Preparing for dynamic testing of simulator REGister definitions at startup 2020-03-06 15:28:52 -08:00
Mark Pizzolato
964b177616 SCP: Fix potential hang during debug when asynchronous I/O is happening 2020-02-16 17:15:49 -08:00
Mark Pizzolato
8a858c181d SCP: Clean up WEAK definition and rework deprecated references to sim_vm_init
As discussed in #794
2020-01-29 12:30:25 -08:00
Mark Pizzolato
7581b92f9d SCP: Add a RUNLIMIT command to bound simulator execution time 2020-01-08 11:49:22 -08:00
Mark Pizzolato
c8f7315518 SCP: Change regular expression API from regex to pcre 2020-01-02 06:42:46 -08:00
Mark Pizzolato
714f0a445b SCP: Avoid broken regular expression APIs
If libpcreposix isn't available, we can't fall back to the local
regex.h since the default C runtime on Linux and OS/X implementations
of the regex functionality doesn't ever match regular expressions
with imbedded newlines.
2020-01-01 20:23:17 -08:00
Mark Pizzolato
f56753162b SCP: Add missing comment update to MTAB structure 2019-10-28 17:21:06 -07:00
Mark Pizzolato
47bac1f665 TAPE: Fix edge cases for AWS format tapes and default TAR block size
- Add more AWS test cases
- Add better position validation when scanning a tape image
- Properly clear SIGINT flag for interrupt during a tape attach
2019-06-29 07:39:23 -07:00
Mark Pizzolato
7bcf407fcc TIMER: Reorganize timer control variables to use a structure for each timer
The original approach had separate parallel arrays for each relevant
state variable for each calibrated timer.  That worked when there were
only a few state variables, the state info for a timer belongs in a
structure.
2019-06-08 13:55:49 -07:00
Mark Pizzolato
6b3bff56b3 DISK: Add support to properly autosize fixed sized disk from a set of choices
As discussed in #704
2019-05-21 15:38:39 -07:00
Mark Pizzolato
db26349bd7 TAPE: Add system specific ANSI tape formats VMS, RSX, RSTS and RT11
These formats are named ANSI-VMS, ANSI-RSX11, ANSI-RSTS and ANSI-RT11
2019-05-14 01:04:18 -07:00
Mark Pizzolato
4e0450cff9 SCP: Add support to uniquely identify SIGTERM in do procedures
As discussed in #681
2019-04-18 20:03:17 -07:00
Mark Pizzolato
0c39921fb7 TAPE: Full speed performance of tape image validation scan
- Force the detection point of a tape structure error to be the logical EOM
  on the tape.
- Enable SIGINT abort of a possibly long running validation scan
- Add -L detail record structure option at ATTACH time
- Add extra garbage at end of generated test data files
2019-04-16 18:20:25 -07:00
Mark Pizzolato
f12bc70470 TAPE: Add support for TAR tape format 2019-04-06 02:00:53 -07:00
Mark Pizzolato
e56b5f05e7 TAPE: Add support for AWS format tape images
Also added extended tape unit test code
2019-03-26 14:06:57 -07:00
Mark Pizzolato
75d18d4db0 SCP: Removed redundant SCPE_NOTATT which duplicates SCPE_UNATT 2019-02-01 16:07:12 -08:00
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