mirror of
https://github.com/simh/simh.git
synced 2026-05-17 02:21:42 +00:00
PDP1, PDP8, PDP11 and PDP18b's: Properly detach when tape off reel is detected
- This change avoids the possibility of mangling a tape image if the tape type auto detection (12b, 16b, 18b) has changed the in memory tape format. - Anyone who wants the off reel detection to have the simulator drop back to a sim> prompt should have a non-zero value in the STOP_OFFR register.
This commit is contained in:
@@ -132,7 +132,9 @@
|
||||
#define IOT_SKP (1 << IOT_V_SKP)
|
||||
#define IOT_V_REASON (IOT_V_SKP + 1) /* reason */
|
||||
#define IOT_REASON (1 << IOT_V_REASON)
|
||||
#define IORETURN(f,v) ((f)? (v): SCPE_OK) /* stop on error */
|
||||
#define IORETURN(f,v) ((f)? (v): /* stop on error */ \
|
||||
(((v) != STOP_DTOFF) ? SCPE_OK : \
|
||||
sim_messagef ((v), "*** DECtape has gone off reel - listen for the flapping tape\r\n"), SCPE_OK)) /* stop on error */
|
||||
|
||||
/* I/O status flags */
|
||||
|
||||
|
||||
@@ -680,7 +680,7 @@ if (mot & DTS_DIR) /* update pos */
|
||||
else uptr->pos = uptr->pos + delta;
|
||||
if (((int32) uptr->pos < 0) ||
|
||||
((int32) uptr->pos > (DTU_FWDEZ (uptr) + DT_EZLIN))) {
|
||||
detach_unit (uptr); /* off reel? */
|
||||
dt_detach (uptr); /* off reel? */
|
||||
uptr->STATE = uptr->pos = 0;
|
||||
unum = (int32) (uptr - dt_dev.units);
|
||||
if (unum == DTA_GETUNIT (dtsa)) /* if selected, */
|
||||
@@ -755,7 +755,7 @@ switch (fnc) { /* at speed, check fnc *
|
||||
return SCPE_OK;
|
||||
|
||||
case DTS_OFR: /* off reel */
|
||||
detach_unit (uptr); /* must be deselected */
|
||||
dt_detach (uptr); /* must be deselected */
|
||||
uptr->STATE = uptr->pos = 0; /* no visible action */
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user