"Do you consistently see the fault in the same place?"
No, this is random place. I test BOOT-PROM3 disk and try boot PC more time. Every time is a different place e.g.:
lba=1051, lba=1086, lba=1015
but if try boot PC without any floppy inserted to FDD have this log:
Booting from Floppy... enter handle_13: a=00000201 b=00000000 c=00000001 d=00000000 ds=0000 es=07c0 ss=df80 si=00000000 di=00000000 bp=00000000 sp=0000f930 cs=f000 ip=cb97 f=0202 disk_op d=0x000f5520 lba=0 buf=0x00007c00 count=1 cmd=2 Floppy_drive_recal 0 Floppy_enable_controller handle_0e handle_0e WARNING - Timeout at floppy_wait_irq:206! Floppy_disable_controller Floppy_enable_controller handle_0e WARNING - Timeout at floppy_wait_irq:206! Floppy_disable_controller invalid basic_access:96: a=00000200 b=00000000 c=00000001 d=00000000 ds=0000 es=07c0 ss=df80 si=00000000 di=00000000 bp=00000000 sp=0000f930 cs=f000 ip=cb97 f=0202 handle_0e Boot failed: could not read the boot disk
enter handle_18: NULL Booting from DVD/CD...
On Fri, Dec 13, 2013 at 10:43:18AM +0100, Gelip wrote:
"Do you consistently see the fault in the same place?"
No, this is random place. I test BOOT-PROM3 disk and try boot PC more time. Every time is a different place e.g.:
lba=1051, lba=1086, lba=1015
Does the patch below on top of the testing git repo help?
-Kevin
diff --git a/src/hw/floppy.c b/src/hw/floppy.c index b848203..a7f6707 100644 --- a/src/hw/floppy.c +++ b/src/hw/floppy.c @@ -558,7 +558,7 @@ floppy_read(struct disk_op_s *op) goto fail; return DISK_RET_SUCCESS; fail: - op->count = 0; // no sectors read + //op->count = 0; // no sectors read return res; }
@@ -587,7 +587,7 @@ floppy_write(struct disk_op_s *op) goto fail; return DISK_RET_SUCCESS; fail: - op->count = 0; // no sectors read + //op->count = 0; // no sectors read return res; }
@@ -603,7 +603,7 @@ floppy_verify(struct disk_op_s *op) // This command isn't implemented - just return success. return DISK_RET_SUCCESS; fail: - op->count = 0; // no sectors read + //op->count = 0; // no sectors read return res; }
@@ -633,20 +633,33 @@ process_floppy_op(struct disk_op_s *op) if (!CONFIG_FLOPPY) return 0;
- switch (op->command) { - case CMD_RESET: - return floppy_reset(op); - case CMD_READ: - return floppy_read(op); - case CMD_WRITE: - return floppy_write(op); - case CMD_VERIFY: - return floppy_verify(op); - case CMD_FORMAT: - return floppy_format(op); - default: - op->count = 0; - return DISK_RET_EPARAM; + int origcount = op->count, retry = 0; + for (;;) { + int ret; + switch (op->command) { + case CMD_RESET: + return floppy_reset(op); + case CMD_READ: + ret = floppy_read(op); + break; + case CMD_WRITE: + ret = floppy_write(op); + break; + case CMD_VERIFY: + ret = floppy_verify(op); + break; + case CMD_FORMAT: + ret = floppy_format(op); + break; + default: + op->count = 0; + return DISK_RET_EPARAM; + } + if (ret == DISK_RET_ECONTROLLER && retry++ < 2) + continue; + if (ret != DISK_RET_SUCCESS && op->count == origcount) + op->count = 0; + return ret; } }