On Sun, Dec 08, 2013 at 10:32:29AM +0100, Gelip wrote:
This is log from other floppy BOOT-PROM disk3. Menu start OK but after select NIC driver have error: http://savepic.net/4022663.htm 11.773: Booting from Floppy...
Thanks. I'm not really sure what the problem is. From your two examples, it looks like failures occur on cylinders other than the first. You could try the patch below that sets the drive timing parameters and uses some more conservative values.
-Kevin
diff --git a/src/hw/floppy.c b/src/hw/floppy.c index 48958e6..1fb8b6e 100644 --- a/src/hw/floppy.c +++ b/src/hw/floppy.c @@ -41,8 +41,8 @@ // floppy here struct floppy_ext_dbt_s diskette_param_table2 VARFSEG = { .dbt = { - .specify1 = 0xAF, // step rate 12ms, head unload 240ms - .specify2 = 0x02, // head load time 4ms, DMA used + .specify1 = 0x4F, // step rate 12ms, head unload 240ms + .specify2 = 0x10, // head load time 16ms, DMA used .shutoff_ticks = FLOPPY_MOTOR_TICKS, // ~2 seconds .bps_code = FLOPPY_SIZE_CODE, .sectors = 18, @@ -386,6 +386,19 @@ floppy_drive_readid(u8 floppyid, u8 data_rate, u8 head) return ret; if (pio.data[0] & 0xc0) return -1; + + // send a Specify command to controller + pio.cmdlen = 3; + pio.resplen = 0; + pio.waitirq = 0; + pio.data[0] = 0x03; // 03: Specify drive parameters + pio.data[1] = GET_GLOBAL(diskette_param_table2.dbt.specify1); + pio.data[2] = GET_GLOBAL(diskette_param_table2.dbt.specify2); + dprintf(1, "Floppy send specify %x %x\n", pio.data[1], pio.data[2]); + ret = floppy_pio(&pio); + if (ret) + return ret; + return 0; }