1
0
mirror of https://github.com/simh/simh.git synced 2026-01-13 15:27:14 +00:00

245 Commits

Author SHA1 Message Date
Peter Schorn
f98156842a AltairZ80: Remove MetroWerks support for Macintosh OS 9 2023-04-05 08:36:55 -10:00
Mark Pizzolato
194b313179 SCP: Fold up include files used by all simulators
- Add common system includes used in may places which are allowed
  and thus added directly in sim_defs.h.
- Separate completely private system data structures and system APIs
  for use only by SCP library routines into sim_scp_private.h.
2023-03-04 17:51:49 -10:00
Mark Pizzolato
a79c583053 TMXR: Remove all SIM_ASYNCH_MUX dependent code
Asynchronous MUX functionality was added long ago and never completely
tested and thus never completed and never actually used.

All of what it was supposed to achieve was independently achieved when
bit rate speed functionality was added.
2023-01-21 09:12:45 -10:00
Mark Pizzolato
700ac6719d SCP: Assure only 5 UNIT fields can be initialized beyond the UDATA macro
The simh v3 UNIT structure only provided UNIT fields wait, u3, u4, u5 and u6
available for static initialization beyond what is provided by the UDATA
macro.  This change assures that here as well.

If a simulator developer needs to initialize UNIT fields beyond what is
available here and via the UDATA macro, then explicit code usually in
the DEVICE reset routine should be used to initialize those fields.

Fix the CDC1700 simulator which statically initialized additional UNIT fields.
2023-01-05 15:09:55 -10:00
Mark Pizzolato
2c7f44d9f7 TAPE: Add support for reading partial fixed sized records.
Partial reading is needed to properly read common archive images found
on bitsavers and elsewhere which were made from QIC devices which must
read multiples of 512 bytes at a time.
2022-11-07 10:46:15 -10:00
Mark Pizzolato
ffae9ae245 SCP: Add more robust register checking to avoid out of bounds array references 2022-09-21 08:44:43 -07:00
J. David Bryan
5ded4f2ccb SCP: Fix CRDATA REG macro size information 2022-08-14 17:17:48 -10:00
J. David Bryan
0c714be8a5 SCP: Fix details missed when merging update REGister macros from v3.12-2 2022-08-14 12:19:59 -10:00
Mark Pizzolato
107813b11b SCP: Change sim_abort to SIM_SCP_ABORT macro.
SIM_SCP_ABORT is ONLY for use in scp support libraries
2022-07-30 11:18:08 -10:00
Mark Pizzolato
0e79fbcc70 All simulator DEVICES using VIDEO: Set DEV_DISPLAY in the DEVICE flags 2022-07-24 11:37:39 -10:00
Mark Pizzolato
bc98e1c609 SCP: Be sure to flush output files when aborting.
Emit a last gasp message prior to flushing files before aborting.
2022-07-17 13:01:25 -10:00
Mark Pizzolato
a6f9d02cff SCP: Reword ambiguous REGister message to more easily locate source
Add source and line reference to REG macros.
2022-07-07 08:11:37 -10:00
Mark Pizzolato
99524be9df SCP: Add missing SRDATA REGister macro and a unit test for it
- The SRDATA macro wasn't used anywhere in the codebase, so it got missed.
- Extend RegisterSanityCheck logic to detect ambiguously named REGisters
2022-07-06 18:40:13 -07:00
Mark Pizzolato
3aa8b5da91 SCP: Extend Logical Name functionality to units as well as devices
Display of devices and units prefers logical names but accepts both
2022-07-01 09:13:46 -10:00
Mark Pizzolato
bc99d6d5de SCP: Updated REG manipulation APIs and REGister sanity checks for all macros
- bounds check accesses in get_rval and put_rval for circular registers
- extend unit tests for REGister sanity checks to include all macros
- add sanity checks for new REGister macros
2022-06-26 14:39:25 -07:00
J. David Bryan
72196b08bb SCP: Updated REG macros and manipulation APIs
- Rewrote get_rval, put_rval to support fields within arrays of structures
- REG "size" field now determines access size
- REG "maxval" field now determines maximum allowed value

Merge from v3.12
2022-06-24 15:39:45 -07:00
Bob Supnik
c55139c0a8 I1620, I1401: Add max value to address registers 2022-06-16 16:13:46 -07:00
Mark Pizzolato
a9ce7b3b11 PDP11 and VAXen: Fix transfer buffer unintended deallocation on RQ detach
As reported in https://github.com/open-simh/simh/issues/12
2022-06-15 15:51:19 -07:00
Mark Pizzolato
50b969e519 DISK, SCSI: Add framework of support for different device sharing of containers
- More robust and reasonable behaviors when NOAUTOSIZE is enabled
- Repair/extension of disk metadata when AUTOSIZE is enabled
- MediaID support when device presents it
- Automatic MTAB generation when DEVICE provides a DRVTYPE list
2022-06-15 15:51:19 -07:00
Mark Pizzolato
8628baf18b SCP: Add support for optional device unit tests
Some simulators and/or devices may want to provide specific testing
activities outside of full simulator execution which often will require
external, potentially complicated setup.
2022-05-12 13:14:01 -07:00
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