--- np2/cbus/scsicmd.c 2005/02/07 14:46:08 1.5 +++ np2/cbus/scsicmd.c 2005/03/05 06:02:28 1.7 @@ -75,7 +75,7 @@ REG8 scsicmd_select(REG8 id) { return(0x42); } sxsi = sxsi_getptr((REG8)(0x20 + id)); - if ((sxsi) && (sxsi->type)) { + if ((sxsi) && (sxsi->flag & SXSIFLAG_READY)) { scsiio.phase = SCSIPH_COMMAND; return(0x8a); // Transfer CommandÍ×µá } @@ -92,7 +92,7 @@ REG8 scsicmd_transfer(REG8 id, UINT8 *cd } sxsi = sxsi_getptr((REG8)(0x20 + id)); - if ((sxsi == NULL) || (sxsi->type == 0)) { + if ((sxsi == NULL) || (!(sxsi->flag & SXSIFLAG_READY))) { return(0x42); } @@ -127,7 +127,7 @@ static REG8 scsicmd_cmd(REG8 id) { return(0x42); } sxsi = sxsi_getptr((REG8)(0x20 + id)); - if ((sxsi == NULL) || (sxsi->type == 0)) { + if ((sxsi == NULL) || (!(sxsi->flag & SXSIFLAG_READY))) { return(0x42); } switch(scsiio.cmd[0]) { @@ -144,7 +144,7 @@ static REG8 scsicmd_cmd(REG8 id) { return(0xff); } -BOOL scsicmd_send(void) { +BRESULT scsicmd_send(void) { switch(scsiio.phase) { case SCSIPH_COMMAND: