Commit graph

2930 commits

Author SHA1 Message Date
Mark Pizzolato
15e86fb4ed SCP, DISK: Fix Coverity identified debug path null pointer dereferences 2018-04-17 23:51:39 -07:00
Mark Pizzolato
309598e2cd SCP: Fix declaration duplications and indentation issues 2018-04-16 16:57:06 -07:00
Mark Pizzolato
adedce8556 SCP: Add quoted string argument to SET ENV otherwise trim whitespace
Previously, unexpected values might end up being set when using SET ENV
if there were trailing whitespace on the line being parsed.  Any such white
space is now explicitly trimmed before the environment variable is set.
Once we do that, we need to provide a way to deliberately set an environment
variable with trailing spaces.  This is now achieved by using a quoted string
value specified as:

    SET ENV -S var="value  "

The quotes are removed prior to setting the environment variable value.
The contents of the quoted string are parsed the same as EXPECT and SEND
arguments.
2018-04-16 13:52:54 -07:00
Mark Pizzolato
c8beee2d0f doc: Clarify details in "Writing a Simulator for the SIMH System" 2018-04-15 12:53:29 -07:00
Mark Pizzolato
fdd9d87f80 SCP: Fix MinGW build warnings due to sizeof time_t 2018-04-15 12:51:36 -07:00
Seth Morabito
afffe300ee 3b2: Fix minor MMU paging bug
On a full cache miss, the MMU should only bring a page
descriptor into cache if the segment descriptor does NOT
have the 'contiguous' bit set.
2018-04-13 13:42:30 -07:00
Mark Pizzolato
ca77941ce0 doc: Update documents for RQ and TQ unit plug value setting 2018-04-12 20:21:37 -07:00
Mark Pizzolato
1741ae29fa PDP11, VAX: Add MSCP Media ID encoding/decoding details (Johnny Billquist) 2018-04-12 14:02:27 -07:00
Mark Pizzolato
5a9263c0cf PDP11, VAX: Add settable unit numbers for TQ drives 2018-04-12 13:15:48 -07:00
Seth Morabito
bd621f50bf 3b2: Call tmxr routines in IU reset
Previously, tmxr_set_line_unit() and tmxr_set_line_output_unit()
were being called in the attach routine. These probably belong
in the reset routine instead.
2018-04-11 18:38:59 -07:00
Seth Morabito
a7d0d4a6e7 3b2: CIO feature card framework
Adds a skeleton framework for CIO ("Common I/O") feature cards. The
first feature card to be implemented will be the "PORTS" serial MUX.

Part of this support involved reworking IRQ handling in the CPU. It
now respects both IRQ Vector and IPL.

This change also removes all 'assert(0)' calls from the simulator and
replaces them with generic "Simulator Error" halts. These should only
happen if there's a genuine logic error lurking somewhere.
2018-04-11 18:19:31 -07:00
Seth Morabito
05ba8c4d2c 3b2: Silence warning on Windows 2018-04-11 14:42:56 -07:00
Seth Morabito
177be95e5d 3b2: Refactor DUART and DMA
This change is a major refactor of how DMA and the DUART interact.

DMA implementation can now be overridden by individual devices that
require DMA. Disk and Floppy both continue to use a generic DMA
implementation, but the DUART code replaces the generic DMA with its
own implementation that correctly rate-limits TX. Among other things,
this allows the simulator to work correctly with real serial
terminals. This functionality has been tested on an AT&T 5620 "Blit"
terminal, which can run the 'layers' windowing software from the
simulator.
2018-04-11 14:24:48 -07:00
Mark Pizzolato
da31dfa7a9 SCP: Extend EXAMINE <dev> STATE to display elements of arrayed registers 2018-04-11 04:21:17 -07:00
Mark Pizzolato
d6a5268d97 DISK: Properly open in RAW mode on *nix 2018-04-11 04:20:17 -07:00
Mark Pizzolato
5a18d31449 PDP11, VAX: Add settable unit numbers for RQ drives 2018-04-11 03:12:12 -07:00
Mark Pizzolato
8bec55b976 DISK: Properly fail an attempt to access to a non-existent file in raw mode 2018-04-10 11:45:22 -07:00
Mark Pizzolato
6667f651a3 DISK: Add explicit AUTO detect disk format mode 2018-04-10 11:43:43 -07:00
Mark Pizzolato
d356274d38 PDP10: Fix build warning when compiling DZ module 2018-04-10 10:24:49 -07:00
Mark Pizzolato
cc7721b96e PDP11: Allow DZ devices Unibus and Qbus to have correct number of lines 2018-04-09 18:05:53 -07:00
Mark Pizzolato
114a29bc2f SCP: Add PCRE version to SHOW VERSION output 2018-04-08 17:13:54 -07:00
Mark Pizzolato
1d22b488a9 PDP11: Add new debug API support to VT11 device, fix broken build 2018-04-07 22:30:59 -07:00
Mark Pizzolato
6263378df4 DISK: Change auto disk format open logic to include RAW
Previously auto format detection first attempted a VHD open.  If that
failed, it falls back to a SIMH open which uses C RTL fopen, fread, fwrite
and fclose.  Now a RAW format open is attempted which will often
succeed, not only on CDROM devices, but most normal files can also
be opened in RAW mode which will to direct OS I/O (open, erad, write
and close or CreateFile, ReadFile, WriteFile, CloseHandle).

As discussed in #533
2018-04-07 22:15:14 -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
81bcd6d319 CONSOLE/SERIAL: Properly rate limit output to console port
When the console is connected to a serial port or telnet sessions enable
speed setting, the bits being output are now paced a the desired speed.
Multi-line mux I/O is also correctly rate limited on all lines.

This should address the problems described in #545
2018-04-06 04:12:38 -07:00
Mark Pizzolato
a47c04bcac TIMER: Fix throttle startup delay check 2018-04-06 02:20:29 -07:00
Mark Pizzolato
2bcb60e76f TIMER: Add external initialization option for clock calibration
Clock calibration normally takes several seconds to zero in on somewhat
accurate values for reasonable synchronization of simulated time to wall
clock time.  Often this doesn't matter one way or another.  However,
one thing which requires somewhat accurate clock calibration is the
pacing of output to serial ports on the host system.  Pacing happens
at the configured bits per second rates as long as the simulators
instruction execution rate has been reasonably calibrated with respect
to wall clock time.  A given host system will most likely simulate
instructions at the same rate from one run to the next, so running a
simulator for a little while and then examining the execution rate with
the SHOW CLOCK command can provide knowledge about the calibrated
execution rate which can be used to start a future simulator's execution
with a very good estimate of what the ultimate calibrated rate will be.
If the SHOW CLOCK shows simulator execution at 120,000,000 instructions
per second, and the simulated system has a simulated clock that runs at
60 hz, then the pre-calibrated values can be set with these commands:

    sim> DEPOSIT INT-CLOCK TICK_SIZE_0 2000000
    sim> DEPOSIT INT-CLOCK TICK_RATE_0 60
    sim> DEPOSIT INT-CLOCK INTERNAL_TICK_SIZE 12000000

The INTERNAL_TIMER runs in the background whenever the simulator
doesn't have a calibrated timer running.  It runs at 10 Hz.
2018-04-06 01:46:44 -07:00
Mark Pizzolato
95f5a1c371 TMXR: Properly display serial configuration and allow unconfigured serial ports 2018-04-05 21:14:56 -07:00
Seth Morabito
40877838ad 3b2: Silence warning in Windows build 2018-04-05 17:24:47 -07:00
Seth Morabito
a9f9b3abd1 3b2: Refactor MMU and fix two bugs
- Add "SHOW STACK" support to CPU
- An off-by-one error in checking SDT length was fixed.
- not-present co-processor R/W should not set Bus timeout bit
2018-04-05 17:12:45 -07:00
Mark Pizzolato
317e2a8e54 TIMER: make sim_activate_after use coscheduling whenever possible.
Previously, only long delays that would transition the next clock
calibration would be coscheduled unless an explicit timer was
specified to coschedule with.

This may help with the problem discussed in #508
2018-04-03 02:06:14 -07:00
Mark Pizzolato
d7b1707b45 TMXR: Properly set transmit wait time when speed changes are made.
- Display Input, Output and Connection Polling units properly.
2018-04-02 13:30:38 -07:00
Mark Pizzolato
daf0d953b1 SCP: Adjust relative debug base time to reflect GMT offset 2018-04-02 13:21:01 -07:00
Mark Pizzolato
e7e1a9cc2c VAX750: Avoid unit array overrun during TU58 init when only 1 unit exists.
As discussed in #546
2018-04-02 09:38:27 -07:00
Mark Pizzolato
a92dc610a4 alpha, pdp18b, PDP8, sigma: removed stray tabs which crept in over time. 2018-04-01 14:22:30 -07:00
Mark Pizzolato
dcf746a72a SERIAL: Add advice message when no serial ports are found in SHOW SERIAL 2018-04-01 12:37:48 -07:00
Mark Pizzolato
e7090e784e SCP: Add support to compare file contents with IF -F "file1" == "file2" 2018-03-31 23:50:37 -07:00
Seth Morabito
557dcc91e9 3b2: Fix stack bounds checking bug 2018-03-31 18:46:44 -07:00
Mark Pizzolato
b0ff29781b SCP: Add git commit time support for older git versions 2018-03-29 21:12:44 -07:00
Mark Pizzolato
6bfad051a8 I7000, B5500: Make sure card reader devices always perform read-only.file opens 2018-03-25 18:09:48 -07:00
Mark Pizzolato
0b209d2383 SCP: Allow UNIT_RO flag bit to be static when UNIT_ROABLE isn't present. 2018-03-25 18:09:07 -07:00
Mark Pizzolato
9111a1a645 Visual Studio Projects: Fix git-commit-id.h version check 2018-03-25 12:33:13 -07:00
Roberto Sancho Villa
cdfe35202b i650: New IBM 650 Simulator 2018-03-25 10:38:48 -07:00
Roberto Sancho Villa
2eb49c13b7 i650: New IBM 650 Simulator 2018-03-25 10:17:35 -07:00
Tony Nicholson
ceb54e5ff7 AltairZ80: Set conditional under CYGWIN so the SIMH device works
Under CYGWIN the conditional tests in the altairz80_sio.c source file for the
SIMH pseudo device's getHostsFilenamesCmd and resetSIMHInterfaceCmd
functions need to have UNIX_PLATFORM set to 1 - otherwise they do nothing!
With this fix, the HDIR host command from CP/M now displays a list of files
in host system's current directory under CYGWIN.
2018-03-23 15:25:59 -07:00
Mark Pizzolato
94727159e8 Visual Studio Projects: Cleanup Windows-Binaries procedure for new commit id
- New Commit-Id with Commit-Time
- Properly execute when the Win32-Development-Binaries needs to be cloned
- Properly limit parallel builds if the local system has more than 8 Threads
2018-03-20 22:29:02 -07:00
Mark Pizzolato
3f7f92682d TMXR, SERIAL: Properly set serial port speed on attach. 2018-03-20 20:52:26 -07:00
Seth Morabito
054e8e56c1 3b2: Fix compiler warnings 2018-03-20 17:42:37 -07:00
Mark Pizzolato
d0004b20aa SCP: Compiler const warning cleanup 2018-03-20 13:01:18 -07:00
Mark Pizzolato
4894b84ebd PUNCH: Add new file switch information to punch help 2018-03-20 12:50:43 -07:00