RESTRICTION: The HP DS disk is not debugged. DO NOT enable this feature for normal operations. WARNING: Massive changes in the PDP-11 make all previous SAVEd file obsolete. Do not attempt to use a PDP-11 SAVE file from a prior release with V3.3! 1. New Features in 3.3 1.1 SCP - Added -p (powerup) qualifier to RESET - Changed SET <unit> ONLINE/OFFLINE to SET <unit> ENABLED/DISABLED - Moved SET DEBUG under SET CONSOLE hierarchy - Added optional parameter value to SHOW command - Added output file option to SHOW command 1.2 PDP-11 - Separated RH Massbus adapter from RP controller - Added TU tape support - Added model emulation framework - Added model details 1.3 VAX - Separated out CVAX-specific features from core instruction simulator - Implemented capability for CIS, octaword, compatibility mode instructions - Added instruction display and parse for compatibility mode - Changed SET CPU VIRTUAL=n to SHOW CPU VIRTUAL=n - Added =n optional parameter to SHOW CPU HISTORY 1.4 Unibus/Qbus simulators (PDP-11, VAX, PDP-10) - Simplified DMA API's - Modified DMA peripherals to use simplified API's 1.5 HP2100 (all changes from Dave Bryan) CPU - moved MP into its own device; added MP option jumpers - modified DMA to allow disabling - modified SET CPU 2100/2116 to truncate memory > 32K - added -F switch to SET CPU to force memory truncation - modified WRU to be REG_HRO - added BRK and DEL to save console settings DR - provided protected tracks and "Writing Enabled" status bit - added "parity error" status return on writes for 12606 - added track origin test for 12606 - added SCP test for 12606 - added "Sector Flag" status bit - added "Read Inhibit" status bit for 12606 - added TRACKPROT modifier LPS - added SET OFFLINE/ONLINE, POWEROFF/POWERON - added fast/realistic timing - added debug printouts LPT - added SET OFFLINE/ONLINE, POWEROFF/POWERON PTR - added paper tape loop mode, DIAG/READER modifiers to PTR - added PV_LEFT to PTR TRLLIM register CLK - modified CLK to permit disable 1.6 IBM 1401, IBM 1620, Interdata 16b, SDS 940, PDP-10 - Added instruction history 1.7 H316, PDP-15, PDP-8 - Added =n optional value to SHOW CPU HISTORY 2. Bugs Fixed in 3.3 2.1 SCP - Fixed comma-separated SET options (from Dave Bryan) - Fixed duplicate HELP displays with user-specified commands 2.2 PDP-10 - Replicated RP register state per drive - Fixed TU to set FCE on short record - Fixed TU to return bit<15> in drive type - Fixed TU format specification, 1:0 are don't cares - Fixed TU handling of TMK status - Fixed TU handling of DONE, ATA at end of operation - Implemented TU write check 2.3 PDP-11 - Replicated RP register state per drive - Fixed RQ, TQ to report correct controller type and stage 1 configuration flags on a Unibus system - Fixed HK CS2<output_ready> flag 2.4 VAX - Fixed parsing of indirect displacement modes in instruction input 2.5 HP2100 (all fixes from Dave Bryan) CPU - fixed S-register behavior on 2116 - fixed LIx/MIx behavior for DMA on 2116 and 2100 - fixed LIx/MIx behavior for empty I/O card slots DP - fixed enable/disable from either device - fixed ANY ERROR status for 12557A interface - fixed unattached drive status for 12557A interface - status cmd without prior STC DC now completes (12557A) - OTA/OTB CC on 13210A interface also does CLC CC - fixed RAR model - fixed seek check on 13210 if sector out of range DQ - fixed enable/disable from either device - shortened xtime from 5 to 3 (drive avg 156KW/second) - fixed not ready/any error status - fixed RAR model DR - fixed enable/disable from either device - fixed sector return in status word - fixed DMA last word write, incomplete sector fill value - fixed 12610 SFC operation - fixed current-sector determination IPL - fixed enable/disable from either device LPS - fixed status returns for error conditions - fixed handling of non-printing characters - fixed handling of characters after column 80 - improved timing model accuracy for RTE LPT - fixed status returns for error conditions - fixed TOF handling so form remains on line 0 SYS - fixed display of CCA/CCB/CCE instructions 2.5 PDP-15 FPP - fixed URFST to mask low 9b of fraction - fixed exception PC setting
280 lines
7.9 KiB
C
280 lines
7.9 KiB
C
/* pdp11_cpumod.h: PDP-11 CPU model definitions
|
|
|
|
Copyright (c) 2004, Robert M Supnik
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a
|
|
copy of this software and associated documentation files (the "Software"),
|
|
to deal in the Software without restriction, including without limitation
|
|
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
and/or sell copies of the Software, and to permit persons to whom the
|
|
Software is furnished to do so, subject to the following conditions:
|
|
|
|
The above copyright notice and this permission notice shall be included in
|
|
all copies or substantial portions of the Software.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
ROBERT M SUPNIK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
Except as contained in this notice, the name of Robert M Supnik shall not
|
|
be used in advertising or otherwise to promote the sale, use or other dealings
|
|
in this Software without prior written authorization from Robert M Supnik.
|
|
*/
|
|
|
|
#ifndef _PDP11_CPUMOD_H_
|
|
#define _PDP11_CPUMOD_H_ 1
|
|
|
|
#define SOP_1103 (BUS_Q)
|
|
#define OPT_1103 (OPT_EIS|OPT_FIS)
|
|
#define PSW_1103 0000377
|
|
|
|
#define SOP_1104 (BUS_U)
|
|
#define OPT_1104 0
|
|
#define PSW_1104 0000377
|
|
|
|
#define SOP_1105 (BUS_U)
|
|
#define OPT_1105 0
|
|
#define PSW_1105 0000377
|
|
|
|
#define SOP_1120 (BUS_U)
|
|
#define OPT_1120 0
|
|
#define PSW_1120 0000377
|
|
|
|
#define SOP_1123 (BUS_Q|OPT_EIS|OPT_FPP|OPT_MMU)
|
|
#define OPT_1123 (OPT_FPP|OPT_CIS)
|
|
#define PSW_F 0170777
|
|
#define PAR_F 0177777
|
|
#define PDR_F 0077516
|
|
#define MM0_F 0160157
|
|
#define MM3_F 0000060
|
|
|
|
#define SOP_1123P (BUS_Q|OPT_EIS|OPT_FPP|OPT_MMU)
|
|
#define OPT_1123P (OPT_FPP|OPT_CIS)
|
|
|
|
#define SOP_1124 (BUS_U|OPT_EIS|OPT_FPP|OPT_MMU|OPT_UBM)
|
|
#define OPT_1124 (OPT_FPP|OPT_CIS)
|
|
|
|
#define SOP_1134 (BUS_U|OPT_EIS|OPT_MMU)
|
|
#define OPT_1134 (OPT_FPP)
|
|
#define PSW_1134 0170377
|
|
#define PAR_1134 0007777
|
|
#define PDR_1134 0077516
|
|
#define MM0_1134 0160557
|
|
|
|
#define SOP_1140 (BUS_U|OPT_EIS|OPT_MMU)
|
|
#define OPT_1140 (OPT_FIS)
|
|
#define PSW_1140 0170377
|
|
#define PAR_1140 0007777
|
|
#define PDR_1140 0077516
|
|
#define MM0_1140 0160557
|
|
|
|
#define SOP_1144 (BUS_U|OPT_EIS|OPT_FPP|OPT_MMU|OPT_UBM)
|
|
#define OPT_1144 (OPT_FPP|OPT_CIS)
|
|
#define PSW_1144 0170777
|
|
#define PAR_1144 0177777
|
|
#define PDR_1144 0177516
|
|
#define MM0_1144 0160557
|
|
#define MM3_1144 0000077
|
|
|
|
#define SOP_1145 (BUS_U|OPT_EIS|OPT_FPP|OPT_MMU|OPT_RH11)
|
|
#define OPT_1145 (OPT_FPP)
|
|
#define PSW_1145 0174377
|
|
#define PAR_1145 0007777
|
|
#define PDR_1145 0077717
|
|
#define MM0_1145 0171777
|
|
#define MM3_1145 0000007
|
|
|
|
#define SOP_1160 (BUS_U|OPT_EIS|OPT_FPP|OPT_MMU)
|
|
#define OPT_1160 0
|
|
#define PSW_1160 0170377
|
|
#define PAR_1160 0007777
|
|
#define PDR_1160 0077516
|
|
#define MM0_1160 0160557
|
|
|
|
#define SOP_1170 (BUS_U|OPT_EIS|OPT_FPP|OPT_MMU|OPT_UBM)
|
|
#define OPT_1170 (OPT_FPP|OPT_RH11)
|
|
#define PSW_1170 0174377
|
|
#define PAR_1170 0177777
|
|
#define PDR_1170 0077717
|
|
#define MM0_1170 0171777
|
|
#define MM3_1170 0000067
|
|
|
|
#define SOP_1173 (BUS_Q|OPT_EIS|OPT_FPP|OPT_MMU)
|
|
#define OPT_1173 (OPT_CIS)
|
|
#define PSW_J 0174777
|
|
#define PAR_J 0177777
|
|
#define PDR_J 0177516
|
|
#define MM0_J 0160177
|
|
#define MM3_J 0000077
|
|
|
|
#define SOP_1153 (BUS_Q|OPT_EIS|OPT_FPP|OPT_MMU)
|
|
#define OPT_1153 (OPT_CIS)
|
|
|
|
#define SOP_1173B (BUS_Q|OPT_EIS|OPT_FPP|OPT_MMU)
|
|
#define OPT_1173B (OPT_CIS)
|
|
|
|
#define SOP_1183 (BUS_Q|OPT_EIS|OPT_FPP|OPT_MMU)
|
|
#define OPT_1183 (OPT_CIS)
|
|
|
|
#define SOP_1184 (BUS_U|OPT_EIS|OPT_FPP|OPT_MMU|OPT_UBM|OPT_RH11)
|
|
#define OPT_1184 (OPT_CIS)
|
|
|
|
#define SOP_1193 (BUS_Q|OPT_EIS|OPT_FPP|OPT_MMU)
|
|
#define OPT_1193 (OPT_CIS)
|
|
|
|
#define SOP_1194 (BUS_U|OPT_EIS|OPT_FPP|OPT_MMU|OPT_UBM|OPT_RH11)
|
|
#define OPT_1194 (OPT_CIS)
|
|
|
|
#define MOD_MAX 20
|
|
|
|
/* MFPT codes */
|
|
|
|
#define MFPT_44 1
|
|
#define MFPT_F 3
|
|
#define MFPT_T 4
|
|
#define MFPT_J 5
|
|
|
|
/* KDF11B specific register */
|
|
|
|
#define PCRFB_RW 0037477 /* page ctrl reg */
|
|
|
|
#define CDRFB_RD 0000377 /* config reg */
|
|
#define CDRFB_WR 0000017
|
|
|
|
/* KT24 Unibus map specific registers */
|
|
|
|
#define LMAL_RD 0177777 /* last mapped low */
|
|
|
|
#define LMAH_RD 0000177 /* last mapped high */
|
|
#define LMAH_WR 0000100
|
|
|
|
/* 11/44 specific registers */
|
|
|
|
#define CCR44_RD 0033315 /* cache control */
|
|
#define CCR44_WR 0003315
|
|
|
|
#define CMR44_RD 0177437 /* cache maint */
|
|
#define CMR44_WR 0000037
|
|
|
|
#define CPUE44_BUSE 0004000
|
|
|
|
/* J11 specific registers */
|
|
|
|
/* Maintenance register */
|
|
|
|
#define MAINT_V_UQ 9 /* Q/U flag */
|
|
#define MAINT_Q (0 << MAINT_V_UQ) /* Qbus */
|
|
#define MAINT_U (1 << MAINT_V_UQ)
|
|
#define MAINT_V_FPA 8 /* FPA flag */
|
|
#define MAINT_NOFPA (0 << MAINT_V_FPA)
|
|
#define MAINT_FPA (1 << MAINT_V_FPA)
|
|
#define MAINT_V_TYP 4 /* system type */
|
|
#define MAINT_KDJA (1 << MAINT_V_TYP) /* KDJ11A */
|
|
#define MAINT_KDJB (2 << MAINT_V_TYP) /* KDJ11B */
|
|
#define MAINT_KDJD (4 << MAINT_V_TYP) /* KDJ11D */
|
|
#define MAINT_KDJE (5 << MAINT_V_TYP) /* KDJ11E */
|
|
#define MAINT_V_HTRAP 3 /* trap 4 on HALT */
|
|
#define MAINT_HTRAP (1 << MAINT_V_HTRAP)
|
|
#define MAINT_V_POM 1 /* power on option */
|
|
#define MAINT_POODT (0 << MAINT_V_POM) /* power up ODT */
|
|
#define MAINT_POROM (2 << MAINT_V_POM) /* power up ROM */
|
|
#define MAINT_V_BPOK 0 /* power OK */
|
|
#define MAINT_BPOK (1 << MAINT_V_BPOK)
|
|
|
|
/* KDJ11B control */
|
|
|
|
#define CSRJB_RD 0177767
|
|
#define CSRJB_WR 0037767
|
|
#define CSRJ_LTCI 0020000 /* force LTC int */
|
|
#define CSRJ_LTCD 0010000 /* disable LTC reg */
|
|
#define CSRJ_V_LTCSEL 10
|
|
#define CSRJ_M_LTCSEL 03
|
|
#define CSRJ_LTCSEL(x) (((x) >> CSRJ_V_LTCSEL) & CSRJ_M_LTCSEL)
|
|
#define CSRJ_HBREAK 0001000 /* halt on break */
|
|
|
|
#define PCRJB_RW 0077176 /* page ctrl reg */
|
|
|
|
#define CDRJB_RD 0000377 /* config register */
|
|
#define CDRJB_WR 0000377
|
|
|
|
/* KDJ11D control */
|
|
|
|
#define CSRJD_RD 0157777 /* native register */
|
|
#define CSRJD_WR 0000377
|
|
#define CSRJD_15M 0040000 /* 1.5M mem on board */
|
|
|
|
/* KDJ11E control */
|
|
|
|
#define CSRJE_RD 0137360 /* control reg */
|
|
#define CSRJE_WR 0037370
|
|
|
|
#define PCRJE_RW 0177376 /* page ctrl reg */
|
|
|
|
#define CDRJE_RD 0000377 /* config register */
|
|
#define CDRJE_WR 0000077
|
|
|
|
#define ASRJE_RW 0030462 /* additional status */
|
|
#define ASRJE_V_TOY 8
|
|
#define ASRJE_TOY (1u << ASRJE_V_TOY) /* TOY serial bit */
|
|
#define ASRJE_TOYBIT(x) (((x) >> ASRJE_V_TOY) & 1)
|
|
|
|
/* KDJ11E TOY clock */
|
|
|
|
#define TOY_HSEC 0
|
|
#define TOY_SEC 1
|
|
#define TOY_MIN 2
|
|
#define TOY_HR 3
|
|
#define TOY_DOW 4
|
|
#define TOY_DOM 5
|
|
#define TOY_MON 6
|
|
#define TOY_YR 7
|
|
#define TOY_LNT 8
|
|
|
|
/* KTJ11B Unibus map */
|
|
|
|
#define DCRKTJ_RD 0100616 /* diag control */
|
|
#define DCRKTJ_WR 0000416
|
|
|
|
#define DDRKTJ_RW 0177777 /* diag data */
|
|
|
|
#define MCRKTJ_RD 0000377 /* control register */
|
|
#define MCRKTJ_WR 0000177
|
|
|
|
/* Data tables */
|
|
|
|
struct cpu_table {
|
|
char *name; /* model name */
|
|
uint32 std; /* standard flags */
|
|
uint32 opt; /* set/clear flags */
|
|
uint32 maxm; /* max memory */
|
|
uint32 psw; /* PSW mask */
|
|
uint32 mfpt; /* MFPT code */
|
|
uint32 par; /* PAR mask */
|
|
uint32 pdr; /* PDR mask */
|
|
uint32 mm0; /* MMR0 mask */
|
|
uint32 mm3; /* MMR3 mask */
|
|
};
|
|
|
|
typedef struct cpu_table CPUTAB;
|
|
|
|
struct conf_table {
|
|
uint32 cpum;
|
|
uint32 optm;
|
|
DIB *dib;
|
|
};
|
|
|
|
typedef struct conf_table CNFTAB;
|
|
|
|
/* Prototypes */
|
|
|
|
t_stat cpu_set_model (UNIT *uptr, int32 val, char *cptr, void *desc);
|
|
t_stat cpu_show_model (FILE *st, UNIT *uptr, int32 val, void *desc);
|
|
t_stat cpu_set_opt (UNIT *uptr, int32 val, char *cptr, void *desc);
|
|
t_stat cpu_clr_opt (UNIT *uptr, int32 val, char *cptr, void *desc);
|
|
t_stat cpu_set_size (UNIT *uptr, int32 val, char *cptr, void *desc);
|
|
t_stat cpu_set_bus (int32 opt);
|
|
|
|
#endif
|