simh-testsetgenerator/PDP11
Mark Pizzolato f0d41f15d7 PDP11: Fix to correctly set PS value on CPU reset to reflect the model specific ways real hardware behaved. (from Bob Supnik)
Here's a PDP11 SIMH bug as old as the simulator itself: the reset_cpu routine sets the PS to 340 (interrupts disabled). This causes some versions of Lunar Lander not to work. In fact, the initial state of the PS is not architecturally standardized:

      04: cleared (from schematics)
      05: cleared (from manual)
      20: cleared (from schematics)
      34: cleared (from schematics), set to 340 on boot?
      40: cleared (from schematics)
      44: cleared on init, set to 340 on boot (from schematics, manual)
      45: cleared (from schematics)
      60: cleared (from schematics)
      70: cleared (from schematics)
      T11: set to 340 (from spec)
      LSI11, F11: 4 mode behavior (from memory on power recovery, cleared on GO, 340 on boot, mode 3 undefined)
      J11: 4 mode behavior (from memory on power recovery, cleared on GO, 340 on boot, 340 on jump to  custom PROM)

The story seems to be this. All non-VLSI PDP11s used TTL chips to implement the PS, either discrete flip-flops, or 4b registers, or both.
Starting with the first system, the 11/20, they were wired clear on the processor INIT signal (power-up or front panel START switch), so that all internal state started as 0. This worked fine, because START also reset the Unibus and cleared all interrupt enables. So even though the processor was as IPL = 0, no interrupts were possible. Then along came the LSI11...

The LSI11 implemented a line-time clock with NO INTERRUPT DISABLE. Thus, if IPL was left at 0 and a bootstrap routine from a slow device was started (e.g., a floppy drive), the clock would tick, and an interrupt would occur, before the bootstrap routine finished. Because no vectors were set up, the processor would crash. So the LSI11 started the practice, carried over to all later PDP11 VLSI chips, of setting the PS to 340 before jumping to a boot ROM.

The T11 did this in all modes of startup, because its only startup behavior was to jump to a "boot" routine. It did not have a console of any kind.

Accordingly, it appears that the cpu_reset routine needs to set the PS based on the processor model. Further, all boot routines need to set the PS to 0 or 340 based on the processor model. (It's probably safe for boot routines just to set the PS to 340, but it's not technically
accurate.)
2013-10-27 05:30:13 -07:00
..
lunar11 DISPLAY: Latest version of display code from Phil Budne and Doug Gwyn including initial pdp1_dpy and pdp11_vt 2013-10-16 01:02:12 -07:00
pdp11_cis.c Merge latest from Bob Supnik 2013-10-12 13:33:01 -07:00
pdp11_cpu.c PDP11: Fix to correctly set PS value on CPU reset to reflect the model specific ways real hardware behaved. (from Bob Supnik) 2013-10-27 05:30:13 -07:00
pdp11_cpumod.c Fix bug in PDP11 SET CPU <model> which inadvertently disabled some devices improperly. - Bob Supnik 2013-06-07 18:20:59 -07:00
pdp11_cpumod.h 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
pdp11_cr.c Fix CR builds 2013-07-08 07:22:29 -04:00
pdp11_cr_dat.h PDP-10 update: CD20 2013-07-05 00:16:11 -04:00
pdp11_dc.c Merge latest from Bob Supnik 2013-10-12 13:33:01 -07:00
pdp11_ddcmp.h Added needed DUP interfaces to allow use by KMC11/KDP. 2013-06-02 13:19:23 -07:00
pdp11_defs.h PDP11: Fix to correctly set PS value on CPU reset to reflect the model specific ways real hardware behaved. (from Bob Supnik) 2013-10-27 05:30:13 -07:00
pdp11_dl.c Merge latest from Bob Supnik 2013-10-12 13:33:01 -07:00
pdp11_dmc.c Remove stray tab characters which crept in over time 2013-06-03 06:29:01 -07:00
pdp11_dmc.h 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
pdp11_dup.c Added missing STRSYN from DDCMP dup setup 2013-06-02 16:08:06 -07:00
pdp11_dup.h Added needed DUP interfaces to allow use by KMC11/KDP. 2013-06-02 13:19:23 -07:00
pdp11_dz.c SHOW IOSPACE, again 2013-07-11 15:39:15 -04:00
pdp11_fp.c Remove stray tab characters which crept in over time 2013-06-03 06:29:01 -07:00
pdp11_hk.c PDP11: Fix to correctly set PS value on CPU reset to reflect the model specific ways real hardware behaved. (from Bob Supnik) 2013-10-27 05:30:13 -07:00
pdp11_io.c PDP-11/VAX Update: NPR to/from IO Space 2013-07-05 00:48:10 -04:00
pdp11_io_lib.c DISPLAY: Latest version of display code from Phil Budne and Doug Gwyn including initial pdp1_dpy and pdp11_vt 2013-10-16 01:02:12 -07:00
pdp11_io_lib.h 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
pdp11_ke.c PDP11: Added help to KE, KG, RF, TA, TC and TM devices. Fixed DECtape documentation. 2013-09-09 05:36:17 -07:00
pdp11_kg.c PDP11: Added help to KE, KG, RF, TA, TC and TM devices. Fixed DECtape documentation. 2013-09-09 05:36:17 -07:00
pdp11_lp.c Adding more device help 2013-02-05 04:41:48 -08:00
pdp11_mscp.h 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
pdp11_pclk.c Reworked Auto Configure for all Qbus/Unibus devices to have their device address settings table driven from the auto configure code rather than statically defined in many per cpu model include files. 2012-12-20 13:58:11 -08:00
pdp11_pt.c Another typo 2013-02-06 17:48:43 -08:00
pdp11_rc.c Compiler nits for void * assignments from Bob Supnik 2013-09-04 19:50:47 -07:00
pdp11_rf.c PDP11: Fix to correctly set PS value on CPU reset to reflect the model specific ways real hardware behaved. (from Bob Supnik) 2013-10-27 05:30:13 -07:00
pdp11_rh.c PDP11: Fix DL help attach regression and missing SHOW IOSPACE details 2013-10-02 08:37:09 -07:00
pdp11_rk.c PDP11: report RK05 drive presence more reasonably. Add historical information in RK help. 2013-09-07 14:08:23 -07:00
pdp11_rl.c PDP11: Fix to correctly set PS value on CPU reset to reflect the model specific ways real hardware behaved. (from Bob Supnik) 2013-10-27 05:30:13 -07:00
pdp11_rp.c PDP11: Fix to correctly set PS value on CPU reset to reflect the model specific ways real hardware behaved. (from Bob Supnik) 2013-10-27 05:30:13 -07:00
pdp11_rq.c PDP11: Fix to correctly set PS value on CPU reset to reflect the model specific ways real hardware behaved. (from Bob Supnik) 2013-10-27 05:30:13 -07:00
pdp11_rs.c PDP11: Fix to correctly set PS value on CPU reset to reflect the model specific ways real hardware behaved. (from Bob Supnik) 2013-10-27 05:30:13 -07:00
pdp11_rx.c PDP11: Fix to correctly set PS value on CPU reset to reflect the model specific ways real hardware behaved. (from Bob Supnik) 2013-10-27 05:30:13 -07:00
pdp11_ry.c PDP11: Fix to correctly set PS value on CPU reset to reflect the model specific ways real hardware behaved. (from Bob Supnik) 2013-10-27 05:30:13 -07:00
pdp11_stddev.c Remove stray tab characters which crept in over time 2013-06-03 06:29:01 -07:00
pdp11_sys.c DISPLAY: Latest version of display code from Phil Budne and Doug Gwyn including initial pdp1_dpy and pdp11_vt 2013-10-16 01:02:12 -07:00
pdp11_ta.c PDP11: Fix to correctly set PS value on CPU reset to reflect the model specific ways real hardware behaved. (from Bob Supnik) 2013-10-27 05:30:13 -07:00
pdp11_tc.c PDP11: Fix to correctly set PS value on CPU reset to reflect the model specific ways real hardware behaved. (from Bob Supnik) 2013-10-27 05:30:13 -07:00
pdp11_tm.c PDP11: Fix to correctly set PS value on CPU reset to reflect the model specific ways real hardware behaved. (from Bob Supnik) 2013-10-27 05:30:13 -07:00
pdp11_tq.c PDP11: Fix to correctly set PS value on CPU reset to reflect the model specific ways real hardware behaved. (from Bob Supnik) 2013-10-27 05:30:13 -07:00
pdp11_ts.c PDP11: Fix to correctly set PS value on CPU reset to reflect the model specific ways real hardware behaved. (from Bob Supnik) 2013-10-27 05:30:13 -07:00
pdp11_tu.c PDP11: Fix to correctly set PS value on CPU reset to reflect the model specific ways real hardware behaved. (from Bob Supnik) 2013-10-27 05:30:13 -07:00
pdp11_uqssp.h 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
pdp11_vh.c SHOW IOSPACE, again 2013-07-11 15:39:15 -04:00
pdp11_vt.c DISPLAY: Latest version of display code from Phil Budne and Doug Gwyn including initial pdp1_dpy and pdp11_vt 2013-10-16 01:02:12 -07:00
pdp11_xq.c PDP11: Fix DL help attach regression and missing SHOW IOSPACE details 2013-10-02 08:37:09 -07:00
pdp11_xq.h PDP11/VAX: Add register descriptions and bitfields to register declarations 2013-09-06 09:38:12 -07:00
pdp11_xq_bootrom.h 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
pdp11_xu.c PDP11: Fix DL help attach regression and missing SHOW IOSPACE details 2013-10-02 08:37:09 -07:00
pdp11_xu.h 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
txt2cbn.c Notes For V3.6-0 2011-04-15 08:35:15 -07:00