Commit graph

57 commits

Author SHA1 Message Date
Mark Pizzolato
f09e9c290a TAPE: Add tests and Coverity cleanups 2019-03-19 10:24:28 -07:00
Mark Pizzolato
cb9876ce65 SCP: Cleanup gcc compiler flagged potential issues
Compiler warnings about undeclared case fall throughs, and potential
buffer overruns,
2019-01-21 16:43:17 -08:00
Mark Pizzolato
3cca0cf90b SCP: Cleanup MinGW compile warnings 2019-01-21 02:36:42 -08:00
Mark Pizzolato
f8a18df1c4 SCP: Cleanup compiler warnings 2018-10-10 00:03:37 -07:00
Mark Pizzolato
f86a67310a SCP: Add missing aspects to sim_filepath_parts, move sim_dir_scan to sim_fio 2018-09-29 23:34:14 -07:00
Mark Pizzolato
a40d23fd53 SCP: Avoid warning on OS X which shouldn't be necessary 2018-09-28 19:06:29 -07:00
Mark Pizzolato
568a80dfb8 SCP: Add parsing of file specs in environment variables and DO command args. 2018-09-28 15:43:01 -07:00
Mark Pizzolato
f48c282dff SCP: Silence potential compiler warnings on Windows using GCC 2018-09-27 22:01:40 -07:00
Mark Pizzolato
91e4efbd59 SHMEM: Fix various Linux and Windows problems
- Windows did not validate that the a segment size was correct.
- Add shared memory object name to the management structure
- Linux shared memory object names must start with a /
- Linux umask setting to assign permissions
- Add textual explanations for failure cases
2018-07-21 02:20:47 -07:00
Mark Pizzolato
1a7412a276 FIO: Make shmem behaviors reflect 3.10
Current functionality works to some extent on Windows and x86 Linux and OS X
2018-06-05 01:39:41 -07:00
Mark Pizzolato
c1f249ec66 SCP: Add atomic routines for temporary shmem access 2018-06-01 23:16:14 -07:00
Mark Pizzolato
13b4f6563f FIO: Fix large file support on Linux AND Android platforms correctly
As discussed in #564
2018-05-15 06:50:27 -07:00
Mark Pizzolato
0aa4264261 FIO: Properly configure large file support for different Android versions 2018-05-09 11:08:53 -07:00
Mark Pizzolato
39802c465a makefile: Support mode Android versions when termux is used 2018-05-09 10:39:10 -07:00
Mark Pizzolato
669d07ba3e SCP: Fix compile WIN32 MinGW warnings 2018-03-07 13:20:14 -08:00
Mark Pizzolato
335b4ef210 DISK: Add support for reporting OS specific error messages when using RAW I/O 2018-02-27 13:32:20 -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
e522daf906 SCP: Replace stray TAB and fix sprintf format specifier 2017-04-23 23:43:14 -07:00
Mark Pizzolato
9179c4ea07 SCP: Fix OS Error text routine on Windows with gcc 2017-04-22 15:43:09 -07:00
Mark Pizzolato
6ff3eeac80 SCP: Compiler suggested cleanup 2017-04-10 10:47:42 -07:00
Mark Pizzolato
7317645dd7 SCP: Make COPY command more robust 2017-04-07 14:35:04 -07:00
Mark Pizzolato
d5a56e0ab4 SCP: Take care to only write to a socket a single time and when appropriate 2017-01-16 14:25:38 -08: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
ed2de2fcf2 FIO: Add LARGE_FILE support when building on Cygwin (from Don North). 2016-01-03 04:02:32 -08:00
Mark Pizzolato
cd799c9d3f makefile: dynamically determine if shm_open is available on the local system, Fix X11R7 library reference when available 2015-04-28 16:29:23 -07:00
Mark Pizzolato
a8087ac4cc SCP: Return write failure (write 0 bytes) if malloc fails in sim_fwrite on a big-endian host. Fix #204 2015-04-02 07:01:23 -07:00
Mark Pizzolato
590895bfe5 SCP: Added generic primitives to create named shared memory regions which can be used interprocess memory sharing
This is a basic starting point to create the memory regions.  At some point synchronization primitives will probably also be necessary.
2015-03-17 22:11:07 -07:00
Mark Pizzolato
33781be23b SCP: Added support fo set a fifo opened with sim_fopen() to be non-blocking. 2014-12-30 18:48:42 -08:00
Mark Pizzolato
437f86fb4a FIO: Removed sim_set_fsizeo since it is not currently used and it can't be compiled under MinGW 2014-09-17 14:17:34 -07:00
Mark Pizzolato
bc3582c194 SCP: Added sim_set_fsize and sim_set_fsizeo to sim_fio to support specific expanding or truncation of files. 2014-09-16 09:20:02 -07:00
Mark Pizzolato
651780c481 Remove stray tab characters which crept in over time 2013-06-03 06:29:01 -07:00
Mark Pizzolato
2bfaf46781 AIX Platform support 2013-05-23 11:33:36 -07:00
Mark Pizzolato
02b3477d20 Ensure correct Remote Console functionality when log files get big 2013-04-21 05:46:52 -07:00
Mark Pizzolato
958ce00b2e Provide a way to avoid building with large file support enabled via the compile time define of DONT_DO_LARGEFILE 2013-04-14 16:52:54 -07:00
Mark Pizzolato
3dd4121c78 Added Large File Support which was missing for NetBSD (and OpenBSD) hosts - reported by Felix Deichmann 2013-04-12 08:17:01 -07:00
Mark Pizzolato
0605b6dff4 Added support for building on Solaris with the Sun C compiler 2013-03-17 16:50:57 -07:00
Mark Pizzolato
4425241b78 OSX fix for recent sim_disk changes 2013-03-17 12:21:56 -07:00
Mark Pizzolato
2e5b0d54c6 Generalized the sim_disk layer to support large file disk devices (simh, VHD and RAW formats) with out requiring USE_ADDR64, and enhanced the pdp11_rq device to use this capability. 2013-03-17 12:02:43 -07:00
Mark Pizzolato
9bd8305943 Cleanup compiler warnings on Solaris and newer OSX clang compilers.
Add Large File support on Solaris
2013-03-13 20:29:03 -07:00
Mark Pizzolato
d5ca542102 Changed use of compile #defines which start with a _ character to not do this since defined symbols starting with _ are reserved to local compiler/runtime implementations in the C language. This addresses issue #32 2013-03-12 11:07:58 -07:00
Mark Pizzolato
eb101e3881 HP-UX port supplied by Mikulas Patocka 2013-03-05 13:29:38 -08:00
Mark Pizzolato
4ff56d6c15 Changed all internal #ifdef's which were conditional on __linux to be conditional on either __linux or __linux__. Some platforms (PPC) don't define __linux when gcc is invoked with -std=c99. 2013-02-20 21:57:02 -08:00
Mark Pizzolato
8440466cb9 Fixed display of large file support in SHOW VERSION and enhanced SHOW VERSION. 2013-02-18 05:53:59 -08:00
Mark Pizzolato
aaa5fb178a Added display of large file support status to SHOW VERSION 2013-02-17 04:52:54 -08:00
Mark Pizzolato
e1d1893834 Fixed concurrent write issue (discovered by Sergey Oboguev) which may happen if SIM_ASYNC_IO is enabled 2012-02-01 19:58:55 -08:00
Mark Pizzolato
aa7c50eb38 Compiler cleanup for issues noticed during x64 compiles 2012-01-17 04:09:34 -08:00
Mark Pizzolato
9e220f1138 Cleaned up VMS builds using various versions of the Dec/Compaq/HP C compilers 2011-06-04 04:29:00 -07:00
Mark Pizzolato
87c3e3452f Added Asynch I/O and Disk Support for various Disk formats
I’ve always wanted to have the option to have simulated devices behave
more naturally with respect to I/O operations.  By more naturally I
mean that the current simulator model I/O is either polled (for asynchronous
things link Muxes and Network), or it is performed in the middle of some
instruction execution taking possibly many milliseconds (disk and/or tapes).
The existing model creates quite deterministic behavior which helps to debug
and understand issues, but it trades off potential instruction execution
while performing these I/O operations in between instruction execution.

To address this concept (while still retaining the potential advantages of
the original model), I’ve designed an Asynch I/O model extension for simh.
In order to flesh-out and debug this design, I’ve also refactored several
devices to utilize this capability.  Please read the attached
0readmeAsynchIO.txt file for concept details about the approach.

In order to make disk devices easy to implement (within or without the
AsynchIO framework), I’ve created a sim_disk.c  library which is modeled
on the sim_tape.c library to generalize disk I/O like tape I/O is
generalized in sim_tape.c.  This sim_disk.c library now provides that
natural place to implement support for various disk implementation formats
(just like sim_tape support several formats, and one day will be the place
to add direct physical tape access). The current sim_disk library provides
the framework for direct support of 3 different disk formats:
    1) standard simh disk format
    2) platform specific physical disk access
and 3) platform independent Virtual Disk format.
The Virtual Disk format is an implementation of the format described in
the ”Microsoft Virtual Hard Disk (VHD) Image Format Specification”.  The
VHD specification is available for anyone to implement under the "Microsoft
Open Specification Promise" described at
http://www.microsoft.com/interop/osp/default.mspx.
The VHD implementation includes support for:
    1) Fixed sized disks
    2) Dynamically expanding disks
and 3) Differencing Disks.
Dynamically expanding disks don’t change their “Virtual Size”, but they
don’t consume disk space on the containing storage until the virtual
sectors in the disk are actually written to (i.e. an RA81 or RA92 VHD
with a VMS installed on it may initially only contain 30+ MB of files,
and the resulting VHD will be 30+ MB).  The VHD format contains meta data
which describes the virtual device.  Amongst this meta data is the simh
device type which the VHD was originally created as.  This metadata is
therefore available whenever that VHD is attached to an emulated disk
device in the future so the device type & size can be automatically be
configured.

Sim_disk_attach is used by device emulations to attach a simh/vhd/raw
device to a simulated device.  The following simh command switches
are used by the sim_disk_attach API:

    -R          Attach Read Only.
    -E          Must Exist (if not specified an attempt to create the
                indicated virtual disk will be attempted).
    -F          Open the indicated disk container in a specific format
                (default is to autodetect VHD defaulting to simh if the
                indicated container is not a VHD).
    -X          When creating a VHD, create a fixed sized VHD (vs a
                Dynamically expanding one).
    -C          Create a VHD and copy its contents from another disk
                (simh, VHD, or RAW format).
    -D          Create a Differencing VHD (relative to an already
                existing VHD disk)

Examples:

    sim> show rq
    RQ, address=20001468-2000146B*, no vector, 4 units
      RQ0, 159MB, not attached, write enabled, RD54, autosize, SIMH format
      RQ1, 159MB, not attached, write enabled, RD54, autosize, SIMH format
      RQ2, 159MB, not attached, write enabled, RD54, autosize, SIMH format
      RQ3, 409KB, not attached, write enabled, RX50, autosize, SIMH format
    sim> atta rq0 RA81.vhd
    sim> show rq0
    RQ0, 456MB, attached to RA81.vhd, write enabled, RA81, autosize, VHD format
    sim> set rq2 ra92
    sim> att rq2 -f vhd RA92.vhd
    RQ2: creating new file
    sim> sho rq2
    RQ2, 1505MB, attached to RA92.vhd, write enabled, RA92, autosize, VHD format
    sim> ! dir RA92.vhd
     Volume in drive H is New Volume
     Volume Serial Number is F8DE-510C

     Directory of H:\Data

    04/14/2011  12:57 PM             5,120 RA92.vhd
                   1 File(s)          5,120 bytes
                   0 Dir(s)   3,074,412,544 bytes free
    sim> atta rq3 -c RA92-1.vhd RA92.vhd
    sim> atta rq3 -c RA92-1.vhd RA92.vhd
    RQ3: creating new virtual disk 'RA92-1.vhd'
    RQ3: Copied 1505MB.  99% complete.
    RQ3: Copied 1505MB. Done.
    sim> sh rq3
    RQ3, 1505MB, attached to RA92-1.vhd, write enabled, RA92, autosize, VHD format
    sim>  ! dir RA92*
     Volume in drive H is New Volume
     Volume Serial Number is F8DE-510C

     Directory of H:\Data

    04/14/2011  01:12 PM             5,120 RA92-1.vhd
    04/14/2011  12:58 PM             5,120 RA92.vhd
                   2 File(s)         10,240 bytes
                   0 Dir(s)   3,074,404,352 bytes free
    sim> sho rq2
    RQ2, 1505MB, not attached, write enabled, RA92, autosize, VHD format
    sim> set rq2 ra81
    sim> set rq2 noauto
    sim> sho rq2
    RQ2, 456MB, not attached, write enabled, RA81, noautosize, VHD format
    sim> set rq2 format=simh
    sim> sho rq2
    RQ2, 456MB, not attached, write enabled, RA81, noautosize, SIMH format
    sim> atta rq2 -c RA81-Copy.vhd VMS055.dsk
    RQ2: creating new virtual disk 'RA81-Copy.vhd'
    RQ2: Copied 456MB.  99% complete.
    RQ2: Copied 456MB. Done.
    sim> sho rq2
    RQ2, 456MB, attached to RA81-Copy.vhd, write enabled, RA81, noautosize, VHD format
    sim> det rq2
    sim> ! dir RA81-Copy.vhd
     Volume in drive H is New Volume
     Volume Serial Number is F8DE-510C

     Directory of H:\Data

    04/14/2011  01:22 PM       178,304,512 RA81-Copy.vhd
                   1 File(s)    178,304,512 bytes
                   0 Dir(s)   2,896,097,280 bytes free
    sim> ! dir VMS055.dsk
     Volume in drive H is New Volume
     Volume Serial Number is F8DE-510C

     Directory of H:\Data

    03/08/2011  01:42 PM       403,663,872 VMS055.dsk
                   1 File(s)    403,663,872 bytes
                   0 Dir(s)   2,896,097,280 bytes free
    sim>
2011-04-15 08:49:18 -07:00
Bob Supnik
9c4779c061 Notes For V3.8
The makefile now works for Linux and most Unix's. Howevr, for Solaris
and MacOS, you must first export the OSTYPE environment variable:

> export OSTYPE
> make

Otherwise, you will get build errors.

1. New Features

1.1 3.8-0

1.1.1 SCP and Libraries

- BREAK, NOBREAK, and SHOW BREAK with no argument will set, clear, and
  show (respectively) a breakpoint at the current PC.

1.1.2 GRI

- Added support for the GRI-99 processor.

1.1.3 HP2100

- Added support for the BACI terminal interface.
- Added support for RTE OS/VMA/EMA, SIGNAL, VIS firmware extensions.

1.1.4 Nova

- Added support for 64KW memory (implemented in third-party CPU's).

1.1.5 PDP-11

- Added support for DC11, RC11, KE11A, KG11A.
- Added modem control support for DL11.
- Added ASCII character support for all 8b devices.

1.2 3.8-1

1.2.1 SCP and libraries

- Added capability to set line connection order for terminal multiplexers.

1.2.2 HP2100

- Added support for 12620A/12936A privileged interrupt fence.
- Added support for 12792C eight-channel asynchronous multiplexer.

2. Bugs Fixed

Please see the revision history on http://simh.trailing-edge.com or
in the source module sim_rev.h.
2011-04-15 08:35:54 -07:00
Bob Supnik
56a7d31770 Notes For V3.7
1. New Features

1.1 3.7-0

1.1.1 SCP

- Added SET THROTTLE and SET NOTHROTTLE commands to regulate simulator
  execution rate and host resource utilization.
- Added idle support (based on work by Mark Pizzolato).
- Added -e to control error processing in nested DO commands (from
  Dave Bryan).

1.1.2 HP2100

- Added Double Integer instructions, 1000-F CPU, and Floating Point
  Processor (from Dave Bryan).
- Added 2114 and 2115 CPUs, 12607B and 12578A DMA controllers, and
  21xx binary loader protection (from Dave Bryan).

1.1.3 Interdata

- Added SET IDLE and SET NOIDLE commands to idle the simulator in wait
  state.

1.1.4 PDP-11

- Added SET IDLE and SET NOIDLE commands to idle the simulator in wait
  state (WAIT instruction executed).
- Added TA11/TU60 cassette support.

1.1.5 PDP-8

- Added SET IDLE and SET NOIDLE commands to idle the simulator in wait
  state (keyboard poll loop or jump-to-self).
- Added TA8E/TU60 cassette support.

1.1.6 PDP-1

- Added support for 16-channel sequence break system.
- Added support for PDP-1D extended features and timesharing clock.
- Added support for Type 630 data communications subsystem.

1.1.6 PDP-4/7/9/15

- Added SET IDLE and SET NOIDLE commands to idle the simulator in wait
  state (keyboard poll loop or jump-to-self).

1.1.7 VAX, VAX780

- Added SET IDLE and SET NOIDLE commands to idle the simulator in wait
  state (more than 200 cycles at IPL's 0, 1, or 3 in kernel mode).

1.1.8 PDP-10

- Added SET IDLE and SET NOIDLE commands to idle the simulator in wait
  state (operating system dependent).
- Added CD20 (CD11) support.

2. Bugs Fixed

Please see the revision history on http://simh.trailing-edge.com or
in the source module sim_rev.h.
2011-04-15 08:35:37 -07:00