Commit graph

88 commits

Author SHA1 Message Date
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
Timothe Litt
c3b1d9abdd Boot ROMs, again
Make the boot ROMs a bit easier to maintain.

Add assertion that the two variants of each are the same size.

Add offsets to the comments so it's easier to see where jumps are going.
2013-06-19 06:05:57 -04:00
Timothe Litt
65ea457d5b PDP-10 tape boot rom update
The boot rom for tape didn't handle a tapes coming on-line, didn't take
the RH/TM/addresses from the FE.  The launcher also didn't handle
autoboot.

Now it does, with the restriction that ITS will only talk to UBA1.
2013-06-19 05:49:07 -04:00
Timothe Litt
2efb0a1d65 Add -A to boot, Document & init FE comm area
The KS10's 8080 interfaces to the OS thru a small communications region.

The documentation is rather lacking, and the 8080 microcode is difficult
to follow.  Many years ago (while still at DEC), I worked it out, and
put definitions into TOPS-10.  They're now here, too.

Also, properly initialize the KLINIK communication words and the
keep-alive word.
2013-06-18 22:42:48 -04:00
Timothe Litt
6076a48f25 PDP-10 RP redux
The KS front end microcode actually reads the wrong alternate HOM block.
Teach the bootstrap to try the wrong one (in case someone counts on
this), but also the correct block.

Implement boot -A to emulate an autoboot - the boot that happens on
power-on or when the boot switch is pressed.  No questions, just boots.
2013-06-18 21:14:32 -04:00
Timothe Litt
c7c5bdead0 PDP-10 RP attach/detach/boot issues
The pdp10_rp emulator had several problems:

1) disks are not recognized properly when they come on-line.  Same issue
as tapes, but not the same code paths.

2) The bootstrap code did not wait for disks to become ready.

3) The bootstrap code did not take the RH CSR address from the front end
(device).  Hence, would not boot if the device address was changed.

4) The bootstrap looked for the second HOM block at block 10 of the
disk.  Unfortunately, it read block 8.  10 is decimal; you need all 10
(decimal) fingers.

Fixes:
1) Implement spin-up delay.  A device that is attached/re-attached comes
on-line a second later.  Replace tests for 'attached' with tests for
up-to-speed.

2) Wait for the drive to become ready after issuing a controller clear.
When it's ready, write the attention summary register to prevent the
un-tended on-line interrupt for looking like an error.

3) Read the RHBASE from main memory instead of storing it there.  Teach
the bootstrap command to put it in memory from the dib, as it did with
the unit.

4) Read the correct block.

FILSER now gets on-line and off-line interrupts.
2013-06-18 16:27:41 -04:00
Timothe Litt
d92fd22d7f RH11/TM0x issues: attach/detach
Tape on-line interrupts weren't happening when a tape was attached or
replace on the TH11/TM0x emulation.

The OS never saw a MOL transition in the case of replacement, where the
detach is implicit.

This patch defers reporting MOL for 100 msec; faster than a human can
change tapes, but long enough for an OS to see the 1->0->1 transition of
MOL.

Further, checks for UNIT_ATT should be for MOL.

This makes GALAXY automatic tape recognition work.
2013-06-17 18:11:05 -04:00
Mark Pizzolato
651780c481 Remove stray tab characters which crept in over time 2013-06-03 06:29:01 -07:00
Mark Pizzolato
f7330bc09d remote compiler warning 2013-06-02 17:07:21 -07:00
Mark Pizzolato
e2b796273a Merge branch 'master' of github.com:simh/simh 2013-05-31 09:41:36 -07:00
Mark Pizzolato
bc49f6b78a Fix for Unibus word DMA from Rob Jarratt 2013-05-31 04:16:42 -07:00
Mark Pizzolato
39c794292d Changed some spaces and indentations 2013-05-29 12:48:19 -07:00
Timothe Litt
3e25042017 Change some tabs to spaces 2013-05-29 14:48:43 -04:00
Timothe Litt
5f26e6011a Add set cpu serial for KS
Allow CPU serial number to be set for KS cpus.

With multiple instances running about, this prevents a lot of confusion,
especially in the error logs.
2013-05-29 13:59:42 -04:00
Timothe Litt
b80fa0ae50 Revert "Add set serial to KS cpu"
This reverts commit 611b7632c9.
2013-05-29 13:52:29 -04:00
Timothe Litt
611b7632c9 Add set serial to KS cpu
With multiple instances, error logging gets confusing when every CPU has
the same serial number.

This makes the CPU serial number settable.  If not set, the old defaults
apply.
2013-05-29 13:50:56 -04:00
Timothe Litt
f5de2f4d22 LP20 emulation was overwriting existing files
When an LP20 is attached to an existing file, the file is opened in
update mode.  Since the initial file position is zero, any existing
output is over-written.  This is not intuitive.

This edit makes the LP20 seek to EOF on attach.

N.B. Other devices may have cousin issues.
2013-05-29 13:43:12 -04:00
Mark Pizzolato
89bd58a6fa Addition of DUP11 simulation to all Unibus simulators (PDP11, PDP10, and all Unibus VAXen) 2013-05-27 16:24:18 -07:00
Mark Pizzolato
c93658f241 Avoid bug in the HP PA-RISC C compiler. (from Mikulas Patocka)
In 32-bit mode, the compiler truncates constants to 32-bit.
We need LL suffix to avoid the truncation.

This behavior is contrary to the C 99 standard which defines
that constants that do not fit into long and unsigned long shall
have long long type.
2013-04-05 12:34:37 -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
374b13f946 Fixes to infinite loop issues found by Mikulas Patocka 2013-03-05 11:40:33 -08:00
Mark Pizzolato
8f851d2cbc Merge branch 'master' into AsyncTmxr 2013-01-22 17:16:53 -08:00
Mark Pizzolato
34d2e482d3 Changed the PDP10 auto configuration process to configure the traditional PDP10 unibus devices to the fixed addresses they historically had. 2013-01-22 17:14:33 -08:00
Mark Pizzolato
71fcfacafc Added calls to sim_register_clock_unit for simulators with clock devices 2013-01-22 16:07:23 -08:00
Mark Pizzolato
83c1d80194 Merge branch 'master' into AsyncTmxr
Conflicts merged and missing changes in new modules added as needed for clock co-scheduling.
2013-01-21 16:52:42 -08:00
Mark Pizzolato
95033cee15 Declare the console port input and output polling units for most simulators to potentially allow asynchronous console I/O. 2013-01-21 11:31:29 -08:00
Mark Pizzolato
dac73b9381 Migrating scp and library global variables to be declared as extern in the appropriate library include file and remove repetitive declarations in referencing modules. 2013-01-10 13:29:15 -08:00
Mark Pizzolato
7b6f7a9871 Set device flags indicating DEV_DISK, DEV_TAPE, DEV_MUX and DEV_ETHER for all simulator devices which use the sim_disk, sim_tape, sim_tmxr, and sim_ether libraries 2013-01-07 12:47:24 -08:00
Mark Pizzolato
6a5278ec3c Removed the pdp11_dmc from the PDP10 simulator since that combination of hardware was never a legitimate one. 2013-01-05 15:33:59 -08:00
Mark Pizzolato
8395db0573 Fixed the auto configure IO page base address 2013-01-05 15:11:36 -08:00
Mark Pizzolato
b1d306cff8 Fixed devices missed in Auto Configuration for PDP11 simulator. CLK issue initially reported by Matt Burke 2013-01-01 05:54:53 -08:00
Mark Pizzolato
bdcfe994e0 Auto configure documentation and updates for PDP10 system 2012-12-29 07:57:57 -08:00
Mark Pizzolato
2471f3fc73 Convert PDP10 unibus devices to auto configure 2012-12-28 12:27:05 -08:00