mirror of
https://github.com/open-simh/simh.git
synced 2026-04-07 22:20:48 +00:00
Release V3.12-5
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/* pdp10_defs.h: PDP-10 simulator definitions
|
||||
|
||||
Copyright (c) 1993-2017, Robert M Supnik
|
||||
Copyright (c) 1993-2024, 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"),
|
||||
@@ -23,6 +23,7 @@
|
||||
used in advertising or otherwise to promote the sale, use or other dealings
|
||||
in this Software without prior written authorization from Robert M Supnik.
|
||||
|
||||
05-May-24 RMS Merged CH11 (Lars Brinkhoff)
|
||||
19-Jan-17 RMS Fixed CD11 definition (Mark Pizzolatto)
|
||||
30-Jun-13 RMS Fixed IPL4 mask definition (Tim Litt)
|
||||
22-May-10 RMS Added check for 64b addresses
|
||||
@@ -683,6 +684,8 @@ typedef struct pdp_dib DIB;
|
||||
#define IOLN_PTR 004
|
||||
#define IOBA_PTP (IO_UBA3 + 017554) /* PC11 punch */
|
||||
#define IOLN_PTP 004
|
||||
#define IOBA_CH (IO_UBA3 + 0764140) /* CH11 Chaosnet */
|
||||
#define IOLN_CH 020
|
||||
|
||||
/* Common Unibus CSR flags */
|
||||
|
||||
@@ -721,6 +724,7 @@ typedef struct pdp_dib DIB;
|
||||
#define INT_V_CR 27 /* CD20 (CD11) */
|
||||
#define INT_V_DUPRX 28 /* DUP11 */
|
||||
#define INT_V_DUPTX 29
|
||||
#define INT_V_CH 30
|
||||
|
||||
#define INT_RP (1u << INT_V_RP)
|
||||
#define INT_TU (1u << INT_V_TU)
|
||||
@@ -738,6 +742,7 @@ typedef struct pdp_dib DIB;
|
||||
#define INT_CR (1u << INT_V_CD)
|
||||
#define INT_DUPRX (1u << INT_V_DUPRX)
|
||||
#define INT_DUPTX (1u << INT_V_DUPTX)
|
||||
#define INT_CH (1u << INT_V_CH)
|
||||
|
||||
#define IPL_RP 6 /* int levels */
|
||||
#define IPL_TU 6
|
||||
@@ -750,6 +755,7 @@ typedef struct pdp_dib DIB;
|
||||
#define IPL_RY 5
|
||||
#define IPL_DUPRX 5
|
||||
#define IPL_DUPTX 5
|
||||
#define IPL_CH 5
|
||||
#define IPL_PTR 4
|
||||
#define IPL_PTP 4
|
||||
#define IPL_LP20 4
|
||||
@@ -771,6 +777,7 @@ typedef struct pdp_dib DIB;
|
||||
#define VEC_CR 0230
|
||||
#define VEC_RP 0254
|
||||
#define VEC_RY 0264
|
||||
#define VEC_CH 0270
|
||||
#define VEC_DZRX 0340
|
||||
#define VEC_DZTX 0344
|
||||
#define VEC_LP20 0754
|
||||
|
||||
@@ -1123,12 +1123,12 @@ for (i = 0; i < RP_NUMDR; i++) {
|
||||
if (uptr->flags & UNIT_ATT)
|
||||
if (uptr->flags & UNIT_UTS) {
|
||||
sim_cancel (uptr);
|
||||
rpds[i] = (rpds[i] & DS_VV) | DS_DPR | DS_RDY | DS_MOL |
|
||||
rpds[i] = (rpds[i] & DS_VV) | DS_DPR | DS_RDY | DS_MOL |
|
||||
((uptr->flags & UNIT_WPRT)? DS_WRL: 0);
|
||||
} else {
|
||||
if (!sim_is_active (uptr))
|
||||
sim_activate (uptr, SPINUP_DLY);
|
||||
rpds[i] = DS_DPR | ((uptr->flags & UNIT_WPRT)? DS_WRL: 0);
|
||||
rpds[i] = DS_DPR | ((uptr->flags & UNIT_WPRT)? DS_WRL: 0);
|
||||
}
|
||||
else {
|
||||
sim_cancel (uptr);
|
||||
@@ -1194,10 +1194,10 @@ rpds[drv] = (rpds[drv] & ~(DS_MOL | DS_RDY | DS_WRL | DS_VV | DS_OF)) |
|
||||
if (sim_is_active (uptr)) { /* unit active? */
|
||||
sim_cancel (uptr); /* cancel operation */
|
||||
if (uptr->flags & UNIT_UTS) {
|
||||
rper1[drv] = rper1[drv] | ER1_OPI; /* set drive error */
|
||||
if (uptr->FUNC >= FNC_WCHK) /* data transfer? */
|
||||
rpcs1 = rpcs1 | CS1_DONE | CS1_TRE; /* set done, err */
|
||||
}
|
||||
rper1[drv] = rper1[drv] | ER1_OPI; /* set drive error */
|
||||
if (uptr->FUNC >= FNC_WCHK) /* data transfer? */
|
||||
rpcs1 = rpcs1 | CS1_DONE | CS1_TRE; /* set done, err */
|
||||
}
|
||||
}
|
||||
uptr->flags &= ~UNIT_UTS;
|
||||
update_rpcs (0, drv); /* request intr */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* pdp10_sys.c: PDP-10 simulator interface
|
||||
|
||||
Copyright (c) 1993-2017, Robert M Supnik
|
||||
Copyright (c) 1993-2024, 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"),
|
||||
@@ -23,6 +23,7 @@
|
||||
used in advertising or otherwise to promote the sale, use or other dealings
|
||||
in this Software without prior written authorization from Robert M Supnik.
|
||||
|
||||
05-May-24 RMS Merged CH11 (Lars Brinkhoff)
|
||||
09-Mar-17 RMS Added mask on EXE repeat count (COVERITY)
|
||||
Fixed word count test in EXE loader (COVERITY)
|
||||
20-Jan-17 RMS Fixed RIM loader to handle ITS and RIM10B formats
|
||||
@@ -58,6 +59,7 @@ extern DEVICE dz_dev;
|
||||
extern DEVICE ry_dev;
|
||||
extern DEVICE cr_dev;
|
||||
extern DEVICE lp20_dev;
|
||||
extern DEVICE ch_dev;
|
||||
extern UNIT cpu_unit;
|
||||
extern REG cpu_reg[];
|
||||
extern d10 *M;
|
||||
@@ -93,6 +95,7 @@ DEVICE *sim_devices[] = {
|
||||
&rp_dev,
|
||||
&tu_dev,
|
||||
&dz_dev,
|
||||
&ch_dev,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* pdp10_tu.c - PDP-10 RH11/TM03/TU45 magnetic tape simulator
|
||||
|
||||
Copyright (c) 1993-2022, Robert M Supnik
|
||||
Copyright (c) 1993-2023, 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 @@
|
||||
|
||||
tu RH11/TM03/TU45 magtape
|
||||
|
||||
06-Nov-23 RMS Fixed BOT logic
|
||||
26-Mar-22 RMS Added extra case points for new MTSE definitions
|
||||
07-Sep-20 RMS Fixed || -> | in macro (Mark Pizzolato)
|
||||
23-Mar-20 RMS Unload should call sim_tape_detach (Mark Pizzolato)
|
||||
@@ -95,6 +96,10 @@
|
||||
level sensitive.
|
||||
- The DONE interrupt, once set, is not disabled if IE is cleared,
|
||||
but the SC interrupt is.
|
||||
|
||||
BOT is not the same as POS == 0. BOT is set after rewinding or after
|
||||
a reverse operation from before the first record. It is cleared by
|
||||
any successful motion operation.
|
||||
*/
|
||||
|
||||
#include "pdp10_defs.h"
|
||||
@@ -185,7 +190,7 @@
|
||||
*/
|
||||
|
||||
#define FS_SAT 0000001 /* slave attention */
|
||||
#define FS_BOT 0000002 /* ^beginning of tape */
|
||||
#define FS_BOT 0000002 /* +beginning of tape */
|
||||
#define FS_TMK 0000004 /* end of file */
|
||||
#define FS_ID 0000010 /* ID burst detected */
|
||||
#define FS_SLOW 0000020 /* slowing down NI */
|
||||
@@ -193,7 +198,7 @@
|
||||
#define FS_SSC 0000100 /* slave stat change */
|
||||
#define FS_RDY 0000200 /* ^formatter ready */
|
||||
#define FS_FPR 0000400 /* formatter present */
|
||||
#define FS_EOT 0002000 /* +end of tape */
|
||||
#define FS_EOT 0002000 /* ^end of tape */
|
||||
#define FS_WRL 0004000 /* ^write locked */
|
||||
#define FS_MOL 0010000 /* ^medium online */
|
||||
#define FS_PIP 0020000 /* +pos in progress */
|
||||
@@ -678,7 +683,7 @@ switch (fnc) { /* case on function */
|
||||
tufs = tufs & ~(FS_SAT | FS_SSC | FS_ID | FS_ERR);
|
||||
if (!(uptr->TU_STATEFLAGS & TUS_ATTPENDING))
|
||||
sim_cancel (uptr); /* stop motion, not on-line delay */
|
||||
uptr->USTAT = 0; /* fall through */
|
||||
uptr->USTAT &= FS_BOT; /* fall through */
|
||||
case FNC_NOP:
|
||||
tucs1 = tucs1 & ~CS1_GO; /* no operation */
|
||||
return;
|
||||
@@ -689,8 +694,10 @@ switch (fnc) { /* case on function */
|
||||
break;
|
||||
}
|
||||
tutc = TC_RIP; /* density = 800 */
|
||||
sim_tape_rewind (&tu_unit[0]); /* rewind unit 0 */
|
||||
tu_unit[0].USTAT = 0;
|
||||
if (tu_unit[0].flags & UNIT_ATT) { /* attached? */
|
||||
sim_tape_rewind (&tu_unit[0]); /* rewind unit 0 */
|
||||
tu_unit[0].USTAT = FS_BOT;
|
||||
}
|
||||
tucs1 = tucs1 & ~CS1_GO;
|
||||
tufs = tufs & ~FS_TMK;
|
||||
return;
|
||||
@@ -735,7 +742,7 @@ switch (fnc) { /* case on function */
|
||||
set_tuer (ER_UNS);
|
||||
break;
|
||||
}
|
||||
if (sim_tape_bot (uptr) || ((tutc & TC_FCS) == 0)) {
|
||||
if ((uptr->USTAT & FS_BOT) || ((tutc & TC_FCS) == 0)) {
|
||||
set_tuer (ER_NXF);
|
||||
break;
|
||||
}
|
||||
@@ -763,7 +770,7 @@ switch (fnc) { /* case on function */
|
||||
|
||||
case FNC_WCHKR: /* wchk = read */
|
||||
case FNC_READR: /* read rev */
|
||||
if (tufs & FS_BOT) { /* beginning of tape? */
|
||||
if (uptr->USTAT & FS_BOT) { /* beginning of tape? */
|
||||
set_tuer (ER_NXF);
|
||||
break;
|
||||
}
|
||||
@@ -837,7 +844,9 @@ if (uptr->TU_STATEFLAGS & TUS_ATTPENDING) {
|
||||
|
||||
if (uptr->USTAT & FS_REW) { /* rewind or unload? */
|
||||
sim_tape_rewind (uptr); /* rewind tape */
|
||||
uptr->USTAT = 0; /* clear status */
|
||||
if (uptr->flags & UNIT_ATT) /* attached? */
|
||||
uptr->USTAT = FS_BOT; /* set BOT */
|
||||
else uptr->USTAT = 0; /* clear status */
|
||||
tufs = tufs | FS_ATA | FS_SSC;
|
||||
update_tucs (CS1_SC, drv); /* update status */
|
||||
return SCPE_OK;
|
||||
@@ -1043,23 +1052,19 @@ if ((flag & ~tucs1) & CS1_DONE) /* DONE 0 to 1? */
|
||||
tuiff = (tucs1 & CS1_IE)? 1: 0; /* CSTB INTR <- IE */
|
||||
if (GET_FMTR (tucs2) == 0) { /* formatter present? */
|
||||
tufs = (tufs & ~FS_DYN) | FS_FPR;
|
||||
if (tu_unit[drv].TU_STATEFLAGS & TUS_ATTPENDING) /* Delayed on-line timer running? */
|
||||
act = 0; /* Not a tape motion op */
|
||||
if (tu_unit[drv].TU_STATEFLAGS & TUS_ATTPENDING) /* delayed on-line timer running? */
|
||||
act = 0; /* bot a tape motion op */
|
||||
else {
|
||||
if (tu_unit[drv].flags & UNIT_ATT) {
|
||||
tufs = tufs | FS_MOL | tu_unit[drv].USTAT;
|
||||
if (tu_unit[drv].UDENS == TC_1600)
|
||||
tufs = tufs | FS_PE;
|
||||
if (sim_tape_wrp (&tu_unit[drv]))
|
||||
tufs = tufs | FS_WRL;
|
||||
if (!act) {
|
||||
if (sim_tape_bot (&tu_unit[drv]))
|
||||
tufs = tufs | FS_BOT;
|
||||
if (sim_tape_eot (&tu_unit[drv]))
|
||||
if (tu_unit[drv].flags & UNIT_ATT) {
|
||||
tufs = tufs | FS_MOL | (tu_unit[drv].USTAT & 0177777);
|
||||
if (tu_unit[drv].UDENS == TC_1600)
|
||||
tufs = tufs | FS_PE;
|
||||
if (sim_tape_wrp (&tu_unit[drv]))
|
||||
tufs = tufs | FS_WRL;
|
||||
if (!act && sim_tape_eot (&tu_unit[drv]))
|
||||
tufs = tufs | FS_EOT;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (tuer)
|
||||
tufs = tufs | FS_ERR;
|
||||
}
|
||||
@@ -1140,6 +1145,7 @@ switch (st) {
|
||||
break;
|
||||
|
||||
case MTSE_BOT: /* reverse into BOT */
|
||||
uptr->USTAT = FS_BOT; /* set BOT */
|
||||
break;
|
||||
|
||||
case MTSE_WRP: /* write protect */
|
||||
@@ -1178,8 +1184,9 @@ for (u = 0; u < TU_NUMDR; u++) { /* loop thru units */
|
||||
sim_cancel (uptr); /* cancel activity */
|
||||
else if (!sim_is_active(uptr) )
|
||||
sim_activate (uptr, SPINUPDLY);
|
||||
|
||||
uptr->USTAT = 0;
|
||||
if ((uptr->flags & UNIT_ATT) && sim_tape_bot (uptr))
|
||||
uptr->USTAT = FS_BOT;
|
||||
else uptr->USTAT = 0;
|
||||
}
|
||||
if (xbuf == NULL)
|
||||
xbuf = (uint8 *) calloc (MT_MAXFR + 4, sizeof (uint8));
|
||||
@@ -1198,7 +1205,7 @@ t_stat r;
|
||||
r = sim_tape_attach (uptr, cptr);
|
||||
if (r != SCPE_OK)
|
||||
return r;
|
||||
uptr->USTAT = 0; /* clear unit status */
|
||||
uptr->USTAT = FS_BOT; /* set BOT */
|
||||
uptr->UDENS = UD_UNK; /* unknown density */
|
||||
/* Delay setting MOL since we may have just detached a previous file.
|
||||
* In that case, the OS must see MOL clear, so that it will know that the
|
||||
@@ -1244,7 +1251,7 @@ return sim_tape_detach (uptr);
|
||||
}
|
||||
|
||||
/* Device bootstrap */
|
||||
/* Note that the dec and ITS boot code is word for word identical,
|
||||
/* Note that the DEC and ITS boot code is word for word identical,
|
||||
* except for the IO instructions. The ITS instructions encode the
|
||||
* UBA number. No attempt is made to allow UBA selection under ITS,
|
||||
* though it should work with the DEC rom.
|
||||
|
||||
Reference in New Issue
Block a user