diff --git a/PDP10/ka10_dpk.c b/PDP10/ka10_dpk.c index 4f6b9201..d83994d9 100644 --- a/PDP10/ka10_dpk.c +++ b/PDP10/ka10_dpk.c @@ -112,7 +112,7 @@ DEVICE dpk_dev = { DPK_NAME, dpk_unit, NULL, dpk_mod, 2, 8, 0, 1, 8, 36, NULL, NULL, dpk_reset, NULL, dpk_attach, dpk_detach, - &dpk_dib, DEV_DISABLE | DEV_DIS | DEV_DEBUG, 0, dev_debug, + &dpk_dib, DEV_DISABLE | DEV_DIS | DEV_DEBUG | DEV_MUX, 0, dev_debug, NULL, NULL, dpk_help, NULL, NULL, dpk_description }; diff --git a/PDP10/ka10_iii.c b/PDP10/ka10_iii.c index 0c9cc1be..55776842 100644 --- a/PDP10/ka10_iii.c +++ b/PDP10/ka10_iii.c @@ -320,7 +320,7 @@ DEVICE iii_dev = { "III", iii_unit, NULL, iii_mod, 2, 10, 31, 1, 8, 8, NULL, NULL, iii_reset, - NULL, NULL, NULL, &iii_dib, DEV_DEBUG | DEV_DISABLE | DEV_DIS, 0, dev_debug, + NULL, NULL, NULL, &iii_dib, DEV_DEBUG | DEV_DISABLE | DEV_DIS | DEV_DISPLAY, 0, dev_debug, NULL, NULL, &iii_help, NULL, NULL, &iii_description }; diff --git a/PDP10/ka10_mty.c b/PDP10/ka10_mty.c index f47e4a9f..dce73314 100644 --- a/PDP10/ka10_mty.c +++ b/PDP10/ka10_mty.c @@ -94,7 +94,7 @@ DEVICE mty_dev = { MTY_NAME, mty_unit, NULL, mty_mod, 2, 8, 0, 1, 8, 36, NULL, NULL, mty_reset, NULL, mty_attach, mty_detach, - &mty_dib, DEV_DISABLE | DEV_DIS | DEV_DEBUG, 0, dev_debug, + &mty_dib, DEV_DISABLE | DEV_DIS | DEV_DEBUG | DEV_MUX, 0, dev_debug, NULL, NULL, mty_help, NULL, NULL, mty_description }; diff --git a/PDP10/ka10_tk10.c b/PDP10/ka10_tk10.c index 1ddfcd77..9815c29a 100644 --- a/PDP10/ka10_tk10.c +++ b/PDP10/ka10_tk10.c @@ -92,7 +92,7 @@ DEVICE tk10_dev = { TK10_NAME, tk10_unit, NULL, tk10_mod, 1, 8, 0, 1, 8, 36, NULL, NULL, tk10_reset, NULL, tk10_attach, tk10_detach, - &tk10_dib, DEV_DISABLE | DEV_DIS | DEV_DEBUG, 0, dev_debug, + &tk10_dib, DEV_DISABLE | DEV_DIS | DEV_DEBUG | DEV_MUX, 0, dev_debug, NULL, NULL, tk10_help, NULL, NULL, tk10_description }; diff --git a/PDP10/kl10_fe.c b/PDP10/kl10_fe.c index b2593963..39e0eba1 100644 --- a/PDP10/kl10_fe.c +++ b/PDP10/kl10_fe.c @@ -554,7 +554,7 @@ DEVICE tty_dev = { 2, 10, 31, 1, 8, 8, &tmxr_ex, &tmxr_dep, &tty_reset, NULL, &tty_attach, &tty_detach, - NULL, DEV_NET | DEV_DISABLE | DEV_DEBUG, 0, dev_debug, + NULL, DEV_MUX | DEV_DISABLE | DEV_DEBUG, 0, dev_debug, NULL, NULL, &tty_help, NULL, NULL, &tty_description }; #endif diff --git a/PDP10/kl10_nia.c b/PDP10/kl10_nia.c index a755703e..734649a6 100644 --- a/PDP10/kl10_nia.c +++ b/PDP10/kl10_nia.c @@ -419,7 +419,7 @@ DEVICE nia_dev = { "NI", nia_unit, nia_reg, nia_mod, 3, 8, 0, 1, 8, 36, NULL, NULL, &nia_reset, NULL, &nia_attach, &nia_detach, - &nia_dib, DEV_DISABLE | DEV_DIS | DEV_DEBUG, 0, nia_debug, + &nia_dib, DEV_DISABLE | DEV_DIS | DEV_DEBUG | DEV_ETHER, 0, nia_debug, NULL, NULL, &nia_help, NULL, NULL, &nia_description }; diff --git a/PDP10/kx10_dc.c b/PDP10/kx10_dc.c index 3adfe3db..8e652455 100644 --- a/PDP10/kx10_dc.c +++ b/PDP10/kx10_dc.c @@ -147,7 +147,7 @@ DEVICE dc_dev = { 1, 10, 31, 1, 8, 8, &tmxr_ex, &tmxr_dep, &dc_reset, NULL, &dc_attach, &dc_detach, - &dc_dib, DEV_NET | DEV_DISABLE | DEV_DEBUG, 0, dev_debug, + &dc_dib, DEV_MUX | DEV_DISABLE | DEV_DEBUG, 0, dev_debug, NULL, NULL, &dc_help, NULL, NULL, &dc_description }; @@ -433,18 +433,18 @@ t_stat dc_setnl (UNIT *uptr, int32 val, CONST char *cptr, void *desc) return r; if (newln > dc_modem) return SCPE_ARG; - if ((newln == 0) || (newln >= DC10_MLINES) || (newln % 8) != 0) + if ((newln == 0) || (newln > DC10_MLINES) || (newln % 8) != 0) return SCPE_ARG; if (newln < dc_desc.lines) { - for (i = newln, t = 0; i < dc_desc.lines; i++) + for (i = newln - 1, t = 0; i < dc_desc.lines; i++) t = t | dc_ldsc[i].conn; if (t && !get_yn ("This will disconnect users; proceed [N]?", FALSE)) return SCPE_OK; - for (i = newln; i < dc_desc.lines; i++) { + for (i = newln - 1; i < dc_desc.lines; i++) { if (dc_ldsc[i].conn) { tmxr_linemsg (&dc_ldsc[i], "\r\nOperator disconnected line\r\n"); tmxr_send_buffered_data (&dc_ldsc[i]); - } + } tmxr_detach_ln (&dc_ldsc[i]); /* completely reset line */ } } @@ -468,7 +468,7 @@ t_stat dc_set_log (UNIT *uptr, int32 val, CONST char *cptr, void *desc) if ((cptr == NULL) || (*cptr == 0) || (gbuf[0] == 0)) return SCPE_ARG; ln = (int32) get_uint (gbuf, 10, dc_desc.lines, &r); - if ((r != SCPE_OK) || (ln >= dc_desc.lines)) + if ((r != SCPE_OK) || (ln > dc_desc.lines)) return SCPE_ARG; return tmxr_set_log (NULL, ln, cptr, desc); } @@ -483,7 +483,7 @@ t_stat dc_set_nolog (UNIT *uptr, int32 val, CONST char *cptr, void *desc) if (cptr == NULL) return SCPE_ARG; ln = (int32) get_uint (cptr, 10, dc_desc.lines, &r); - if ((r != SCPE_OK) || (ln >= dc_desc.lines)) + if ((r != SCPE_OK) || (ln > dc_desc.lines)) return SCPE_ARG; return tmxr_set_nolog (NULL, ln, NULL, desc); } diff --git a/PDP10/kx10_defs.h b/PDP10/kx10_defs.h index 5c6e3978..5dbd7f07 100644 --- a/PDP10/kx10_defs.h +++ b/PDP10/kx10_defs.h @@ -606,7 +606,7 @@ extern void ka10_lights_clear_aux (int); #define NUM_DEVS_DP 0 #define NUM_DEVS_LP20 1 #define NUM_DEVS_TTY 1 -#define NUM_LINES_TTY 40 +#define NUM_LINES_TTY 64 #define NUM_DEVS_NIA 1 #else #define NUM_DEVS_RC 1 diff --git a/PDP10/kx10_dp.c b/PDP10/kx10_dp.c index 40ac232f..cd13e4cb 100644 --- a/PDP10/kx10_dp.c +++ b/PDP10/kx10_dp.c @@ -423,6 +423,7 @@ t_stat dp_devio(uint32 dev, uint64 *data) { /* Stop controller */ sim_cancel(uptr); df10_finish_op(df10, 0); + uptr->STATUS &= ~(BUSY); } /* Clear flags */ uptr->STATUS &= ~(*data & CLRMSK); diff --git a/PDP10/kx10_dpy.c b/PDP10/kx10_dpy.c index a2111dc0..668cda4e 100644 --- a/PDP10/kx10_dpy.c +++ b/PDP10/kx10_dpy.c @@ -30,6 +30,29 @@ * for PDP-6 described in * http://www.bitsavers.org/pdf/dec/graphics/H-340_Type_340_Precision_Incremental_CRT_System_Nov64.pdf * + * The MIT file .INFO.;340 INFO says: + * ;CONI BITS OF THE 340 ARE: + * ;2.9-2.7 MODE + * ;2.4 VECT CONT LP(????) + * ;2.3 VERTICAL EDGE HIT + * ;2.2 LIGHT PEN HIT + * ;2.1 HORIZONTAL EDGE HIT + * ;1.9 STOP + * ;1.8 DONE (CAUSES DATA INTERUPT) + * ;1.6-1.4 SPECIAL PIA + * ;1.3-1.1 DATA PIA + * ;340 CONO BITS ARE: + * ;2.3 CLEAR NO INK MODE + * ;2.2 SET NO INK MODE (IN NO INK MODE, NO INTENSIFICATION CAN \ + * OCCUR) + * ;2.1 CLEAR HALF WORD MODE + * ;1.9 SET HALF WORD MODE + * ;1.8 RESUME DISPLAY (TO CONTINUE AFTER A SPECIAL INTERUPT) + * ;1.7 INTIALIZE + * ;1.6-1.4 SPECIAL PIA + * ;1.3-1.1 DATA PIA + * ITS uses the "resume display" bit, so it has been implemented here. + * * 340C was used in the PDP-10 VB10C display system * http://bitsavers.informatik.uni-stuttgart.de/pdf/dec/pdp10/periph/VB10C_Interactive_Graphics_Terminal_Jul70.pdf * "The basic hardware system consists of a 340/C display connected @@ -55,7 +78,7 @@ * 7 PI channel? * DISCON = CHAN + 140 (continue?) * *NO* DATAO or BLKO to device 130! - * + * * It appears that the reloc/protect mechanism is on I/O device 134. * (referred to by number, not symbol!) * DATAO sets reloc/protect, start addr @@ -138,6 +161,7 @@ extern uint64 SW; /* switch register */ #define CONI_INT_HE 0001000 /* I- b26: HOR EDGE */ #define CONI_INT_SI 0000400 /* I- b27: STOP INT */ #define CONI_INT_DONE 0000200 /* I- b28: done with second half */ +#define CONO_RESUME 0000200 /* -O b28: resume after special int */ #define CONO_INIT 0000100 /* -O b29: init display */ #define CONX_SC 0000070 /* IO special channel */ #define CONX_DC 0000007 /* IO data channel */ @@ -169,7 +193,7 @@ DEVICE dpy_dev = { NUM_DEVS_DPY, 0, 0, 0, 0, 0, NULL, NULL, dpy_reset, NULL, NULL, NULL, - &dpy_dib, DEV_DISABLE | DEV_DIS | DEV_DEBUG, 0, NULL, + &dpy_dib, DEV_DISABLE | DEV_DIS | DEV_DEBUG | DEV_DISPLAY, 0, NULL, NULL, NULL, NULL, NULL, NULL, &dpy_description }; @@ -253,6 +277,13 @@ t_stat dpy_devio(uint32 dev, uint64 *data) { uptr->STAT_REG |= *data & CONO_MASK; if (*data & CONO_INIT) dpy_update_status( uptr, ty340_reset(&dpy_dev), 1); + if (*data & CONO_RESUME) { + /* This bit is not documented in "H-340 Type 340 Precision + Incremental CRT System". It is in the MIT file .INFO.; + 340 INFO, and ITS does depend on it. */ + ty340_clear(CONI_INT_VE | CONI_INT_LP | CONI_INT_HE); + dpy_update_status( uptr, ty340_status(), 0); + } sim_debug(DEBUG_CONO, &dpy_dev, "DPY %03o CONO %06o PC=%06o %06o\n", dev, (uint32)*data, PC, uptr->STAT_REG & ~STAT_VALID); if (!sim_is_active(uptr)) @@ -266,7 +297,7 @@ t_stat dpy_devio(uint32 dev, uint64 *data) { /* if fed using BLKO from interrupt vector, PC will be wrong! */ sim_debug(DEBUG_DATAIO, &dpy_dev, "DPY %03o DATO %012llo PC=%06o\n", dev, *data, PC); - + inst = (uint32)LRZ(*data); if (dpy_update_status(uptr, ty340_instruction(inst), 0)) { /* still running */ diff --git a/PDP10/kx10_imp.c b/PDP10/kx10_imp.c index 53323ed2..4ebd6c16 100644 --- a/PDP10/kx10_imp.c +++ b/PDP10/kx10_imp.c @@ -563,7 +563,7 @@ DEVICE imp_dev = { "IMP", imp_unit, imp_reg, imp_mod, 3, 8, 0, 1, 8, 36, NULL, NULL, &imp_reset, NULL, &imp_attach, &imp_detach, - &imp_dib, DEV_DISABLE | DEV_DIS | DEV_DEBUG, 0, imp_debug, + &imp_dib, DEV_DISABLE | DEV_DIS | DEV_DEBUG | DEV_ETHER, 0, imp_debug, NULL, NULL, &imp_help, NULL, NULL, &imp_description }; #define IMP_OCHN 0000007