summaryrefslogtreecommitdiff
path: root/hw/fdc.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-09-13 12:40:37 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-09-13 12:40:37 +0000
commitb7ffa3b1d25f2c68e851dc65fbfd97762f6c1748 (patch)
tree73ba4130657732ce85aab10f87cc4e2138c5eab4 /hw/fdc.c
parentcb4b976b82749b29ca6731d47e3a3237b32f9497 (diff)
downloadqemu-b7ffa3b1d25f2c68e851dc65fbfd97762f6c1748.zip
Emulate spinning floppy disk, by Jan Jezabek.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3168 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/fdc.c')
-rw-r--r--hw/fdc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/fdc.c b/hw/fdc.c
index 4f04b729ff..98a3c3131d 100644
--- 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);
}