From 1035aa3e7ab61c409be8bc5f632dad5eb236baf7 Mon Sep 17 00:00:00 2001 From: Richard Cornwell Date: Tue, 23 Jun 2020 21:01:09 -0400 Subject: [PATCH] I7000: B5500: Set output only devices to default to append mode. --- I7000/i7000_cdp.c | 1 + I7000/i7000_dsk.c | 4 ++-- I7000/i7000_lpr.c | 1 + I7000/i7000_mt.c | 6 +----- I7000/i7090_cdp.c | 1 + I7000/i7090_cpu.c | 3 +-- I7000/i7090_lpr.c | 1 + 7 files changed, 8 insertions(+), 9 deletions(-) diff --git a/I7000/i7000_cdp.c b/I7000/i7000_cdp.c index b664360e..004b1949 100644 --- a/I7000/i7000_cdp.c +++ b/I7000/i7000_cdp.c @@ -281,6 +281,7 @@ cdp_attach(UNIT * uptr, CONST char *file) { t_stat r; + sim_switches |= SWMASK ('A'); /* Position to EOF */ if ((r = sim_card_attach(uptr, file)) != SCPE_OK) return r; if (uptr->up7 == 0) { diff --git a/I7000/i7000_dsk.c b/I7000/i7000_dsk.c index e51c3c19..c9def519 100644 --- a/I7000/i7000_dsk.c +++ b/I7000/i7000_dsk.c @@ -1391,8 +1391,8 @@ disk_write(UNIT * uptr, uint8 data, int chan, int eor) data &= (sense[schan] & STAT_SIXBIT)?077:0277; if (uptr->u5 & DSKSTA_CHECK) { if (dbuffer[u][uptr->u6++] != data) { - fprintf(stderr, "Mismatch %d %03o != %03o\n\r", - uptr->u6-1, dbuffer[u][uptr->u6-1], data); + sim_printf("Mismatch %d %03o != %03o\n\r", + uptr->u6-1, dbuffer[u][uptr->u6-1], data); disk_posterr(uptr, DATA_CHECK); } } else { diff --git a/I7000/i7000_lpr.c b/I7000/i7000_lpr.c index 6e052a6d..b471dd57 100644 --- a/I7000/i7000_lpr.c +++ b/I7000/i7000_lpr.c @@ -475,6 +475,7 @@ lpr_attach(UNIT * uptr, CONST char *file) { t_stat r; + sim_switches |= SWMASK ('A'); /* Position to EOF */ if ((r = attach_unit(uptr, file)) != SCPE_OK) return r; uptr->u5 = 0; diff --git a/I7000/i7000_mt.c b/I7000/i7000_mt.c index 3cc95dee..fa4ab9e9 100644 --- a/I7000/i7000_mt.c +++ b/I7000/i7000_mt.c @@ -381,9 +381,6 @@ uint32 mt_cmd(UNIT * uptr, uint16 cmd, uint16 dev) uptr += unit; /* If unit disabled return error */ if (uptr->flags & UNIT_DIS) { - /* - fprintf(stderr, "Attempt to access disconnected unit %s%d\n", - dptr->name, unit); */ return SCPE_NODEV; } @@ -396,8 +393,7 @@ uint32 mt_cmd(UNIT * uptr, uint16 cmd, uint16 dev) /* If drive is offline or not attached return not ready */ if ((uptr->flags & (UNIT_ATT | MTUF_ONLINE)) != (UNIT_ATT | MTUF_ONLINE)) { - fprintf(stderr, "Attempt to access offline unit %s%d\n\r", - dptr->name, unit); + sim_printf("Attempt to access offline unit %s%d\n\r", dptr->name, unit); return SCPE_IOERR; } /* Check if drive is ready to recieve a command */ diff --git a/I7000/i7090_cdp.c b/I7000/i7090_cdp.c index c0cae9f9..00205e17 100644 --- a/I7000/i7090_cdp.c +++ b/I7000/i7090_cdp.c @@ -255,6 +255,7 @@ cdp_attach(UNIT * uptr, CONST char *file) { t_stat r; + sim_switches |= SWMASK ('A'); /* Position to EOF */ if ((r = sim_card_attach(uptr, file)) != SCPE_OK) return r; if (uptr->up7 == 0) { diff --git a/I7000/i7090_cpu.c b/I7000/i7090_cpu.c index e47547a4..60f27d2b 100644 --- a/I7000/i7090_cpu.c +++ b/I7000/i7090_cpu.c @@ -4126,8 +4126,7 @@ prottrap: #endif default: - fprintf(stderr, "Invalid opcode %o IC=%o %012llo\n", - opcode, IC, temp); + sim_printf("Invalid opcode %o IC=%o %012llo\n", opcode, IC, temp); reason = STOP_UUO; break; } diff --git a/I7000/i7090_lpr.c b/I7000/i7090_lpr.c index 73769fc6..32955356 100644 --- a/I7000/i7090_lpr.c +++ b/I7000/i7090_lpr.c @@ -660,6 +660,7 @@ lpr_attach(UNIT * uptr, CONST char *file) { t_stat r; + sim_switches |= SWMASK ('A'); /* Position to EOF */ if ((r = attach_unit(uptr, file)) != SCPE_OK) return r; uptr->u5 = 0;