Skip to content

Commit

Permalink
All Tape DEVICES: Added extra case points for new MTSE definitions
Browse files Browse the repository at this point in the history
Merge changes from v3.12-2
  • Loading branch information
Bob Supnik authored and markpizz committed Jun 16, 2022
1 parent bcaed7d commit 8d49d8c
Show file tree
Hide file tree
Showing 13 changed files with 44 additions and 47 deletions.
7 changes: 3 additions & 4 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-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"),
Expand All @@ -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)
Expand Down Expand Up @@ -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! */
Expand Down Expand Up @@ -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;
Expand Down
7 changes: 3 additions & 4 deletions I1401/i1401_mt.c
Original file line number Diff line number Diff line change
@@ -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"),
Expand All @@ -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
Expand Down Expand Up @@ -418,6 +419,7 @@ switch (st) {
break;

case MTSE_FMT: /* illegal fmt */
default: /* unknown error */
return SCPE_IERR;

case MTSE_UNATT: /* not attached */
Expand All @@ -443,9 +445,6 @@ switch (st) {

case MTSE_WRP: /* write protect */
return STOP_MTL;

default: /* shouldn't happen */
return SCPE_IERR;
}

return SCPE_OK;
Expand Down
10 changes: 5 additions & 5 deletions I7094/i7094_mt.c
Original file line number Diff line number Diff line change
@@ -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"),
Expand All @@ -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)
*/
Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -788,9 +791,6 @@ switch (st) {

case MTSE_OK: /* no error */
break;

default: /* shouldn't happen */
return SCPE_IERR;
}

return SCPE_OK;
Expand Down
7 changes: 3 additions & 4 deletions Interdata/id_mt.c
Original file line number Diff line number Diff line change
@@ -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"),
Expand All @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
7 changes: 3 additions & 4 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-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"),
Expand All @@ -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;
Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 3 additions & 1 deletion 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-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"),
Expand All @@ -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)
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 3 additions & 1 deletion PDP11/pdp11_ta.c
Original file line number Diff line number Diff line change
@@ -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"),
Expand All @@ -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)
Expand Down Expand Up @@ -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 */
Expand Down
7 changes: 3 additions & 4 deletions PDP11/pdp11_tm.c
Original file line number Diff line number Diff line change
@@ -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"),
Expand All @@ -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
Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -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;
Expand Down
10 changes: 6 additions & 4 deletions PDP11/pdp11_tq.c
Original file line number Diff line number Diff line change
@@ -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"),
Expand All @@ -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.
Expand Down Expand Up @@ -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;
Expand Down
7 changes: 3 additions & 4 deletions PDP11/pdp11_ts.c
Original file line number Diff line number Diff line change
@@ -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"),
Expand All @@ -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)
Expand Down Expand Up @@ -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 */

Expand All @@ -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;
Expand Down
7 changes: 3 additions & 4 deletions PDP18B/pdp18b_mt.c
Original file line number Diff line number Diff line change
@@ -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"),
Expand All @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
7 changes: 3 additions & 4 deletions PDP8/pdp8_mt.c
Original file line number Diff line number Diff line change
@@ -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"),
Expand All @@ -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
Expand Down Expand Up @@ -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! */
Expand Down Expand Up @@ -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;
Expand Down
Loading

0 comments on commit 8d49d8c

Please sign in to comment.