Commit graph

120 commits

Author SHA1 Message Date
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
820d77ef69 GRI, I1401, PDP10, SDS: Fix compiler detected inconsistencies 2016-05-05 03:50:21 -07:00
Ray Jewhurst
5433561314 PDP-10: added register descriptions 2016-04-10 23:25:06 -07:00
Mark Pizzolato
92fe35fb9c PDP10: Fix nested indirect address limit exceeded (from Bob Supnik)
If the nested indirect/execute limit (INDMAX, XCTMAX) is set to 0, the simulator will loop indefinitely in an indirect address or execute loop, testing for interrupts before each memory reference. Thus, on an infinite loop, the simulator will never complete the instruction, but the instruction is interruptible. So for example, under TOPS-10:

.r ddt
1/    0    jrstf @1
1$g
^C
^C
.

The JRSTF will never finish, but it can be interrupted by any device, and double ^C will return control to the command line.

If INDMAX or XCTMAX is non-zero, the previous behavior of limiting loops to a specific depth is retained. However, the default value is now 0.

This closes issue #218.

Conflicts:
	doc/pdp10_doc.doc
2016-02-19 12:28:56 -08:00
Mark Pizzolato
de0d251c75 TIMER, SCP: Change the sim_activate_after APIs to pass the delay value as uint32.
Also change all sim_defs.h structure declarations and references of sim_
structures to use the typedef names everywhere.
2015-12-10 06:33:59 -08:00
Mark Pizzolato
ed57f061e2 All VAX: Always return the correct Qbus/Unibus interrupt vector bits for all devices. Fix #239
Vector values contained in device information blocks are the true bus relative vector values.  CPU specific biased vector values are produced by the respective vector fetching logic and vector values are limited to 9 bits with <1:0> = 0 as specified in both the Unibus and Qbus documents.
2015-10-08 04:43:21 -07:00
Mark Pizzolato
041c866d67 PDP10: Added DEUNA/DELUA support back since there exists software which actually supported it.
The code which used it provides some IP packet transport: ftp://ftp.stacken.kth.se/pub/pdp10/tops10/util/
2015-04-26 15:04:01 -07:00
Mark Pizzolato
41978eca80 All: Convert from C runtime library perror() to sim_perror so that all messages will arrive in the same place(s). 2015-04-03 19:56:37 -07:00
Mark Pizzolato
f081ddf9aa PDP10: Make file position settings consistently use sim_ftell() instead of ftell(). 2015-04-02 10:02:00 -07:00
Mark Pizzolato
66dba79418 ALPHA, ALTAIR, AltairZ80, I7094, NOVA, PDP1, PDP10, PDP11, PDP18B, PDP8, SAGE, sigma, swtp6800, TX-0, VAX: Change tabs to spaces which had crept in over time 2015-03-30 10:24:24 -07:00
Mark Pizzolato
e768629009 SCP: Added the capability for EXAMINE command output to be written directly to a socket. 2015-02-21 12:40:36 -08:00
Mark Pizzolato
ef9d1adce1 PDP10, PDP11, VAX: const cleanup 2015-02-13 06:18:24 -08:00
Mark Pizzolato
c548b34772 Compiler suggested cleanups. 2014-10-27 17:14:28 -07:00
Mark Pizzolato
2e1167d4a0 Compiler suggested cleanups - mostly const fixups 2014-10-26 17:06:24 -07:00
Mark Pizzolato
611a7e94f0 SCP: Added a Remote Console Master Mode.
This capability will allow a GDB RSB stub to be created to support dynamic debugging of code running in a simulator.

This capability will also allow a complete front panel emulation system to operate a simulator.

This capability is engaged in a simulator by:
     sim> set remote telnet=remoteconsoleport#
     sim> set console telnet=consoleport#
     sim> set remote master

Master mode will provide a TCP session which accepts SCP commands that allow full control of the simulator.
2014-10-26 15:15:31 -07:00
Mark Pizzolato
4dbac410da SCP: Added const declarations to various APIs to reflect the appropriate usage. Moved parameter values for run_cmd and exdep_cmd to scp.h 2014-10-26 14:52:22 -07:00
Mark Pizzolato
995ab8f1e2 More General cleanup migrate to using sim_printf vs separate calls to printf and fprintf(sim_log). 2014-10-24 14:37:37 -07:00
Mark Pizzolato
3256c10c77 General cleanup migrate to using sim_printf vs separate calls to printf and fprintf(sim_log). 2014-10-22 17:12:14 -07:00
Mark Pizzolato
3951ad2432 Cleanup of unneeded global extern declarations 2014-10-10 08:18:15 -07:00
Mark Pizzolato
04b3548920 Compiler suggested cleanup 2014-08-02 15:24:16 -07:00
Mark Pizzolato
3946eb710e VAX, PDP11, PDP10: Added a explanation of the capabilities and limitations of the NEXT command which is output the first time a NEXT command is entered.
Also added CHMK, CHME, CHMS and CHMU to the set of instructions which are considered subroutine call initiators in the VAX simulator.
2014-04-19 05:45:29 -07:00
Mark Pizzolato
3083933952 PDP10: Added support for the NEXT command to step over subroutine calls. 2014-04-17 13:07:59 -07:00
Mark Pizzolato
9eff5331a9 PDP10: Fixed UBA reset logic to only reset the devices which are connected to the UBA being reset (reported by R. Voorhorst) 2014-04-16 02:17:33 -07:00
Mark Pizzolato
ce332a18d7 PDP10: Initial code for 36bit DMA operations 2014-04-13 15:53:39 -07:00
Mark Pizzolato
513214ec9b PDP10: Added a generic UBA debug routine to log NXM events. Converted all internal NXM debug output to use this new routine. 2014-04-12 17:18:41 -07:00
Mark Pizzolato
a24d23ee52 PDP10: Add missing updates from prior commit 2014-04-12 07:44:50 -07:00
Mark Pizzolato
95c7312669 PDP10: Added missing UBA DMA debug output of the trailing bytes when a partial word is referenced at the end of a DMA transfer.
Added ascii and sixbit decoded contents displayed in the debug output.
2014-04-12 07:22:18 -07:00
Mark Pizzolato
ee90f08bae PDP10: Fix UBA DMA debug output to use inverted byte and word masks 2014-04-11 16:22:50 -07:00
Mark Pizzolato
c367f8dc2d PDP10: Correctly format the various data displayed in the debug output 2014-04-11 12:40:07 -07:00
Mark Pizzolato
0d1ab44368 PDP10: Extended UBA DMA debug output to also be available when doing DMA in 16bit or 18bit modes and added display of words and bytes to the debug output. 2014-04-11 09:14:32 -07:00
Mark Pizzolato
33cce50153 PDP10: Fix formatting of UBA DMA debug output 2014-04-10 11:29:31 -07:00
Mark Pizzolato
ac2197e76a PDP10: Added DMA transfer debugging (IN, OUT and NXM) to the unibus adapter. 2014-04-10 08:21:39 -07:00
Mark Pizzolato
6ce8d99cd8 SCP: Added generic output routine sim_printf to output to stdout and sim_log (and sim_deb when enabled)
The goals here being to simplify calling code while getting consistent output delivered everywhere it may be useful.

Modified most places which explicitly used sim_log or merely called printf to now avoid doing that and merely call sim_printf().
2014-03-28 08:20:05 -07:00
Jordi Guillaumes i Pons
9f0261be11 PDP10: Fixed TOD drift due to truncation to milliseconds. 2014-02-25 10:47:32 +01:00
Mark Pizzolato
02cb5c2d88 Compiler suggested cleanups.
Mostly silencing noise warnings, but bugs were found in sim_console.c and pdp11_dmc.c
2014-02-14 17:07:45 -08:00
Mark Pizzolato
d50d9529a8 PDP10: Change display of CPU memory size to be in KW (1024) instead of (1000) 2014-02-13 08:22:49 -08:00
Mark Pizzolato
22bce48689 PDP10: Change incorrect interrupt bits defined for DMC/DMR device which conflicted with KMC/KDP device. Fixes issue #107
Also removed unreferenced defines for shared Unibus devices which get address and vectors through autoconfiguration.
2014-02-12 13:47:01 -08:00
Mark Pizzolato
07b64e3f72 Compiler suggested cleanups. 2014-02-11 13:33:48 -08:00
Mark Pizzolato
897491deea PDP10: Correct time interpolation when reading the timebase and the interval calculation when setting the clock tick interval. Fixes issue #108 (from Jordi Guillaumes) 2014-02-11 07:17:42 -08:00
Mark Pizzolato
ccabc026d5 PDP10: Added display support of PC value in debug messages. 2014-02-05 15:25:09 -08:00
Mark Pizzolato
235ffdb6f0 PDP10: Change default bus address and vector for DMR device to be what the TOPS-10 expects (address 764000 and vector 610) 2014-01-30 16:29:40 -08:00
Mark Pizzolato
55c5d20517 PDP10,PDP11,VAX: Addition of inter operable DUP11, DMC11 and KDP11 devices
This is the results of external KDP development activities.  The KDP side done by Timothe Litt and DMC and DUP by Mark Pizzolato

Additionally, other PDP10 updates from Timothe Litt
2013-11-25 07:00:17 -08:00
Bill Heaton
839db8e1fd PDP10: Use system style of include 2013-10-01 13:09:36 -07:00
Bill Heaton
99b4730dc0 Fix build warning on OS/X
PDP11/pdp11_io_lib.c: In function 'show_iospace':
PDP11/pdp11_io_lib.c:363: warning: too few arguments for format

PDP10/pdp10_lp20.c: In function 'lp20_set_vfu_type':
PDP10/pdp10_lp20.c:1038: warning: implicit declaration of function
'toupper'
PDP10/pdp10_lp20.c:1121: warning: implicit declaration of function
'isspace'
2013-09-30 12:10:11 -07:00
Timothe Litt
91c7d26095 SHOW IOSPACE, again
Show IOSPACE doesn't always get the number of devices right due to device creativity.

o The distinction between UNIT and DEVICE has blurred
o MUX devices merge several physical devices into one device/unit
o Dynamic device sizing has made things more volatile.

This edit solves the problem for SHOW IOSPACE by adding an (optional) word to the DIBs.
The word contains the amount of IO space consumed by each instance of the physical device that's being emulated.
E.G., if it's a DZ11, the device is the DZ11 module, or 8 lines, even though the MUX device may support 32.

This enables SHOW IOSPACE to determine the number of physical devices being emulated, which is what folks need when configuring software.  The word may have other uses - in a generic dynamic device sizing routine - which is why the amount of IOSPACE per device was chosen rather than the 'number of physical devices.'

The edit should not make any existing device regress.  If the new word (ulnt) is zero (not initialized), SHOW IOSPACE will default to the number of units in the device, or if there's no device (CPUs), 1 as before.  If it is present, the number of devices is the calculated as total allocation/allocation-per-device.

The edit updates all the devices that seem to require this treatment, and all the processors that define the UNIBUS/QBUS DIBs.
2013-07-11 15:39:15 -04:00
Timothe Litt
5ab2d189ab PDP10 update
EA calc of interrupt instructions is an extension by SimH, and performed incorrectly.  Indirect references are resolved in current context, not exec mode.

Since the Console Execute emulation takes advantage of this extension, correct it to calculate the EA in EXEC mode.
2013-07-10 06:20:01 -04:00
Timothe Litt
9c7f4237d3 PDP-10 update
Halt code for Console FE errors
2013-07-05 00:07:01 -04:00
Timothe Litt
6e78905ecc PDP-10 Update: TIM
Fix subtle errors in timer/timebase implementation.
Document mechanisms.
Reduce magic constants by using what the OS sets via wrint.
2013-07-05 00:03:39 -04:00
Timothe Litt
6243f9314f PDP-10 update: LP20
Add Optical VFU support
Correct some inconsistencies with the hardware.
Add documentation and help.
Flush output file after 10 seconds of idleness to allow external watchers/processors to access entire job without forcing a simulator halt or detach/attach.
Make CR return to column 0, not column 1.
Make DAVFU contents accessible via SHOW.
Initialize RAM structures on power-up reset, but not reboot.
2013-07-05 00:01:24 -04:00
Timothe Litt
0e939d29e8 PDP-10 update
Implement keep-alive and os-requested reload functions of FE.
Preserve HW config flags during (re-) boot.
Allow IPL30 device to interrupt.
Add 18-bit DMA functions.
Implement DMA to/from I/O space.
Optimize DMA memory mapping - once per page, not once per byte.
Teach SHOW IO to report vectors and BR levels as well as CSR addresses.
Add DUP and KDP to Autoconfigure table.
2013-07-04 23:56:24 -04:00