VirtualBox

Changeset 47664 in vbox


Ignore:
Timestamp:
Aug 12, 2013 9:31:16 AM (11 years ago)
Author:
vboxsync
Message:

DevFdc: Drive table comments, fail recal on missing drive.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/DevFdc.cpp

    r47611 r47664  
    311311} fd_format_t;
    312312
     313/* Note: Low-density disks (160K/180K/320K/360K) use 250 Kbps data rate
     314 * in 40-track drives, but 300 Kbps in high-capacity 80-track drives.
     315 */
    313316static fd_format_t fd_formats[] = {
    314317    /* First entry is default format */
     
    346349    { FDRIVE_DRV_120, FDRIVE_DISK_288,  9, 80, 1, FDRIVE_RATE_250K,  "720 kB 5\"1/4", },
    347350    { FDRIVE_DRV_120, FDRIVE_DISK_288, 11, 80, 1, FDRIVE_RATE_250K,  "880 kB 5\"1/4", },
    348     /* 360 kB 5"1/4 floppy disks */
     351    /* 360 kB 5"1/4 floppy disks (newer 9-sector formats) */
    349352    { FDRIVE_DRV_120, FDRIVE_DISK_288,  9, 40, 1, FDRIVE_RATE_300K,  "360 kB 5\"1/4", },
    350353    { FDRIVE_DRV_120, FDRIVE_DISK_288,  9, 40, 0, FDRIVE_RATE_300K,  "180 kB 5\"1/4", },
    351354    { FDRIVE_DRV_120, FDRIVE_DISK_288, 10, 41, 1, FDRIVE_RATE_300K,  "410 kB 5\"1/4", },
    352355    { FDRIVE_DRV_120, FDRIVE_DISK_288, 10, 42, 1, FDRIVE_RATE_300K,  "420 kB 5\"1/4", },
    353     /* 320 kB 5"1/4 floppy disks */
    354     { FDRIVE_DRV_120, FDRIVE_DISK_288,  8, 40, 1, FDRIVE_RATE_250K,  "320 kB 5\"1/4", },
    355     { FDRIVE_DRV_120, FDRIVE_DISK_288,  8, 40, 0, FDRIVE_RATE_250K,  "160 kB 5\"1/4", },
     356    /* 320 kB 5"1/4 floppy disks (old 8-sector formats) */
     357    { FDRIVE_DRV_120, FDRIVE_DISK_288,  8, 40, 1, FDRIVE_RATE_300K,  "320 kB 5\"1/4", },
     358    { FDRIVE_DRV_120, FDRIVE_DISK_288,  8, 40, 0, FDRIVE_RATE_300K,  "160 kB 5\"1/4", },
    356359    /* 360 kB must match 5"1/4 better than 3"1/2... */
    357360    { FDRIVE_DRV_144, FDRIVE_DISK_720,  9, 80, 0, FDRIVE_RATE_250K,  "360 kB 3\"1/2", },
     
    18651868{
    18661869    fdrive_t *cur_drv;
     1870    uint8_t  st0;
    18671871
    18681872    SET_CUR_DRV(fdctrl, fdctrl->fifo[1] & FD_DOR_SELMASK);
     
    18701874    fd_recalibrate(cur_drv);
    18711875    fdctrl_reset_fifo(fdctrl);
     1876    st0 = FD_SR0_SEEK | GET_CUR_DRV(fdctrl);
     1877    /* No drive means no TRK0 signal. */
     1878    if (cur_drv->drive == FDRIVE_DRV_NONE)
     1879        st0 |= FD_SR0_ABNTERM | FD_SR0_EQPMT;
    18721880    /* Raise Interrupt */
    1873     fdctrl_raise_irq(fdctrl, FD_SR0_SEEK);
     1881    fdctrl_raise_irq(fdctrl, st0);
    18741882}
    18751883
     
    18881896        fdctrl->fifo[0] =
    18891897            FD_SR0_SEEK | (cur_drv->head << 2) | GET_CUR_DRV(fdctrl);
     1898        /* Hack to preserve SR0 on equipment check failures (no drive). */
     1899        if (fdctrl->status0 & FD_SR0_EQPMT)
     1900            fdctrl->fifo[0] = fdctrl->status0;
    18901901    }
    18911902
     
    19081919    cur_drv->track = fdctrl->fifo[2];
    19091920    /* Raise Interrupt */
    1910     fdctrl_raise_irq(fdctrl, FD_SR0_SEEK);
     1921    fdctrl_raise_irq(fdctrl, FD_SR0_SEEK | GET_CUR_DRV(fdctrl));
    19111922#else
    19121923    if (fdctrl->fifo[2] > cur_drv->max_track) {
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette