1
0
mirror of https://github.com/simh/simh.git synced 2026-04-25 03:34:34 +00:00

Added KDP to PDP11 simulator

This commit is contained in:
Mark Pizzolato
2013-06-01 06:37:05 -07:00
parent ee7e81b7b9
commit e8da772de6
7 changed files with 52 additions and 15 deletions

View File

@@ -660,10 +660,6 @@ typedef struct pdp_dib DIB;
#define IOLN_XU 010 #define IOLN_XU 010
#define IOBA_DMR (IO_UBA3 + 0764000) /* DMR11 */ #define IOBA_DMR (IO_UBA3 + 0764000) /* DMR11 */
#define IOLN_DMR 010 #define IOLN_DMR 010
#define IOBA_DUP (IO_UBA3 + 0760300) /* DUP11 */
#define IOLN_DUP 010
#define IOBA_KMC (IO_UBA3 + 0760540) /* KMC11 */
#define IOLN_KMC 010
#define IOBA_CR (IO_UBA3 + 0777160) /* CD/CR/CM */ #define IOBA_CR (IO_UBA3 + 0777160) /* CD/CR/CM */
#define IOLN_CR 010 #define IOLN_CR 010
#define IOBA_RY (IO_UBA3 + 0777170) /* RX211 */ #define IOBA_RY (IO_UBA3 + 0777170) /* RX211 */

View File

@@ -961,6 +961,12 @@ AUTO_CON auto_tab[] = {/*c #v am vm fxa fxv */
{0017550}, {0070} }, /* PC11 reader - fx CSR, fx VEC */ {0017550}, {0070} }, /* PC11 reader - fx CSR, fx VEC */
{ { "PTP" }, 1, 1, 0, 0, { { "PTP" }, 1, 1, 0, 0,
{0017554}, {0074} }, /* PC11 punch - fx CSR, fx VEC */ {0017554}, {0074} }, /* PC11 punch - fx CSR, fx VEC */
{ { "KMC" }, 1, 2, 0, 0,
{0000540}, {0540} }, /* KMC11 - fx CSR, fx VEC */
{ { "DUP0" }, 1, 2, 0, 0,
{0000300}, {0300} }, /* DUP11 sync - fx CSR, fx VEC */
{ { "DUP1" }, 1, 2, 0, 0,
{0000310}, {0310} }, /* DUP11 sync - fx CSR, fx VEC */
#else #else
{ { "QBA" }, 1, 0, 0, 0, { { "QBA" }, 1, 0, 0, 0,
{017500} }, /* doorbell - fx CSR, no VEC */ {017500} }, /* doorbell - fx CSR, no VEC */

View File

@@ -599,6 +599,8 @@ typedef struct pdp_dib DIB;
#define INT_V_RC 17 #define INT_V_RC 17
#define INT_V_DMCRX 18 #define INT_V_DMCRX 18
#define INT_V_DMCTX 19 #define INT_V_DMCTX 19
#define INT_V_KMCA 20
#define INT_V_KMCB 21
#define INT_V_PIR4 0 /* BR4 */ #define INT_V_PIR4 0 /* BR4 */
#define INT_V_TTI 1 #define INT_V_TTI 1
@@ -644,6 +646,8 @@ typedef struct pdp_dib DIB;
#define INT_RC (1u << INT_V_RC) #define INT_RC (1u << INT_V_RC)
#define INT_DMCRX (1u << INT_V_DMCRX) #define INT_DMCRX (1u << INT_V_DMCRX)
#define INT_DMCTX (1u << INT_V_DMCTX) #define INT_DMCTX (1u << INT_V_DMCTX)
#define INT_KMCA (1u << INT_V_KMCA)
#define INT_KMCB (1u << INT_V_KMCB)
#define INT_PIR4 (1u << INT_V_PIR4) #define INT_PIR4 (1u << INT_V_PIR4)
#define INT_TTI (1u << INT_V_TTI) #define INT_TTI (1u << INT_V_TTI)
#define INT_TTO (1u << INT_V_TTO) #define INT_TTO (1u << INT_V_TTO)
@@ -692,6 +696,8 @@ typedef struct pdp_dib DIB;
#define IPL_RC 5 #define IPL_RC 5
#define IPL_DMCRX 5 #define IPL_DMCRX 5
#define IPL_DMCTX 5 #define IPL_DMCTX 5
#define IPL_KMCA 5
#define IPL_KMCB 5
#define IPL_PTR 4 #define IPL_PTR 4
#define IPL_PTP 4 #define IPL_PTP 4
#define IPL_TTI 4 #define IPL_TTI 4

View File

@@ -440,14 +440,14 @@ AUTO_CON auto_tab[] = {/*c #v am vm fxa fxv */
{ { NULL }, 1, 2, 0, 8, { { NULL }, 1, 2, 0, 8,
{012400} }, /* KW11W */ {012400} }, /* KW11W */
{ { NULL }, 1, 2, 8, 8 }, /* DU11 */ { { NULL }, 1, 2, 8, 8 }, /* DU11 */
{ { NULL }, 1, 2, 8, 8 }, /* DUP11 */ { { "DUP0", "DUP1" },1, 2, 8, 8 }, /* DUP11 */
{ { NULL }, 1, 3, 0, 8, { { NULL }, 1, 3, 0, 8,
{015000, 015040, 015100, 015140, }}, /* DV11 */ {015000, 015040, 015100, 015140, }}, /* DV11 */
{ { NULL }, 1, 2, 8, 8 }, /* LK11A */ { { NULL }, 1, 2, 8, 8 }, /* LK11A */
{ { "DMC0", "DMC1", "DMC2", "DMC3" }, { { "DMC0", "DMC1", "DMC2", "DMC3" },
1, 2, 8, 8 }, /* DMC11 */ 1, 2, 8, 8 }, /* DMC11 */
{ { "DZ" }, 1, 2, 8, 8 }, /* DZ11 */ { { "DZ" }, 1, 2, 8, 8 }, /* DZ11 */
{ { NULL }, 1, 2, 8, 8 }, /* KMC11 */ { { "KMC" }, 1, 2, 8, 8 }, /* KMC11 */
{ { NULL }, 1, 2, 8, 8 }, /* LPP11 */ { { NULL }, 1, 2, 8, 8 }, /* LPP11 */
{ { NULL }, 1, 2, 8, 8 }, /* VMV21 */ { { NULL }, 1, 2, 8, 8 }, /* VMV21 */
{ { NULL }, 1, 2, 16, 8 }, /* VMV31 */ { { NULL }, 1, 2, 16, 8 }, /* VMV31 */

View File

@@ -29,7 +29,24 @@
** We don't implement buffer flushing. ** We don't implement buffer flushing.
*/ */
#include "pdp11_kdp.h" #if defined (VM_PDP10) /* PDP10 version */
#include "pdp10_defs.h"
#elif defined (VM_VAX) /* VAX version */
#include "vax_defs.h"
#else /* PDP-11 version */
#include "pdp11_defs.h"
#endif
#define KMC_RDX 8
#define DUP_RDX 8
extern int32 IREQ (HLVL);
extern int32 tmxr_poll; /* calibrated delay */
extern int32 clk_tps; /* clock ticks per second */
extern int32 tmr_poll; /* instructions per tick */
#include "sim_tmxr.h" #include "sim_tmxr.h"
#define DF_CMD 0001 /* Print commands. */ #define DF_CMD 0001 /* Print commands. */
@@ -40,8 +57,6 @@
#define DF_TRC 0040 /* Detailed trace. */ #define DF_TRC 0040 /* Detailed trace. */
#define DF_INF 0100 /* Info */ #define DF_INF 0100 /* Info */
extern int32 int_req;
//t_stat sync_open(int* retval, char* cptr) //t_stat sync_open(int* retval, char* cptr)
//{ //{
// return SCPE_OK; // return SCPE_OK;
@@ -291,7 +306,9 @@ DEBTAB kmc_debug[] = {
/* KMC11 data structs: */ /* KMC11 data structs: */
DIB kmc_dib = { IOBA_KMC, IOLN_KMC, &kmc_rd, &kmc_wr, 2, IVCL (KMCA), VEC_KMCA, {&kmc_rxint, &kmc_txint} }; #define IOLN_KMC 010
DIB kmc_dib = { IOBA_AUTO, IOLN_KMC, &kmc_rd, &kmc_wr, 2, IVCL (KMCA), VEC_AUTO, {&kmc_rxint, &kmc_txint} };
UNIT kmc_unit = { UDATA (&kmc_svc, 0, 0) }; UNIT kmc_unit = { UDATA (&kmc_svc, 0, 0) };
@@ -327,13 +344,15 @@ DEVICE kmc_dev =
1, KMC_RDX, 13, 1, KMC_RDX, 8, 1, KMC_RDX, 13, 1, KMC_RDX, 8,
NULL, NULL, &kmc_reset, NULL, NULL, &kmc_reset,
NULL, NULL, NULL, &kmc_dib, NULL, NULL, NULL, &kmc_dib,
DEV_UBUS | DEV_DEBUG, 0, kmc_debug DEV_UBUS | DEV_DISABLE | DEV_DIS | DEV_DEBUG, 0, kmc_debug
}; };
/* DUP11 data structs: */ /* DUP11 data structs: */
DIB dup0_dib = { IOBA_DUP, IOLN_DUP, &dup_rd, &dup_wr, 0 }; #define IOLN_DUP 010
DIB dup1_dib = { IOBA_DUP + IOLN_DUP, IOLN_DUP, &dup_rd, &dup_wr, 0 };
DIB dup0_dib = { IOBA_AUTO, IOLN_DUP, &dup_rd, &dup_wr, 0 };
DIB dup1_dib = { IOBA_AUTO, IOLN_DUP, &dup_rd, &dup_wr, 0 };
UNIT dup_unit[MAXDUP] = { UNIT dup_unit[MAXDUP] = {
{ UDATA (&dup_svc, UNIT_ATTABLE, 0) }, { UDATA (&dup_svc, UNIT_ATTABLE, 0) },
@@ -1247,7 +1266,8 @@ t_stat dup_reset(DEVICE* dptr)
// } // }
// firsttime = FALSE; /* Once-only init done now. */ // firsttime = FALSE; /* Once-only init done now. */
//} //}
return SCPE_OK;
return auto_config (dptr->name, (dptr->flags & DEV_DIS)? 0: 1 ); /* auto config */
} }
/* /*
@@ -1261,7 +1281,7 @@ t_stat kmc_reset(DEVICE* dptr)
kmc_sel4 = 0; kmc_sel4 = 0;
kmc_sel6 = 0; kmc_sel6 = 0;
return SCPE_OK; return auto_config (dptr->name, (dptr->flags & DEV_DIS)? 0: 1 ); /* auto config */
} }
/* /*

View File

@@ -103,6 +103,8 @@ extern DEVICE xu_dev, xub_dev;
extern DEVICE ke_dev; extern DEVICE ke_dev;
extern DEVICE kg_dev; extern DEVICE kg_dev;
extern DEVICE dmc_dev[]; extern DEVICE dmc_dev[];
extern DEVICE kmc_dev;
extern DEVICE dup_dev[];
extern UNIT cpu_unit; extern UNIT cpu_unit;
extern REG cpu_reg[]; extern REG cpu_reg[];
extern uint16 *M; extern uint16 *M;
@@ -171,6 +173,9 @@ DEVICE *sim_devices[] = {
&dmc_dev[1], &dmc_dev[1],
&dmc_dev[2], &dmc_dev[2],
&dmc_dev[3], &dmc_dev[3],
&kmc_dev,
&dup_dev[0],
&dup_dev[1],
NULL NULL
}; };

View File

@@ -239,6 +239,10 @@
RelativePath="..\PDP11\pdp11_io_lib.c" RelativePath="..\PDP11\pdp11_io_lib.c"
> >
</File> </File>
<File
RelativePath="..\PDP11\pdp11_kdp.c"
>
</File>
<File <File
RelativePath="..\PDP11\pdp11_ke.c" RelativePath="..\PDP11\pdp11_ke.c"
> >