diff --git a/I7000/i7000_ht.c b/I7000/i7000_ht.c index 7e3cd0cf..efda218a 100644 --- a/I7000/i7000_ht.c +++ b/I7000/i7000_ht.c @@ -183,8 +183,8 @@ MTAB ht_mod[] = { {MTUF_WLK, MTUF_WLK, "write locked", "LOCKED", NULL, NULL, NULL, "no Write ring in place"}, {MTAB_XTD | MTAB_VUN, 0, "FORMAT", "FORMAT", - &sim_tape_set_fmt, &sim_tape_show_fmt, NULL, - "Set/Display tape format (SIMH, E11, TPC, P7B)" }, + &sim_tape_set_fmt, &sim_tape_show_fmt, NULL, + "Set/Display tape format (SIMH, E11, TPC, P7B, AWS, TAR)" }, {MTAB_XTD | MTAB_VUN, 0, "LENGTH", "LENGTH", NULL, &sim_tape_show_capac, NULL, "Set unit n capacity to arg MB (0 = unlimited)" }, diff --git a/I7000/i7000_mt.c b/I7000/i7000_mt.c index d35ca979..ce605594 100644 --- a/I7000/i7000_mt.c +++ b/I7000/i7000_mt.c @@ -254,7 +254,7 @@ MTAB mt_mod[] = { #endif {MTAB_XTD | MTAB_VUN, 0, "FORMAT", "FORMAT", &sim_tape_set_fmt, &sim_tape_show_fmt, NULL, - "Set/Display tape format (SIMH, E11, TPC, P7B)"}, + "Set/Display tape format (SIMH, E11, TPC, P7B, AWS, TAR)" }, {MTAB_XTD | MTAB_VUN, 0, "LENGTH", "LENGTH", &sim_tape_set_capac, &sim_tape_show_capac, NULL, "Set unit n capacity to arg MB (0 = unlimited)" }, diff --git a/PDP11/pdp11_ta.c b/PDP11/pdp11_ta.c index 6e0ccadd..39356460 100644 --- a/PDP11/pdp11_ta.c +++ b/PDP11/pdp11_ta.c @@ -186,8 +186,6 @@ MTAB ta_mod[] = { NULL, NULL, NULL, "Write enable tape drive" }, { MTUF_WLK, MTUF_WLK, "write locked", "LOCKED", NULL, NULL, NULL, "Write lock tape drive" }, -// { MTAB_XTD|MTAB_VUN, 0, "FORMAT", "FORMAT", -// &sim_tape_set_fmt, &sim_tape_show_fmt, NULL }, { MTAB_XTD|MTAB_VUN, 0, "CAPACITY", NULL, NULL, &sim_tape_show_capac, NULL, "Display tape capacity" }, { MTAB_XTD|MTAB_VDV|MTAB_VALR, 020, "ADDRESS", "ADDRESS", diff --git a/PDP11/pdp11_tm.c b/PDP11/pdp11_tm.c index 3345424a..dc9e6181 100644 --- a/PDP11/pdp11_tm.c +++ b/PDP11/pdp11_tm.c @@ -230,8 +230,8 @@ MTAB tm_mod[] = { &tm_vlock, NULL, NULL, "Write enable tape drive" }, { MTUF_WLK, MTUF_WLK, "write locked", "LOCKED", &tm_vlock, NULL, NULL, "Write lock tape drive" }, - { MTAB_XTD|MTAB_VUN|MTAB_VALR, 0, "FORMAT", "FORMAT", - &sim_tape_set_fmt, &sim_tape_show_fmt, NULL, "Set/Display tape format (SIMH, E11, TPC, P7B)" }, + { MTAB_XTD|MTAB_VUN|MTAB_VALR, 0, "FORMAT", "FORMAT", + &sim_tape_set_fmt, &sim_tape_show_fmt, NULL, "Set/Display tape format (SIMH, E11, TPC, P7B, AWS, TAR)" }, { MTAB_XTD|MTAB_VUN|MTAB_VALR, 0, "CAPACITY", "CAPACITY", &sim_tape_set_capac, &sim_tape_show_capac, NULL, "Set/Display capacity" }, { MTAB_XTD|MTAB_VDV|MTAB_VALR, 010, "ADDRESS", "ADDRESS", diff --git a/PDP11/pdp11_tq.c b/PDP11/pdp11_tq.c index 41e7808c..61397f2f 100644 --- a/PDP11/pdp11_tq.c +++ b/PDP11/pdp11_tq.c @@ -502,8 +502,8 @@ MTAB tq_mod[] = { NULL, &tq_show_ctrl, NULL, "Display complete controller state" }, { MTAB_XTD|MTAB_VUN|MTAB_NMO, 0, "UNITQ", NULL, NULL, &tq_show_unitq, NULL, "Display unit queue" }, - { MTAB_XTD|MTAB_VUN|MTAB_VALR, 0, "FORMAT", "FORMAT", - &sim_tape_set_fmt, &sim_tape_show_fmt, NULL, "Set/Display tape format (SIMH, E11, TPC, P7B)" }, + { MTAB_XTD|MTAB_VUN|MTAB_VALR, 0, "FORMAT", "FORMAT", + &sim_tape_set_fmt, &sim_tape_show_fmt, NULL, "Set/Display tape format (SIMH, E11, TPC, P7B, AWS, TAR)" }, { MTAB_XTD|MTAB_VUN|MTAB_VALR, 0, "CAPACITY", "CAPACITY", &sim_tape_set_capac, &sim_tape_show_capac, NULL, "Set/Display capacity" }, #if defined (VM_PDP11) diff --git a/PDP11/pdp11_ts.c b/PDP11/pdp11_ts.c index 48187f25..972c1640 100644 --- a/PDP11/pdp11_ts.c +++ b/PDP11/pdp11_ts.c @@ -350,8 +350,8 @@ MTAB ts_mod[] = { NULL, NULL, NULL, "Write enable tape drive" }, { MTUF_WLK, MTUF_WLK, "write locked", "LOCKED", NULL, NULL, NULL, "Write lock tape drive" }, - { MTAB_XTD|MTAB_VUN|MTAB_VALR, 0, "FORMAT", "FORMAT", - &sim_tape_set_fmt, &sim_tape_show_fmt, NULL, "Set/Display tape format (SIMH, E11, TPC, P7B)" }, + { MTAB_XTD|MTAB_VUN|MTAB_VALR, 0, "FORMAT", "FORMAT", + &sim_tape_set_fmt, &sim_tape_show_fmt, NULL, "Set/Display tape format (SIMH, E11, TPC, P7B, AWS, TAR)" }, { MTAB_XTD|MTAB_VUN|MTAB_VALR, 0, "CAPACITY", "CAPACITY", &sim_tape_set_capac, &sim_tape_show_capac, NULL, "Set/Display capacity" }, { MTAB_XTD|MTAB_VDV|MTAB_VALR, 004, "ADDRESS", "ADDRESS", diff --git a/PDP11/pdp11_tu.c b/PDP11/pdp11_tu.c index 2d7cec82..5c51ca11 100644 --- a/PDP11/pdp11_tu.c +++ b/PDP11/pdp11_tu.c @@ -319,8 +319,8 @@ MTAB tu_mod[] = { NULL, NULL, NULL, "Set drive type to TU45" }, { UNIT_TYPE, UNIT_TU77, "TU77", "TU77", NULL, NULL, NULL, "Set drive type to TU77" }, - { MTAB_XTD|MTAB_VUN|MTAB_VALR, 0, "FORMAT", "FORMAT", - &sim_tape_set_fmt, &sim_tape_show_fmt, NULL, "Set/Display tape format (SIMH, E11, TPC, P7B)" }, + { MTAB_XTD|MTAB_VUN|MTAB_VALR, 0, "FORMAT", "FORMAT", + &sim_tape_set_fmt, &sim_tape_show_fmt, NULL, "Set/Display tape format (SIMH, E11, TPC, P7B, AWS, TAR)" }, { MTAB_XTD|MTAB_VUN|MTAB_VALR, 0, "CAPACITY", "CAPACITY", &sim_tape_set_capac, &sim_tape_show_capac, NULL, "Set unit n capacity to arg MB (0 = unlimited)" }, { MTAB_XTD|MTAB_VUN|MTAB_NMO, 0, "CAPACITY", NULL, diff --git a/sim_tape.c b/sim_tape.c index 5c1253ee..8cd534f5 100644 --- a/sim_tape.c +++ b/sim_tape.c @@ -871,7 +871,7 @@ else switch (f) { /* otherwise the read me bufcntr = bufcap; /* mark the buffer as invalid to force a read */ - *bc = MTR_GAP; /* reset the marker */ + *bc = (t_mtrlnt)MTR_GAP; /* reset the marker */ runaway_counter -= sizeof_gap / 2; /* and decrement the gap counter */ } @@ -924,7 +924,7 @@ else switch (f) { /* otherwise the read me case MTUF_F_TPC: (void)sim_fread (&tpcbc, sizeof (t_tpclnt), 1, uptr->fileref); - *bc = tpcbc; /* save rec lnt */ + *bc = (t_mtrlnt)tpcbc; /* save rec lnt */ if (ferror (uptr->fileref)) { /* error? */ MT_SET_PNU (uptr); /* pos not upd */ @@ -1007,7 +1007,7 @@ else switch (f) { /* otherwise the read me else { /* tape data record */ t_addr saved_pos; - *bc = awshdr.nxtlen; /* save rec lnt */ + *bc = (t_mtrlnt)awshdr.nxtlen; /* save rec lnt */ uptr->pos += awshdr.nxtlen; /* spc over record */ memset (&awshdr, 0, sizeof (t_awslnt)); saved_pos = (t_addr)sim_ftell (uptr->fileref); @@ -1028,9 +1028,9 @@ else switch (f) { /* otherwise the read me case MTUF_F_TAR: if (uptr->pos < uptr->hwmark) { if ((uptr->hwmark - uptr->pos) >= uptr->recsize) - *bc = uptr->recsize; /* TAR record size */ + *bc = (t_mtrlnt)uptr->recsize; /* TAR record size */ else - *bc = uptr->hwmark - uptr->pos; /* TAR remnant last record */ + *bc = (t_mtrlnt)(uptr->hwmark - uptr->pos); /* TAR remnant last record */ (void)sim_fseek (uptr->fileref, uptr->pos, SEEK_SET); uptr->pos += *bc; MT_CLR_INMRK (uptr); @@ -1197,7 +1197,7 @@ else switch (f) { /* otherwise the read me uptr->pos = uptr->pos + sizeof (t_mtrlnt) / 2; /* then position forward to resync */ bufcntr = 0; /* mark the buffer as invalid to force a read */ - *bc = MTR_GAP; /* reset the marker */ + *bc = (t_mtrlnt)MTR_GAP; /* reset the marker */ runaway_counter -= sizeof_gap / 2; /* and decrement the gap counter */ } @@ -1225,7 +1225,7 @@ else switch (f) { /* otherwise the read me ppos = sim_tape_tpc_fnd (uptr, (t_addr *) uptr->filebuf); /* find prev rec */ (void)sim_fseek (uptr->fileref, ppos, SEEK_SET);/* position */ (void)sim_fread (&tpcbc, sizeof (t_tpclnt), 1, uptr->fileref); - *bc = tpcbc; /* save rec lnt */ + *bc = (t_mtrlnt)tpcbc; /* save rec lnt */ if (ferror (uptr->fileref)) /* error? */ status = sim_tape_ioerr (uptr); @@ -1322,7 +1322,7 @@ else switch (f) { /* otherwise the read me if (MT_TST_INMRK (uptr)) /* already in a tapemark? */ awshdr.rectyp = AWS_REC; MT_CLR_INMRK (uptr); /* No longer in a tapemark */ - *bc = (awshdr.rectyp == AWS_REC) ? awshdr.prelen : 0;/* save rec lnt */ + *bc = (t_mtrlnt)((awshdr.rectyp == AWS_REC) ? awshdr.prelen : 0);/* save rec lnt */ sbc = *bc; /* extract the record length */ if ((awshdr.rectyp != AWS_TMK) || (awshdr.prelen == 0)) { @@ -1352,13 +1352,13 @@ else switch (f) { /* otherwise the read me } else { if (uptr->hwmark % uptr->recsize) - *bc = uptr->hwmark % uptr->recsize; + *bc = (t_mtrlnt)(uptr->hwmark % uptr->recsize); else - *bc = uptr->recsize; + *bc = (t_mtrlnt)uptr->recsize; } } else - *bc = uptr->recsize; + *bc = (t_mtrlnt)uptr->recsize; if (*bc) { uptr->pos -= *bc; (void)sim_fseek (uptr->fileref, uptr->pos, SEEK_SET); diff --git a/sim_tape.h b/sim_tape.h index 8a676c1a..402d2246 100644 --- a/sim_tape.h +++ b/sim_tape.h @@ -57,7 +57,7 @@ typedef uint32 t_mtrlnt; /* magtape rec lnt */ #define MTR_MAXLEN 0x00FFFFFF /* max len is 24b */ #define MTR_ERF 0x80000000 /* error flag */ #define MTR_F(x) ((x) & MTR_ERF) /* record error flg */ -#define MTR_L(x) ((x) & ~MTR_ERF) /* record length */ +#define MTR_L(x) ((t_mtrlnt)((x) & ~MTR_ERF)) /* record length */ /* TPC tape format */