--- np2/cbus/ideio.c 2005/02/12 12:40:38 1.9 +++ np2/cbus/ideio.c 2005/03/05 06:02:28 1.10 @@ -58,7 +58,7 @@ static BRESULT setidentify(IDEDRV drv) { UINT32 size; sxsi = sxsi_getptr(drv->sxsidrv); - if ((sxsi == NULL) || (sxsi->fname[0] == '\0')) { + if ((sxsi == NULL) || (!(sxsi->flag & SXSIFLAG_READY))) { return(FAILURE); } @@ -797,9 +797,10 @@ static void devinit(IDEDRV drv, REG8 sxs SXSIDEV sxsi; ZeroMemory(drv, sizeof(_IDEDRV)); + drv->sxsidrv = sxsidrv; sxsi = sxsi_getptr(sxsidrv); - if ((sxsi != NULL) && (sxsi->fname[0] != '\0')) { - drv->sxsidrv = sxsidrv; + if ((sxsi != NULL) && + (sxsi->devtype == SXSIDEV_HDD) && (sxsi->flag & SXSIFLAG_READY)) { drv->status = IDESTAT_DRDY | IDESTAT_DSC; drv->error = IDEERR_AMNF; drv->device = IDETYPE_HDD; @@ -836,18 +837,6 @@ void ideio_reset(void) { drv->device = IDETYPE_CDROM; #endif -#if 0 - ideio.dev[0].drv[0].status = IDE_READY | IDE_SEEKCOMPLETE; - ideio.dev[0].drv[0].error = 1; - ideio.dev[1].drv[0].status = IDE_READY | IDE_SEEKCOMPLETE; - ideio.dev[1].drv[0].error = 1; - - ideio.dev[0].drv[0].sxsidrv = 0x00; - ideio.dev[0].drv[1].sxsidrv = 0x01; - ideio.dev[1].drv[0].sxsidrv = 0x02; - ideio.dev[1].drv[1].sxsidrv = 0x03; -#endif - CopyMemory(mem + 0xd0000, idebios, sizeof(idebios)); TRACEOUT(("use simulate ide.rom")); } @@ -881,4 +870,10 @@ void ideio_bind(void) { } } +void ideio_notify(REG8 sxsidrv, UINT action) { + + (void)sxsidrv; + (void)action; +} + #endif /* SUPPORT_IDEIO */