From 65cfd2a63de48720e3df30512242637a66d56b6c Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Sun, 18 Dec 2016 13:31:44 -0800 Subject: [PATCH] PDP11, PDP10: Add pseudo internal device to KDP for receive units This allows the device to be identified when the event queue is examined with SHOW QUEUE for KDP devices. --- PDP11/pdp11_kmc.c | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/PDP11/pdp11_kmc.c b/PDP11/pdp11_kmc.c index 554f651e..c46adf31 100644 --- a/PDP11/pdp11_kmc.c +++ b/PDP11/pdp11_kmc.c @@ -536,6 +536,35 @@ static UNIT tx_units[MAX_ACTIVE][KMC_UNITS]; /* Line 0 is primary unit. txup re static UNIT rx_units[MAX_ACTIVE][KMC_UNITS]; /* Secondary unit, used for RX. rxup references */ +DEVICE kmc_int_rxdev = { + "KDP-RX", rx_units[0], + NULL, /* Register decode tables */ + NULL, /* Modifier table */ + INITIAL_KMCS, /* Number of units */ + KMC_RDX, /* Address radix */ + 13, /* Address width: 18 - <17:13> are 1s, omits UBA */ + 1, /* Address increment */ + KMC_RDX, /* Data radix */ + 8, /* Data width */ + NULL, /* examine routine */ + NULL, /* Deposit routine */ + NULL, /* reset routine */ + NULL, /* boot routine */ + NULL, /* attach routine */ + NULL, /* detach routine */ + NULL, /* context */ + DEV_NOSAVE, /* Flags */ + 0, /* debug control */ + NULL, /* debug flag table */ + NULL, /* memory size routine */ + NULL, /* logical name */ + NULL, /* help routine */ + NULL, /* attach help routine */ + NULL, /* help context */ + &kmc_description /* Device description routine */ +}; + + /* Timers - in usec */ #define TXSTART_DELAY (10) /* TX BUFFER IN to TX start */ @@ -738,9 +767,13 @@ static t_stat kmc_reset(DEVICE* dptr) { memset (dram, 0xdd, sizeof dram); gflags |= FLG_INIT; gflags &= ~FLG_UCINI; + sim_register_internal_device (&kmc_int_rxdev); } } + kmc_int_rxdev.flags &= ~DEV_DIS; /* Make internal RX device */ + kmc_int_rxdev.flags |= (kmc_dev.flags & DEV_DIS); /* enable/disable track KDP device */ + return auto_config (dptr->name, ((dptr->flags & DEV_DIS)? 0: dptr->numunits)); /* auto config */ } @@ -3072,5 +3105,8 @@ static t_stat kmc_help (FILE *st, DEVICE *dptr, * Conventionally last function in the file. */ static const char *kmc_description (DEVICE *dptr) { - return "KMC11-A Synchronous line controller supporting only COMM IOP/DUP microcode"; + if (dptr == &kmc_dev) + return "KMC11-A Synchronous line controller supporting only COMM IOP/DUP microcode"; + else + return "KMC pseudo device for receive units"; }