All Tape DEVICES: Added extra case points for new MTSE definitions

Merge changes from v3.12-2
This commit is contained in:
Bob Supnik 2022-06-16 16:13:46 -07:00 committed by Mark Pizzolato
parent bcaed7d0b0
commit 8d49d8c297
13 changed files with 44 additions and 47 deletions

View file

@ -1,6 +1,6 @@
/* h316_mt.c: H316/516 magnetic tape simulator
Copyright (c) 2003-2012, Robert M. Supnik
Copyright (c) 2003-2022, 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 @@
mt 516-4100 seven track magnetic tape
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)
09-Jun-07 RMS Fixed bug in write without stop (Theo Engel)
@ -521,6 +522,7 @@ switch (st) {
case MTSE_FMT: /* illegal fmt */
case MTSE_UNATT: /* unattached */
default: /* unknown error */
mt_err = 1; /* reject */
case MTSE_OK: /* no error */
return SCPE_IERR; /* never get here! */
@ -551,9 +553,6 @@ switch (st) {
case MTSE_WRP: /* write protect */
mt_err = 1; /* error */
return STOP_MTWRP;
default: /* shouldn't happen */
return SCPE_IERR;
}
return SCPE_OK;

View file

@ -1,6 +1,6 @@
/* i1401_mt.c: IBM 1401 magnetic tape simulator
Copyright (c) 1993-2016, Robert M. Supnik
Copyright (c) 1993-2022, 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 @@
mt 7-track magtape
26-Mar-22 RMS Added extra case points for new MTSE definitions
20-Oct-16 RMS Must call sim_tape_attach to use library (Mark Pizzolato)
03-Sep-13 RMS Read TMK does not write GM+WM to memory
19-Mar-11 RMS Restored lost edit to insert EOF in memory on read EOF
@ -418,6 +419,7 @@ switch (st) {
break;
case MTSE_FMT: /* illegal fmt */
default: /* unknown error */
return SCPE_IERR;
case MTSE_UNATT: /* not attached */
@ -443,9 +445,6 @@ switch (st) {
case MTSE_WRP: /* write protect */
return STOP_MTL;
default: /* shouldn't happen */
return SCPE_IERR;
}
return SCPE_OK;

View file

@ -1,6 +1,6 @@
/* i7094_mt.c: IBM 7094 magnetic tape simulator
Copyright (c) 2003-2012, Robert M Supnik
Copyright (c) 2003-2022, 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,8 @@
mt magtape simulator
26-Mar-22 RMS Added extra case points for new MTSE definitions
11-Mar-22 RMS Removed dead code (COVERITY)
19-Mar-12 RMS Fixed declaration of sel_name (Mark Pizzolato)
16-Jul-10 RMS Fixed handling of BSR, BSF (Dave Pitts)
*/
@ -510,7 +512,7 @@ if (ch >= NUM_CHAN) /* invalid chan? */
return SCPE_IERR;
xb = mtxb[ch]; /* get xfer buf */
u = mt_unit[ch] & 017;
if ((xb == NULL) || (u > MT_NUMDR)) /* invalid args? */
if (u > MT_NUMDR) /* invalid args */
return SCPE_IERR;
uptr = mt_dev[ch].units + u; /* get unit */
mt_chob[ch] = val & DMASK; /* save word from chan */
@ -753,6 +755,7 @@ switch (st) {
case MTSE_FMT: /* illegal fmt */
case MTSE_UNATT: /* not attached */
default: /* unknown error */
ch6_err_disc (ch, u, CHF_TRC);
mt_unit[ch] = 0; /* disconnect */
return SCPE_IERR;
@ -788,9 +791,6 @@ switch (st) {
case MTSE_OK: /* no error */
break;
default: /* shouldn't happen */
return SCPE_IERR;
}
return SCPE_OK;

View file

@ -1,6 +1,6 @@
/* id_mt.c: Interdata magnetic tape simulator
Copyright (c) 2001-2008, Robert M Supnik
Copyright (c) 2001-2022, 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 @@
mt M46-494 dual density 9-track magtape controller
26-Mar-22 RMS Added extra case points for new MTSE definitions
16-Feb-06 RMS Added tape capacity checking
18-Mar-05 RMS Added attached test to detach routine
07-Dec-04 RMS Added read-only file support
@ -425,6 +426,7 @@ switch (st) {
case MTSE_FMT: /* illegal fmt */
case MTSE_UNATT: /* not attached */
default: /* unknown error */
mt_sta = mt_sta | STA_ERR;
case MTSE_OK: /* no error */
return SCPE_IERR;
@ -454,9 +456,6 @@ switch (st) {
case MTSE_BOT: /* reverse into BOT */
uptr->UST = uptr->UST | STA_EOT; /* set err */
break;
default: /* shouldn't happen */
return SCPE_IERR;
} /* end switch */
return SCPE_OK;

View file

@ -1,6 +1,6 @@
/* nova_mta.c: NOVA magnetic tape simulator
Copyright (c) 1993-2017, Robert M. Supnik
Copyright (c) 1993-2022, 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 @@
mta magnetic tape
26-Mar-22 RMS Added extra case points for new MTSE definitions
13-Mar-17 RMS Annotated fall through in switch
04-Jul-07 BKR fixed boot code to properly boot self-boot tapes;
boot routine now uses standard DG APL boot code;
@ -514,6 +515,7 @@ switch (st) {
case MTSE_FMT: /* illegal fmt */
mta_upddsta (uptr, uptr->USTAT | STA_WLK | STA_RDY);
/* fall through */
default:
case MTSE_UNATT: /* unattached */
mta_sta = mta_sta | STA_ILL;
/* fall through */
@ -552,9 +554,6 @@ switch (st) {
mta_upddsta (uptr, uptr->USTAT | STA_WLK | STA_RDY);
mta_sta = mta_sta | STA_ILL; /* illegal operation */
break;
default: /* shouldn't happen */
return SCPE_IERR;
}
return SCPE_OK;

View file

@ -1,6 +1,6 @@
/* pdp10_tu.c - PDP-10 RH11/TM03/TU45 magnetic tape simulator
Copyright (c) 1993-2018, Robert M Supnik
Copyright (c) 1993-2022, 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
26-Mar-22 RMS Added extra case points for new MTSE definitions
07-Sep-20 RMS Fixed || -> | in macro (Mark Pizzolato)
12-Jan-18 RMS Fixed missing () in logical test (Mark Pizzolato)
29-Dec-17 RMS Read tape mark must set Massbus EXC (TRE)
@ -1095,6 +1096,7 @@ switch (st) {
case MTSE_FMT: /* illegal fmt */
case MTSE_UNATT: /* not attached */
default: /* unknown error */
set_tuer (ER_NXF); /* can't execute */
if (qdt) /* data xfr? set TRE */
tucs1 = tucs1 | CS1_TRE;

View file

@ -1,6 +1,6 @@
/* pdp11_ta.c: PDP-11 cassette tape simulator
Copyright (c) 2007-2013, Robert M Supnik
Copyright (c) 2007-2022, 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 @@
ta TA11/TU60 cassette tape
26-Mar-22 RMS Added extra case points for new MTSE definitions
23-Oct-13 RMS Revised for new boot setup routine
06-Jun-13 RMS Reset must set RDY (Ian Hammond)
Added CAPS-11 bootstrap (Ian Hammond)
@ -530,6 +531,7 @@ switch (st) {
case MTSE_UNATT: /* unattached */
ta_cs |= TACS_ERR|TACS_CRC;
case MTSE_OK: /* no error */
default: /* unknown error*/
return SCPE_IERR; /* never get here! */
case MTSE_TMK: /* end of file */

View file

@ -1,6 +1,6 @@
/* pdp11_tm.c: PDP-11 magnetic tape simulator
Copyright (c) 1993-2013, Robert M Supnik
Copyright (c) 1993-2022, 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 @@
tm TM11/TU10 magtape
26-Mar-22 RMS Added extra case points for new MTSE definitions
23-Oct-13 RMS Revised for new boot setup routine
16-Feb-06 RMS Added tape capacity checking
31-Oct-05 RMS Fixed address width for large files
@ -541,6 +542,7 @@ switch (st) {
case MTSE_UNATT: /* not attached */
tm_sta = tm_sta | STA_ILL;
case MTSE_OK: /* no error */
default: /* unknown error */
return SCPE_IERR;
case MTSE_TMK: /* tape mark */
@ -572,9 +574,6 @@ switch (st) {
case MTSE_WRP: /* write protect */
tm_sta = tm_sta | STA_ILL; /* illegal operation */
break;
default: /* shouldn't happen */
return SCPE_IERR;
}
return SCPE_OK;

View file

@ -1,6 +1,6 @@
/* pdp11_tq.c: TMSCP tape controller simulator
Copyright (c) 2002-2013, Robert M Supnik
Copyright (c) 2002-2022, 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 @@
tq TQK50 tape controller
26-Mar-22 RMS Added extra case points for new MTSE definitions
23-Oct-13 RMS Revised for new boot setup routine
23-Jan-12 MP Added missing support for Logical EOT detection while
positioning.
@ -1583,11 +1584,12 @@ switch (st) {
uptr->flags = uptr->flags | UNIT_SXC;
return ST_WPR;
default:
uptr->flags = uptr->flags | UNIT_SXC;
return SCPE_IERR;
case MTSE_LEOT:
return ST_LED;
default: /* shouldn't happen */
return SCPE_IERR;
}
return ST_SUC;

View file

@ -1,6 +1,6 @@
/* pdp11_ts.c: TS11/TSV05 magnetic tape simulator
Copyright (c) 1993-2014, Robert M Supnik
Copyright (c) 1993-2022, 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 @@
ts TS11/TSV05 magtape
26-Mar-22 RMS Added extra case points for new MTSE definitions
27-Oct-14 RMS Fixed bug in read forward with byte swap
23-Oct-13 RMS Revised for new boot setup routine
19-Mar-12 RMS Fixed declaration of cpu_opt (Mark Pizzolato)
@ -484,6 +485,7 @@ switch (st) {
msgxs0 = msgxs0 | XS0_MOT; /* tape has moved */
case MTSE_INVRL: /* invalid rec lnt */
case MTSE_IOERR: /* IO error */
default: /* unknown error */
msgxs1 = msgxs1 | XS1_UCOR; /* uncorrectable */
return (XTC (XS0_RLS, TC6)); /* pos lost */
@ -500,9 +502,6 @@ switch (st) {
case MTSE_WRP: /* write protect */
msgxs0 = msgxs0 | XS0_WLE | XS0_NEF; /* can't execute */
return (XTC (XS0_WLE | XS0_NEF, TC3));
default: /* shouldn't happen */
return SCPE_IERR;
}
return 0;

View file

@ -1,6 +1,6 @@
/* pdp18b_mt.c: 18b PDP magnetic tape simulator
Copyright (c) 1993-2016, Robert M Supnik
Copyright (c) 1993-2022, 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"),
@ -26,6 +26,7 @@
mt (PDP-9) TC59 magtape
(PDP-15) TC59D magtape
26-Mar-22 RMS Added extra case points for new MTSE definitions
10-Mar-16 RMS Added 3-cycle databreak set/show entries
07-Mar-16 RMS Revised for dynamically allocated memory
13-Sep-15 RMS Added APIVEC register
@ -437,6 +438,7 @@ switch (st) {
case MTSE_FMT: /* illegal fmt */
case MTSE_UNATT: /* not attached */
default: /* unknown error */
mt_sta = mt_sta | STA_ILL | STA_ERR;
case MTSE_OK: /* no error */
return SCPE_IERR;
@ -472,9 +474,6 @@ switch (st) {
case MTSE_WRP: /* write protect */
mt_sta = mt_sta | STA_ILL | STA_ERR; /* illegal operation */
break;
default: /* shouldn't happen */
return SCPE_IERR;
}
return SCPE_OK;

View file

@ -1,6 +1,6 @@
/* pdp8_mt.c: PDP-8 magnetic tape simulator
Copyright (c) 1993-2011, Robert M Supnik
Copyright (c) 1993-2022, 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 @@
mt TM8E/TU10 magtape
26-Mar-22 RMS Added extra case points for new MTSE definitions
16-Feb-06 RMS Added tape capacity checking
16-Aug-05 RMS Fixed C++ declaration and cast problems
18-Mar-05 RMS Added attached test to detach routine
@ -558,6 +559,7 @@ switch (st) {
case MTSE_FMT: /* illegal fmt */
case MTSE_UNATT: /* unattached */
default: /* unknown error */
mt_sta = mt_sta | STA_ILL | STA_ERR;
case MTSE_OK: /* no error */
return SCPE_IERR; /* never get here! */
@ -590,9 +592,6 @@ switch (st) {
case MTSE_WRP: /* write protect */
mt_sta = mt_sta | STA_ILL | STA_ERR; /* illegal operation */
break;
default: /* shouldn't happen */
return SCPE_IERR;
}
return SCPE_OK;

View file

@ -1,6 +1,6 @@
/* sigma_mt.c: Sigma 732X 9-track magnetic tape
Copyright (c) 2007-2017, Robert M. Supnik
Copyright (c) 2007-2022, 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 @@
mt 7320 and 7322/7323 magnetic tape
26-Mar-22 RMS Added extra case points for new MTSE definitions
13-Mar-17 RMS Annotated fall through in switch
Magnetic tapes are represented as a series of variable records
@ -477,6 +478,7 @@ switch (st) {
case MTSE_FMT: /* illegal fmt */
case MTSE_UNATT: /* not attached */
case MTSE_WRP: /* write protect */
default: /* unknown error*/
chan_set_chf (mt_dib.dva, CHF_XMME); /* set err, fall through */
case MTSE_OK: /* no error */
chan_uen (mt_dib.dva); /* uend */
@ -508,9 +510,6 @@ switch (st) {
uptr->UST |= MTDV_BOT; /* set BOT */
chan_uen (mt_dib.dva); /* uend */
return CHS_INACTV;
default: /* shouldn't happen */
return SCPE_IERR;
} /* end switch */
return SCPE_OK;