--- np2/bios/sxsibios.c 2004/01/23 12:04:08 1.4 +++ np2/bios/sxsibios.c 2004/01/27 03:24:19 1.7 @@ -6,6 +6,7 @@ #include "sxsibios.h" #include "scsicmd.h" #include "sxsi.h" +#include "timing.h" typedef REG8 (*SXSIFUNC)(UINT type, SXSIDEV sxsi); @@ -111,7 +112,25 @@ static REG8 sxsibios_format(UINT type, S long pos; if (CPU_AH & 0x80) { - ret = 0xd0; + if (type == SXSIBIOS_SCSI) { // とりあえずSCSIのみ + UINT count; + long posmax; + count = timing_getcount(); // 時間を止める + ret = 0; + pos = 0; + posmax = sxsi->surfaces * sxsi->cylinders; + while(pos < posmax) { + ret = sxsi_format(CPU_AL, pos * sxsi->sectors); + if (ret) { + break; + } + pos++; + } + timing_setcount(count); // 再開 + } + else { + ret = 0xd0; + } } else { if (CPU_DL) { @@ -167,6 +186,7 @@ static REG8 sasibios_init(UINT type, SXS static REG8 sasibios_sense(UINT type, SXSIDEV sxsi) { + TRACEOUT(("sasibios_sense type=%d", type)); if (type == SXSIBIOS_SASI) { return((REG8)((sxsi->type >> 8) & 7)); } @@ -177,7 +197,7 @@ static REG8 sasibios_sense(UINT type, SX CPU_DH = sxsi->surfaces; CPU_DL = sxsi->sectors; } - return(0x00); + return(0x0f); } }