Emulate spinning floppy disk, by Jan Jezabek.
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>
Thu, 13 Sep 2007 12:40:37 +0000 (12:40 +0000)
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>
Thu, 13 Sep 2007 12:40:37 +0000 (12:40 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3168 c046a42c-6fe2-441c-8c8c-71466251a162

hw/fdc.c

index 4f04b729ff179a9bf4e47b65f4089984d0318178..98a3c3131d01d1c7d7ceb0e192346f01dd4e4e83 100644 (file)
--- a/hw/fdc.c
+++ b/hw/fdc.c
@@ -1843,5 +1843,13 @@ enqueue:
 static void fdctrl_result_timer(void *opaque)
 {
     fdctrl_t *fdctrl = opaque;
+    fdrive_t *cur_drv = get_cur_drv(fdctrl);
+    /* Pretend we are spinning.
+     * This is needed for Coherent, which uses READ ID to check for
+     * sector interleaving.
+     */
+    if (cur_drv->last_sect != 0) {
+        cur_drv->sect = (cur_drv->sect % cur_drv->last_sect) + 1;
+    }
     fdctrl_stop_transfer(fdctrl, 0x00, 0x00, 0x00);
 }