From 7fcaa7cf02633d37d71e225b7067abb5f952a8fb Mon Sep 17 00:00:00 2001 From: Bob Supnik Date: Fri, 9 Sep 2022 19:26:36 -0700 Subject: [PATCH] PDP11: Remove OPT_RH11 as a CPU option There are 3 variations of RH11: - 11/70 Massbus adapter AKA RH70. - All other PDP11 systems had a Massbus adapter known as the RH11. - Qbus PDP11 systems had a Massbus adapter known as a RH70 emulator. --- PDP11/pdp11_cpumod.c | 2 +- PDP11/pdp11_cpumod.h | 10 +++++----- PDP11/pdp11_defs.h | 5 +++-- PDP11/pdp11_rh.c | 24 +++++++++++++++++++++--- 4 files changed, 30 insertions(+), 11 deletions(-) diff --git a/PDP11/pdp11_cpumod.c b/PDP11/pdp11_cpumod.c index 7f7e9360..2fa4427a 100644 --- a/PDP11/pdp11_cpumod.c +++ b/PDP11/pdp11_cpumod.c @@ -248,7 +248,7 @@ CNFTAB cnf_tab[] = { static const char *opt_name[] = { "Unibus", "Qbus", "EIS", "NOEIS", "FIS", "NOFIS", "FPP", "NOFPP", "CIS", "NOCIS", "MMU", "NOMMU", - "RH11", "RH70", "PARITY", "NOPARITY", "Unibus map", "No map", + "unused", "unused", "PARITY", "NOPARITY", "Unibus map", "No map", "BEVENT enabled", "BEVENT disabled", NULL }; diff --git a/PDP11/pdp11_cpumod.h b/PDP11/pdp11_cpumod.h index 521922f0..4a6827f2 100644 --- a/PDP11/pdp11_cpumod.h +++ b/PDP11/pdp11_cpumod.h @@ -1,6 +1,6 @@ /* pdp11_cpumod.h: PDP-11 CPU model definitions - Copyright (c) 2004-2015, Robert M Supnik + Copyright (c) 2004-2022, 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"), @@ -83,7 +83,7 @@ #define MM0_1144 0160557 #define MM3_1144 0000077 -#define SOP_1145 (BUS_U|OPT_EIS|OPT_FPP|OPT_MMU|OPT_RH11) +#define SOP_1145 (BUS_U|OPT_EIS|OPT_FPP|OPT_MMU) #define OPT_1145 (OPT_FPP|OPT_MMU) #define PSW_1145 0174377 #define PAR_1145 0007777 @@ -99,7 +99,7 @@ #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 OPT_1170 (OPT_FPP) #define PSW_1170 0174377 #define PAR_1170 0177777 #define PDR_1170 0077717 @@ -123,13 +123,13 @@ #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 SOP_1184 (BUS_U|OPT_EIS|OPT_FPP|OPT_MMU|OPT_UBM) #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 SOP_1194 (BUS_U|OPT_EIS|OPT_FPP|OPT_MMU|OPT_UBM) #define OPT_1194 (OPT_CIS) #define MOD_MAX 20 diff --git a/PDP11/pdp11_defs.h b/PDP11/pdp11_defs.h index 09a7f4a5..3a43fcfa 100644 --- a/PDP11/pdp11_defs.h +++ b/PDP11/pdp11_defs.h @@ -1,6 +1,6 @@ /* pdp11_defs.h: PDP-11 simulator definitions - Copyright (c) 1993-2017, Robert M Supnik + Copyright (c) 1993-2022, 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"), @@ -26,6 +26,7 @@ The author gratefully acknowledges the help of Max Burnet, Megan Gentry, and John Wilson in resolving questions about the PDP-11 + 25-Jul-22 RMS Removed OPT_RH11 (Mark Pizzolato) 10-Feb-17 RMS Fixed RJS11 register block length (Mark Hill) 19-Jan-17 RMS Moved CR11 to BR6, leaving CD11 at BR4 (Mark Pizzolato) 10-Mar-16 RMS Added UC15 support @@ -173,7 +174,7 @@ #define OPT_FPP (1u << 3) /* FPP */ #define OPT_CIS (1u << 4) /* CIS */ #define OPT_MMU (1u << 5) /* MMU */ -#define OPT_RH11 (1u << 6) /* RH11 */ +#define OPT_RSRV (1u << 6) /* unused */ #define OPT_PAR (1u << 7) /* parity */ #define OPT_UBM (1u << 8) /* UBM */ #define OPT_BVT (1u << 9) /* BEVENT */ diff --git a/PDP11/pdp11_rh.c b/PDP11/pdp11_rh.c index 91f8612b..7877d434 100644 --- a/PDP11/pdp11_rh.c +++ b/PDP11/pdp11_rh.c @@ -1,6 +1,6 @@ /* pdp11_rh.c: PDP-11 Massbus adapter simulator - Copyright (c) 2005-2013, Robert M Supnik + Copyright (c) 2005-2022, 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"), @@ -25,6 +25,7 @@ rha, rhb, rhc RH11/RH70 Massbus adapter + 25-Jul-22 RMS Removed OPT_RH11, changed adapter type test 02-Sep-13 RMS Added third Massbus adapter, debug printouts 19-Mar-12 RMS Fixed declaration of cpu_opt (Mark Pizzolato) 02-Feb-08 RMS Fixed DMA memory address limit test (John Dundas) @@ -145,7 +146,7 @@ /* Declarations */ -#define RH11 (cpu_opt & OPT_RH11) +#define RH11 (UNIBUS && (cpu_model != MOD_1170)) typedef struct { uint32 cs1; /* ctrl/status 1 */ @@ -163,7 +164,6 @@ MBACTX massbus[MBA_NUM]; t_stat mba_reset (DEVICE *dptr); t_stat mba_rd (int32 *val, int32 pa, int32 access); t_stat mba_wr (int32 val, int32 pa, int32 access); -t_stat mba_set_type (UNIT *uptr, int32 val, char *cptr, CONST void *desc); t_stat mba_show_type (FILE *st, UNIT *uptr, int32 val, CONST void *desc); int32 mba0_inta (void); int32 mba1_inta (void); @@ -230,6 +230,8 @@ MTAB mba0_mod[] = { &set_addr, &show_addr, NULL, "Bus address" }, { MTAB_XTD|MTAB_VDV|MTAB_VALR, 0, "VECTOR", "VECTOR", &set_vec, &show_vec, NULL, "Interrupt vector" }, + { MTAB_XTD|MTAB_VDV, 0, "TYPE", NULL, + NULL, &mba_show_type, NULL, "Massbus Adapter Type" }, { 0 } }; @@ -263,6 +265,8 @@ MTAB mba1_mod[] = { &set_addr, &show_addr, NULL, "Bus address" }, { MTAB_XTD|MTAB_VDV|MTAB_VALR, 0, "VECTOR", "VECTOR", &set_vec, &show_vec, NULL, "Interrupt vector" }, + { MTAB_XTD|MTAB_VDV, 0, "TYPE", NULL, + NULL, &mba_show_type, NULL, "Massbus Adapter Type" }, { 0 } }; @@ -296,6 +300,8 @@ MTAB mba2_mod[] = { &set_addr, &show_addr, NULL, "Bus address" }, { MTAB_XTD|MTAB_VDV|MTAB_VALR, 0, "VECTOR", "VECTOR", &set_vec, &show_vec, NULL, "Interrupt vector" }, + { MTAB_XTD|MTAB_VDV, 0, "TYPE", NULL, + NULL, &mba_show_type, NULL, "Massbus Adapter Type" }, { 0 } }; @@ -870,6 +876,18 @@ fprintf (st, "Massbus adapter %d (RH%c)", dibp->ba, 'A' + dibp->ba); return SCPE_OK; } +/* Show adapter type */ + +t_stat mba_show_type (FILE *st, UNIT *uptr, int32 val, CONST void *desc) +{ +if (RH11) + fprintf (st, "RH11"); +else if (UNIBUS) + fprintf (st, "RH70"); +else fprintf (st, "RH70 emulator"); +return SCPE_OK; +} + /* Init Mbus tables */ void init_mbus_tab (void)