Commit b7ffa3b1d25f2c68e851dc65fbfd97762f6c1748

Authored by ths
1 parent cb4b976b

Emulate spinning floppy disk, by Jan Jezabek.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3168 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 8 additions and 0 deletions
hw/fdc.c
... ... @@ -1843,5 +1843,13 @@ enqueue:
1843 1843 static void fdctrl_result_timer(void *opaque)
1844 1844 {
1845 1845 fdctrl_t *fdctrl = opaque;
  1846 + fdrive_t *cur_drv = get_cur_drv(fdctrl);
  1847 + /* Pretend we are spinning.
  1848 + * This is needed for Coherent, which uses READ ID to check for
  1849 + * sector interleaving.
  1850 + */
  1851 + if (cur_drv->last_sect != 0) {
  1852 + cur_drv->sect = (cur_drv->sect % cur_drv->last_sect) + 1;
  1853 + }
1846 1854 fdctrl_stop_transfer(fdctrl, 0x00, 0x00, 0x00);
1847 1855 }
... ...