Skip to content

Commit

Permalink
Release V3.12-5
Browse files Browse the repository at this point in the history
  • Loading branch information
deltecent committed Jul 18, 2024
1 parent 4fa9ca4 commit 48830b9
Show file tree
Hide file tree
Showing 53 changed files with 3,634 additions and 373 deletions.
7 changes: 5 additions & 2 deletions H316/h316_mt.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* h316_mt.c: H316/516 magnetic tape simulator
Copyright (c) 2003-2022, Robert M. Supnik
Copyright (c) 2003-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"),
Expand All @@ -25,6 +25,7 @@
mt 516-4100 seven track magnetic tape
01-Nov-23 RMS Reset should use sim_tape_bot
26-Mar-22 RMS Added extra case points for new MTSE definitions
03-Jul-13 RLA compatibility changes for extended interrupts
19-Mar-12 RMS Fixed declaration of chan_req (Mark Pizzolato)
Expand Down Expand Up @@ -590,7 +591,9 @@ for (i = 0; i < MT_NUMDR; i++) { /* loop thru units */
uptr = mt_dev.units + i;
sim_tape_reset (uptr); /* reset tape */
sim_cancel (uptr); /* cancel op */
uptr->UST = uptr->pos? 0: STA_BOT; /* update status */
if ((uptr->flags & UNIT_ATT) && sim_tape_bot (uptr))
uptr->UST = STA_BOT;
else uptr->UST = 0;
uptr->FNC = FNC_NOP;
}
return SCPE_OK;
Expand Down
5 changes: 3 additions & 2 deletions NOVA/nova_mta.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* nova_mta.c: NOVA 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"),
Expand All @@ -25,6 +25,7 @@
mta magnetic tape
02-Nov-23 RMS Mode change should test STA_BOT, not sim_tape_BOT
26-Mar-22 RMS Added extra case points for new MTSE definitions
23-Mar-20 RMS Unload should call sim_tape_detach (Mark Pizzolato)
13-Mar-17 RMS Annotated fall through in switch
Expand Down Expand Up @@ -371,7 +372,7 @@ else switch (c) { /* case on command */
break;

case CU_DMODE: /* drive mode */
if (!sim_tape_bot (uptr)) /* must be BOT */
if ((uptr->USTAT & STA_BOT) == 0) /* must be BOT */
mta_sta = mta_sta | STA_ILL;
else mta_upddsta (uptr, (mta_cu & CU_PE)? /* update drv status */
uptr->USTAT | STA_PEM: uptr->USTAT & ~ STA_PEM);
Expand Down
9 changes: 8 additions & 1 deletion PDP10/pdp10_defs.h
Original file line number Diff line number Diff line change
@@ -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"),
Expand All @@ -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
Expand Down Expand Up @@ -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 */

Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
12 changes: 6 additions & 6 deletions PDP10/pdp10_rp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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 */
Expand Down
5 changes: 4 additions & 1 deletion PDP10/pdp10_sys.c
Original file line number Diff line number Diff line change
@@ -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"),
Expand All @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -93,6 +95,7 @@ DEVICE *sim_devices[] = {
&rp_dev,
&tu_dev,
&dz_dev,
&ch_dev,
NULL
};

Expand Down
59 changes: 33 additions & 26 deletions PDP10/pdp10_tu.c
Original file line number Diff line number Diff line change
@@ -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"),
Expand All @@ -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)
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -185,15 +190,15 @@
*/

#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 */
#define FS_PE 0000040 /* ^PE status */
#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 */
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -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));
Expand All @@ -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
Expand Down Expand Up @@ -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.
Expand Down
Loading

0 comments on commit 48830b9

Please sign in to comment.