Commit graph

790 commits

Author SHA1 Message Date
Mark Pizzolato
034e749fce Added SET ASYNCH and SET NOASYNCH commands to dynamically enable or disable Asynchronous I/O support 2011-09-25 08:16:40 -07:00
Mark Pizzolato
6e098021c2 Documented current state of sim_ether, etc. and included references for new OpenVMS Integrety (IA64) support. 2011-09-25 08:14:58 -07:00
Mark Pizzolato
0705a6b468 Fixed typo in VAX730 build 2011-09-24 06:26:25 -07:00
Mark Pizzolato
e410733781 fixed makefile to correctly use readline on x64 Linux builds which have libreadline available 2011-09-23 16:26:00 -07:00
Mark Pizzolato
a6b8d63f10 Merge of VAX 11/730 Simulator from Matt Burke 2011-09-23 16:21:03 -07:00
Mark Pizzolato
cb35f6c97b Added support for embedded ROM images in simulators.
This allows a single simulator executable to be a completely useful component (for those simulators which dynamically load ROM or other boot code).
Meanwhile, we continues to allow the explicit use of a user's preferred ROM or other boot code as well.
A build option is provided in the makefile to not build with the included ROM functionality if desired.
2011-09-23 13:28:38 -07:00
Mark Pizzolato
312bc9a967 Added signal catching of SIGHUP and SIGTERM to cause simulator STOP. This will facilitate running a simulator as a 'service' on *nix platforms, given a sufficiently flexible simulator .ini file. 2011-09-22 14:43:42 -07:00
Mark Pizzolato
e70278eabf VAX: Fixed idle conditions for various versions of Ultrix, Quasijarus-4.3BSD, NetBSD and OpenBSD.
Note: Since NetBSD and OpenBSD are still actively developed operating systems, new versions of
these OSes are moving targets with regard to providing idle detection.  At this time, recent versions
of OpenBSD have veered from the traditional OS idle approach taken in the other BSD derived OSes.
Determining a reasonable idle detection pattern does not seem possible for these versions.
2011-09-21 07:13:35 -07:00
Mark Pizzolato
a280dd2b1f Added Readline build support on more *nix platforms 2011-09-19 17:08:35 -07:00
Mark Pizzolato
5151c341a4 Fixed *nix build support on x64 platforms 2011-09-19 16:38:58 -07:00
Mark Pizzolato
49597cc0d3 Added makefile build support for detecting libpthreads on x64 *nix platforms. 2011-09-19 16:33:14 -07:00
Mark Pizzolato
f1b638749f Added display of the measured sleep resolution to sim_show_idle and a call to sim_show_idle from the VAX cpu_show_idle routine. 2011-09-19 14:49:45 -07:00
Mark Pizzolato
b36370413f Merge branch 'master' of github.com:markpizz/simh 2011-09-14 08:51:09 -07:00
Mark Pizzolato
573f7bce0b Minor compile message cleanup 2011-09-14 08:47:59 -07:00
Mark Pizzolato
706e07a746 Fixed from Sergey Oboguev relating to XU and XQ Auto Config issues with vector assignments. 2011-08-17 16:36:02 -07:00
Mark Pizzolato
3a61487a2d Cleaned up payload length determination. 2011-08-13 10:29:44 -07:00
Mark Pizzolato
015f2bb82e Fixed race condition detecting reflections when threaded reading and writing is enabled.
Fixed handling of Jumbo Packets and LSO (Large Send Offload) behaviorst to:
1) Avoid truncation of very large sends
2) handle the case where the host network stack may not populate the IP header length for a large send.
2011-08-12 17:53:32 -07:00
Mark Pizzolato
724cdfcfb1 Fixed DESCRIP.MMS for clean building on IA64 platforms. 2011-06-12 16:23:01 -07: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
89a27e0816 pdp11_vh.c: - Added debugging support to trace register, interrupt
and data traffic (SET VH DEBUG[=REG;INT;XMT;RCV])
                 -  Added SET LOG and SET NOLOG support for logging mux
                    traffic
                 -  Fixed SET VH LINES=n to correctly adjust the number
                    of lines available to be 8, 16, 24, or 32.
                 -  Fixed performance issue avoiding redundant polling in unit
                    service routine (removed 75% of polling overhead)

pdp11_dz.c:      -  Added debugging support to trace register, interrupt
                    and data traffic (SET VH DEBUG[=REG;INT;XMT;RCV])
2011-06-03 09:27:27 -07:00
Mark Pizzolato
338ad5147b Extend help text for SET CONSOLE to describe all of the settable console options 2011-06-03 09:25:49 -07:00
Mark Pizzolato
b3cb2791a5 Added telnet Option Negotiation Debugging support
Fixed telnet option negotiation loop with some telnet clients (Binary Mode).
2011-06-02 08:57:20 -07:00
Mark Pizzolato
d32b3a0f6d Added idle support when sitting at the >>> prompt in the console ROM 2011-06-02 08:37:17 -07:00
Mark Pizzolato
31bf337ded Fix sim_debug to display actual instruction count. 2011-06-01 09:23:14 -07:00
Mark Pizzolato
14a88e4fd4 Make sure that VAX/vmb.exe is included in the git repository 2011-06-01 09:10:13 -07:00
Mark Pizzolato
f7b53a5fe9 Fixed sim_idle to account for a reasonable number of cycles which have passed when an asynchrnous event terminated the idle wait.
Also corrected the text of a printf which described the units of the asynch latency variable as nano seconds instead of microseconds.
2011-04-22 05:47:26 -07:00
Mark Pizzolato
049540aa20 Removed sim_console_old.c and sim_tmxr_old.c since the original files are available directly in the repository history. 2011-04-21 13:19:27 -07:00
Mark Pizzolato
d8e4a43f9a makefile: Cleaned up MinGw build and provided an option to build without Asynch I/O support using MinGw. 2011-04-20 15:18:37 -07:00
Mark Pizzolato
599c471eb4 ibm1130 - Compiler cleanup 2011-04-20 15:10:48 -07:00
Mark Pizzolato
2532ff4fac Remove ECLIPSE from the VAX build since it requires 64b and move the presumed location of PCAP-VMS up one directory level.
This is being done so that it is not entangled with the rest of
the simh sources and is at the same level presumed for the Windows
pcap components presumed in the Visual Studio Projects.

The PCAP-VMS components are presumed (by this procedure) to be located
in a directory at the same level as the directory containing the
simh source files.  For example, if these exist here:

  []descrip.mms
  []scp.c
  etc.

Then the following should exist:

  [-.PCAP-VMS]BUILD_ALL.COM
  [-.PCAP-VMS.PCAP-VCI]
  [-.PCAP-VMS.PCAPVCM]
  etc.
2011-04-20 12:44:01 -07:00
Mark Pizzolato
db99885bfe scp - Added expansion of %STATUS% and %TSTATUS% in do command
arguments.  STATUS is the numeric value of the last
        command error status and TSTATUS is the text message
        relating to the last command error status
2011-04-20 11:11:22 -07:00
Mark Pizzolato
7dfe732667 pdp11_xq Fixed save/restore behavior
Fixed missing information from save/restore which
caused operations to not complete correctly after
a restore until the OS reset the controller.
2011-04-20 06:06:33 -07:00
Mark Pizzolato
e3d3544f4d Changed sim_rest to defer attaching devices until after device register contents have been restored.
This is needed since an attach operation may behave differently depending on the state of other variables.
2011-04-19 16:28:59 -07:00
Mark Pizzolato
3e4185b1b1 pdp11_xq - Changed default to disable polling when Asynch I/O is available 2011-04-19 16:20:24 -07:00
Mark Pizzolato
d81365b7af Compile cleanups.
i1620_sys.c - fixed printf calls without a format argument.
ibm1130_cr.c - fixed printf calls without a format argument.
scp.c - corrected argument types
vax780_sbi.c - corrected argument types
vax_sysdev.c - corrected argument types
pdp11_tu.c - Fixed t_addr printouts for 64b big-endian systems
sim_console.c - fixed formats to consistently print file names
2011-04-19 16:18:26 -07:00
Mark Pizzolato
d8f55a652b Cleaned up filename cases to be consistent for cross platform builds 2011-04-19 16:02:45 -07:00
Mark Pizzolato
5da9566b43 Fixed missing void declaration 2011-04-18 16:23:23 -07:00
Mark Pizzolato
77ce0c7ceb Idle enabled state should persist across a save/restore 2011-04-18 16:08:41 -07:00
Mark Pizzolato
b577841d03 Fixed bug with self loopback packets in multithreaded environments 2011-04-18 16:07:23 -07:00
Mark Pizzolato
bafbba4df8 Fixed bug with shared log file references 2011-04-18 16:06:19 -07:00
Mark Pizzolato
94ad4e303f Cleaned up to support running in a background/detached process 2011-04-17 15:29:35 -07:00
Mark Pizzolato
2247e52be1 Enriched .gitignore to avoid testing/working files 2011-04-17 15:28:46 -07:00
Mark Pizzolato
fe8b1f06de Merge branch 'FastAsynchIO' into simhv38-2-rc2
Conflicts:
	PDP11/pdp11_tq.c
	PDP11/pdp11_ts.c
	PDP11/pdp11_xq.h
	VAX/vax780_sbi.c
	VAX/vax_cpu.c
	makefile
	scp.c
	sim_defs.h
	sim_ether.c
	sim_timer.c
2011-04-15 10:47:35 -07:00
Mark Pizzolato
87157dc737 Merge branch 'BufferedConsole' into simhv3.8-2.rc2
Conflicts:
	scp.c
	sim_console.c
	sim_tmxr.c
2011-04-15 09:22:37 -07:00
Mark Pizzolato
8eb9caff10 Merge branch 'ControlFlow' into simv3.8-2-rc2
Conflicts:
	scp.c
2011-04-15 09:19:29 -07:00
Mark Pizzolato
4ca8935d60 Revised VMS build (descrip.mms) and makefile
Revised VMS build to include new simulators and resolve other build issues

    Added AsyncIO support
    Fixed support for clean operation on VAX, AXP and IA64 and various VMS versions.

Cleaned up makefile to properly detect pcap and readline and cleanly build on all supported platforms which use the makefile:

   X86 (mix of 32bit & 64bit) gcc:
                                Linux
                                NetBSD
                                OpenBSD
                                FreeBSD
                                Solaris
                                OSX
   Sparc(big endian) gcc:
                                Linux
                                Solaris
2011-04-15 09:11:32 -07:00
Mark Pizzolato
a6964f849d Cleaned up parameter declarations in all simulators to achieve clean compiles on all platforms
Very minor in all cases, but the strange case of swtp_cpu.c
This module used expressions of the form:
   PC = ++PC & ADDRMASK;
Officially, the C language says that expressions which modify the same variable in more than one place have undefined behavior.
These were changed to the legal form which performs the desired action:
   PC = (PC + 1) & ADDRMASK;
2011-04-15 09:04:39 -07:00
Mark Pizzolato
eb514e2a8d Merged in new ethernet code to potentially leverage AsynchIO 2011-04-15 08:53:01 -07:00
Mark Pizzolato
a1930c9b05 Added Visual Studio Projects for VS2008 and VS2010 2011-04-15 08:51:11 -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