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... 11.773: enter handle_13: 11.773: a=00000201 b=00000000 c=00000001 d=00000000 ds=0000 es=07c0 ss=df80 11.773: si=00000000 di=00000000 bp=00000000 sp=0000fa20 cs=f000 ip=cbfc f=0202 11.773: disk_op d=0x000f5610 lba=0 buf=0x00007c00 count=1 cmd=2 11.773: Floppy_drive_recal 0 11.773: Floppy_enable_controller 11.773: handle_0e 11.773: handle_0e 11.773: handle_0e 11.773: Floppy_media_sense on drive 0 found rate 0 11.773: handle_0e 11.773: Booting from 0000:7c00 11.773: enter handle_13: 11.773: a=00000000 b=00000000 c=00000000 d=00000000 ds=7c00 es=0000 ss=df80 11.773: si=00000000 di=00000000 bp=00000000 sp=0000fa20 cs=0000 ip=7cc0 f=0202 11.773: disk_op d=0x000f5610 lba=514 buf=0x0000f879 count=0 cmd=0 11.773: Floppy_disable_controller 11.773: Floppy_enable_controller 11.773: handle_0e 11.773: enter handle_13: 11.773: a=00000800 b=00000000 c=00000000 d=00000000 ds=7c00 es=0000 ss=df80 11.773: si=00000000 di=00000000 bp=00000000 sp=0000fa20 cs=0000 ip=7cc8 f=0202 11.773: enter handle_13: 11.773: a=00000204 b=00000000 c=00000001 d=00000000 ds=7c00 es=5000 ss=df80 11.773: si=00000000 di=000057b0 bp=00000000 sp=0000fa20 cs=0000 ip=7cde f=0202 11.773: disk_op d=0x000f5610 lba=0 buf=0x00050000 count=4 cmd=2 11.773: Floppy_drive_recal 0 11.773: handle_0e 11.773: handle_0e 11.773: Floppy_media_sense on drive 0 found rate 0 11.773: handle_0e 20.867: i8042_command cmd=ae 20.867: i8042_wait_write 20.867: enter handle_13: 20.867: a=00000201 b=00000000 c=00001c01 d=00000000 ds=5000 es=6000 ss=df80 20.867: si=00000000 di=000057b0 bp=0000001e sp=0000fa20 cs=5000 ip=0188 f=0246 20.867: disk_op d=0x000f5610 lba=1008 buf=0x00060000 count=1 cmd=2 20.906: i8042_command cmd=ae 20.906: i8042_wait_write 25.775: handle_0e 25.775: floppy error: 40 04 10 1c 00 01 02 25.775: invalid basic_access:96: 25.775: a=00000200 b=00000000 c=00001c01 d=00000000 ds=5000 es=6000 ss=df80 25.775: si=00000000 di=000057b0 bp=0000001e sp=0000fa20 cs=5000 ip=0188 f=0246
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; }