1
0
mirror of https://github.com/rcornwell/sims.git synced 2026-01-24 03:17:02 +00:00

IBM360: Fix DASD to work correctly when device not attached.

This commit is contained in:
Richard Cornwell 2021-10-23 22:30:49 -04:00
parent dee87e744b
commit 7325bd86f7

View File

@ -405,13 +405,13 @@ uint8 dasd_startcmd(UNIT *uptr, uint8 cmd) {
sim_debug(DEBUG_CMD, dptr, "CMD unit=%d %02x\n", unit, cmd);
if ((uptr->flags & UNIT_ATT) == 0) {
if (cmd != 0) { // if ((cmd & 0xF) == 0x4) { /* Sense */
uptr->CMD |= cmd;
sim_activate(uptr, 10);
return 0;
if (cmd == 0) {
return SNS_UNITCHK;
}
sim_debug(DEBUG_CMD, dptr, "CMD unit=%d disco\n", unit);
return SNS_CHNEND|SNS_UNITCHK;
uptr->CMD |= cmd;
sim_activate(uptr, 10);
return 0;
}
switch (cmd & 0x3) {
@ -435,7 +435,7 @@ uint8 dasd_startcmd(UNIT *uptr, uint8 cmd) {
}
if (uptr->SNS & 0xff) {
sim_debug(DEBUG_CMD, dptr, "CMD unit=%d test %08x\n", unit, uptr->SNS);
return SNS_CHNEND|SNS_UNITCHK;
return SNS_CHNEND|SNS_DEVEND|SNS_UNITCHK;
}
}
return SNS_CHNEND;