VirtualBox

Changeset 78040 in vbox


Ignore:
Timestamp:
Apr 8, 2019 12:18:05 PM (6 years ago)
Author:
vboxsync
Message:

DevFDC: Eliminated irrelevant ifdefs.

File:
1 edited

Legend:

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

    r77043 r78040  
    6565/* #define DEBUG_FLOPPY */
    6666
    67 #ifndef VBOX
    68     #ifdef DEBUG_FLOPPY
    69     #define FLOPPY_DPRINTF(fmt, args...) \
    70         do { printf("FLOPPY: " fmt , ##args); } while (0)
    71     #endif
    72 #else /* !VBOX */
    73 # ifdef LOG_ENABLED
    74 #  define FLOPPY_DPRINTF(...) Log(("floppy: " __VA_ARGS__))
    75 # else
    76 #  define FLOPPY_DPRINTF(...) do { } while (0)
    77 # endif
    78 #endif /* !VBOX */
    79 
    80 #ifndef VBOX
    81 #define FLOPPY_ERROR(fmt, args...) \
    82     do { printf("FLOPPY ERROR: %s: " fmt, __func__ , ##args); } while (0)
    83 #else /* VBOX */
    84 #   define FLOPPY_ERROR RTLogPrintf
    85 #endif /* VBOX */
    86 
    87 #ifdef VBOX
     67#ifdef LOG_ENABLED
     68# define FLOPPY_DPRINTF(...) Log(("floppy: " __VA_ARGS__))
     69#else
     70# define FLOPPY_DPRINTF(...) do { } while (0)
     71#endif
     72
     73#define FLOPPY_ERROR RTLogPrintf
     74
    8875typedef struct fdctrl_t fdctrl_t;
    89 #endif /* VBOX */
    9076
    9177/********************************************************/
     
    10591    FDRIVE_DRV_288  = 0x01,   /* 2.88 MB 3"5 drive      */
    10692    FDRIVE_DRV_120  = 0x02,   /* 1.2  MB 5"25 drive     */
    107     FDRIVE_DRV_NONE = 0x03    /* No drive connected     */
    108 #ifdef VBOX
    109     , FDRIVE_DRV_FAKE_15_6 = 0x0e /* Fake 15.6 MB drive. */
    110     , FDRIVE_DRV_FAKE_63_5 = 0x0f /* Fake 63.5 MB drive. */
    111 #endif
     93    FDRIVE_DRV_NONE = 0x03,   /* No drive connected     */
     94    FDRIVE_DRV_FAKE_15_6 = 0x0e, /* Fake 15.6 MB drive. */
     95    FDRIVE_DRV_FAKE_63_5 = 0x0f  /* Fake 63.5 MB drive. */
    11296} fdrive_type_t;
    11397
     
    130114 */
    131115typedef struct fdrive_t {
    132 #ifndef VBOX
    133     BlockDriverState *bs;
    134 #else /* VBOX */
    135116    /** Pointer to the owning device instance. */
    136117    R3PTRTYPE(PPDMDEVINS)           pDevIns;
     
    152133    /** The LED for this LUN. */
    153134    PDMLED                          Led;
    154 #endif
    155135    /* Drive status */
    156136    fdrive_type_t drive;
     
    176156{
    177157    /* Drive */
    178 #ifndef VBOX
    179     drv->drive = FDRIVE_DRV_NONE;
    180 #else  /* VBOX */
    181158    if (fInit) {
    182159        /* Fixate the drive type at init time if possible. */
     
    210187    } /* else: The BIOS (and others) get the drive type via the CMOS, so
    211188               don't change it after the VM has been constructed. */
    212 #endif /* VBOX */
    213189    drv->perpendicular = 0;
    214190    /* Disk */
     
    361337    { FDRIVE_DRV_144,  8, 40, 1, FDRIVE_RATE_300K,  "320 kB 3\"1/2", },
    362338    { FDRIVE_DRV_144,  8, 40, 0, FDRIVE_RATE_300K,  "160 kB 3\"1/2", },
    363 #ifdef VBOX /* For larger than real life floppy images (see DrvBlock.cpp). */
     339    /* For larger than real life floppy images (see DrvBlock.cpp). */
    364340    /* 15.6 MB fake floppy disk (just need something big). */
    365341    { FDRIVE_DRV_FAKE_15_6,  63, 255, 1, FDRIVE_RATE_1M,   "15.6 MB fake 15.6", },
     
    407383    { FDRIVE_DRV_FAKE_63_5,  14,  80, 1, FDRIVE_RATE_250K, "1.12 MB fake 63.5", },
    408384    { FDRIVE_DRV_FAKE_63_5,   9,  80, 0, FDRIVE_RATE_250K,  "360 kB fake 63.5", },
    409 #endif
    410385    /* end */
    411386    { FDRIVE_DRV_NONE, (uint8_t)-1, (uint8_t)-1, 0, (fdrive_rate_t)0, NULL, },
     
    421396
    422397    FLOPPY_DPRINTF("revalidate\n");
    423 #ifndef VBOX
    424     if (drv->bs != NULL && bdrv_is_inserted(drv->bs)) {
    425         ro = bdrv_is_read_only(drv->bs);
    426         bdrv_get_geometry_hint(drv->bs, &nb_heads, &max_track, &last_sect);
    427 #else /* VBOX */
    428398    if (   drv->pDrvMedia
    429399        && drv->pDrvMount
     
    431401        ro = drv->pDrvMedia->pfnIsReadOnly (drv->pDrvMedia);
    432402        nb_heads = max_track = last_sect = 0;
    433 #endif /* VBOX */
    434403        if (nb_heads != 0 && max_track != 0 && last_sect != 0) {
    435404            FLOPPY_DPRINTF("User defined disk (%d %d %d)",
    436405                           nb_heads - 1, max_track, last_sect);
    437406        } else {
    438 #ifndef VBOX
    439             bdrv_get_geometry(drv->bs, &nb_sectors);
    440 #else /* VBOX */
    441             {
    442                 uint64_t size2 = drv->pDrvMedia->pfnGetSize (drv->pDrvMedia);
    443                 nb_sectors = size2 / FD_SECTOR_LEN;
    444             }
    445 #endif /* VBOX */
     407            uint64_t size2 = drv->pDrvMedia->pfnGetSize (drv->pDrvMedia);
     408            nb_sectors = size2 / FD_SECTOR_LEN;
    446409            match = -1;
    447410            first_match = -1;
     
    473436            last_sect = parse->last_sect;
    474437            drv->drive = parse->drive;
    475 #ifdef VBOX
    476438            drv->media_rate = parse->rate;
    477 #endif
    478439            FLOPPY_DPRINTF("%s floppy disk (%d h %d t %d s) %s\n", parse->str,
    479440                           nb_heads, max_track, last_sect, ro ? "ro" : "rw");
     
    503464static void fdctrl_reset(fdctrl_t *fdctrl, int do_irq);
    504465static void fdctrl_reset_fifo(fdctrl_t *fdctrl);
    505 #ifndef VBOX
    506 static int fdctrl_transfer_handler (void *opaque, int nchan,
    507                                     int dma_pos, int dma_len);
    508 #else /* VBOX: */
    509466static DECLCALLBACK(uint32_t) fdctrl_transfer_handler (PPDMDEVINS pDevIns,
    510467                                                       void *opaque,
     
    512469                                                       uint32_t dma_pos,
    513470                                                       uint32_t dma_len);
    514 #endif /* VBOX */
    515471static void fdctrl_raise_irq(fdctrl_t *fdctrl, uint8_t status0);
    516472static fdrive_t *get_cur_drv(fdctrl_t *fdctrl);
     
    686642#define FD_FORMAT_CMD(state) ((state) & FD_STATE_FORMAT)
    687643
    688 #ifdef VBOX
    689644/**
    690645 * Floppy controller state.
     
    692647 * @implements  PDMILEDPORTS
    693648 */
    694 #endif
    695649struct fdctrl_t {
    696 #ifndef VBOX
    697     fdctrl_t *fdctrl;
    698 #endif
    699650    /* Controller's identification */
    700651    uint8_t version;
    701652    /* HW */
    702 #ifndef VBOX
    703     int irq;
    704     int dma_chann;
    705 #else
    706653    uint8_t irq_lvl;
    707654    uint8_t dma_chann;
    708 #endif
    709655    uint32_t io_base;
    710656    /* Controller state */
    711 #ifndef VBOX
    712     QEMUTimer *result_timer;
    713 #else
    714657    struct TMTIMER *result_timer;
    715 #endif
    716658    uint8_t sra;
    717659    uint8_t srb;
     
    745687    fdrive_t drives[MAX_FD];
    746688    uint8_t reset_sensei;
    747 #ifdef VBOX
    748689    /** Pointer to device instance. */
    749690    PPDMDEVINS pDevIns;
     
    755696    /** Status LUN: The Partner of ILeds. */
    756697    PPDMILEDCONNECTORS pLedsConnector;
    757 #endif
    758698};
    759699
     
    827767        return;
    828768    FLOPPY_DPRINTF("Reset interrupt\n");
    829 #ifdef VBOX
    830769    PDMDevHlpISASetIrq (fdctrl->pDevIns, fdctrl->irq_lvl, 0);
    831 #else
    832     qemu_set_irq(fdctrl->irq, 0);
    833 #endif
    834770    fdctrl->sra &= ~FD_SRA_INTPEND;
    835771}
     
    839775    if (!(fdctrl->sra & FD_SRA_INTPEND)) {
    840776        FLOPPY_DPRINTF("Raising interrupt...\n");
    841 #ifdef VBOX
    842777        PDMDevHlpISASetIrq (fdctrl->pDevIns, fdctrl->irq_lvl, 1);
    843 #else
    844         qemu_set_irq(fdctrl->irq, 1);
    845 #endif
    846778        fdctrl->sra |= FD_SRA_INTPEND;
    847779    }
     
    870802    fdctrl->sra = 0;
    871803    fdctrl->srb = 0xc0;
    872 #ifdef VBOX
    873804    if (!fdctrl->drives[1].pDrvMedia)
    874 #else
    875     if (!fdctrl->drives[1].bs)
    876 #endif
    877805        fdctrl->sra |= FD_SRA_nDRV2;
    878806    fdctrl->cur_drv = 0;
     
    10831011static int fdctrl_media_changed(fdrive_t *drv)
    10841012{
    1085 #ifdef VBOX
    10861013    return drv->dsk_chg;
    1087 #else
    1088     int ret;
    1089 
    1090     if (!drv->bs)
    1091         return 0;
    1092     ret = bdrv_media_changed(drv->bs);
    1093     if (ret) {
    1094         fd_revalidate(drv);
    1095     }
    1096     return ret;
    1097 #endif
    10981014}
    10991015
     
    11031019    uint32_t retval = 0;
    11041020
    1105 #ifdef VBOX
    11061021    /* The change line signal is reported by the currently selected
    11071022     * drive. If the corresponding motor on bit is not set, the drive
     
    11101025    if (fdctrl_media_changed(get_cur_drv(fdctrl))
    11111026     && (fdctrl->dor & (0x10 << fdctrl->cur_drv)))
    1112 #else
    1113     if (fdctrl_media_changed(drv0(fdctrl))
    1114      || fdctrl_media_changed(drv1(fdctrl))
    1115 #if MAX_FD == 4
    1116      || fdctrl_media_changed(drv2(fdctrl))
    1117      || fdctrl_media_changed(drv3(fdctrl))
    1118 #endif
    1119         )
    1120 #endif
    11211027        retval |= FD_DIR_DSKCHG;
    11221028    if (retval != 0)
     
    12111117    fdctrl->data_dir = FD_DIR_READ;
    12121118    if (!(fdctrl->msr & FD_MSR_NONDMA)) {
    1213 #ifdef VBOX
    12141119        PDMDevHlpDMASetDREQ (fdctrl->pDevIns, fdctrl->dma_chann, 0);
    1215 #else
    1216         DMA_release_DREQ(fdctrl->dma_chann);
    1217 #endif
    12181120    }
    12191121    fdctrl->msr |= FD_MSR_RQM | FD_MSR_DIO;
     
    12801182     * the currently inserted medium, the operation has to fail.
    12811183     */
    1282 #ifdef VBOX
    12831184    if ((fdctrl->dsr & FD_DSR_DRATEMASK) != cur_drv->media_rate) {
    12841185        FLOPPY_DPRINTF("data rate mismatch (fdc=%d, media=%d)\n",
     
    12901191        return;
    12911192    }
    1292 #endif
    12931193    /* Set the FIFO state */
    12941194    fdctrl->data_dir = direction;
     
    13171217        int dma_mode;
    13181218        /* DMA transfer are enabled. Check if DMA channel is well programmed */
    1319 #ifndef VBOX
    1320         dma_mode = DMA_get_channel_mode(fdctrl->dma_chann);
    1321 #else
    13221219        dma_mode = PDMDevHlpDMAGetChannelMode (fdctrl->pDevIns, fdctrl->dma_chann);
    1323 #endif
    13241220        dma_mode = (dma_mode >> 2) & 3;
    13251221        FLOPPY_DPRINTF("dma_mode=%d direction=%d (%d - %d)\n",
     
    13361232             * recall us...
    13371233             */
    1338 #ifndef VBOX
    1339             DMA_hold_DREQ(fdctrl->dma_chann);
    1340             DMA_schedule(fdctrl->dma_chann);
    1341 #else
    13421234            PDMDevHlpDMASetDREQ (fdctrl->pDevIns, fdctrl->dma_chann, 1);
    13431235            PDMDevHlpDMASchedule (fdctrl->pDevIns);
    1344 #endif
    13451236            return;
    13461237        } else {
     
    14331324        int dma_mode;
    14341325        /* DMA transfer are enabled. Check if DMA channel is well programmed */
    1435 #ifndef VBOX
    1436         dma_mode = DMA_get_channel_mode(fdctrl->dma_chann);
    1437 #else
    14381326        dma_mode = PDMDevHlpDMAGetChannelMode (fdctrl->pDevIns, fdctrl->dma_chann);
    1439 #endif
    14401327        dma_mode = (dma_mode >> 2) & 3;
    14411328        FLOPPY_DPRINTF("dma_mode=%d direction=%d (%d - %d)\n",
     
    14491336             * recall us...
    14501337             */
    1451 #ifndef VBOX
    1452             DMA_hold_DREQ(fdctrl->dma_chann);
    1453             DMA_schedule(fdctrl->dma_chann);
    1454 #else
    14551338            PDMDevHlpDMASetDREQ (fdctrl->pDevIns, fdctrl->dma_chann, 1);
    14561339            PDMDevHlpDMASchedule (fdctrl->pDevIns);
    1457 #endif
    14581340            return;
    14591341        } else {
     
    14811363}
    14821364
    1483 #ifdef VBOX
    14841365/* Block driver read/write wrappers. */
    14851366
     
    15171398}
    15181399
    1519 #endif
    1520 
    15211400/* handlers for DMA transfers */
    1522 #ifdef VBOX
    15231401static DECLCALLBACK(uint32_t) fdctrl_transfer_handler (PPDMDEVINS pDevIns,
    15241402                                                       void *opaque,
     
    15261404                                                       uint32_t dma_pos,
    15271405                                                       uint32_t dma_len)
    1528 #else
    1529 static int fdctrl_transfer_handler (void *opaque, int nchan,
    1530                                     int dma_pos, int dma_len)
    1531 #endif
    15321406{
    15331407    RT_NOREF(pDevIns, dma_pos);
    15341408    fdctrl_t *fdctrl;
    15351409    fdrive_t *cur_drv;
    1536 #ifdef VBOX
    15371410    int rc;
    15381411    uint32_t len = 0;
    15391412    uint32_t start_pos, rel_pos;
    1540 #else
    1541     int len, start_pos, rel_pos;
    1542 #endif
    15431413    uint8_t status0 = 0x00, status1 = 0x00, status2 = 0x00;
    15441414
     
    15541424    if (dma_len > fdctrl->data_len)
    15551425        dma_len = fdctrl->data_len;
    1556 #ifndef VBOX
    1557     if (cur_drv->bs == NULL)
    1558 #else  /* !VBOX */
    15591426    if (cur_drv->pDrvMedia == NULL)
    1560 #endif
    15611427    {
    15621428        if (fdctrl->data_dir == FD_DIR_WRITE)
     
    15681434    }
    15691435
    1570 #ifdef VBOX
    1571         if (cur_drv->ro)
     1436    if (cur_drv->ro)
     1437    {
     1438        if (fdctrl->data_dir == FD_DIR_WRITE || fdctrl->data_dir == FD_DIR_FORMAT)
    15721439        {
    1573             if (fdctrl->data_dir == FD_DIR_WRITE || fdctrl->data_dir == FD_DIR_FORMAT)
    1574             {
    1575                 /* Handle readonly medium early, no need to do DMA, touch the
    1576                  * LED or attempt any writes. A real floppy doesn't attempt
    1577                  * to write to readonly media either. */
    1578                 fdctrl_stop_transfer(fdctrl, FD_SR0_ABNTERM | FD_SR0_SEEK, FD_SR1_NW,
    1579                                      0x00);
    1580                 Assert(len == 0);
    1581                 goto transfer_error;
    1582             }
     1440            /* Handle readonly medium early, no need to do DMA, touch the
     1441             * LED or attempt any writes. A real floppy doesn't attempt
     1442             * to write to readonly media either. */
     1443            fdctrl_stop_transfer(fdctrl, FD_SR0_ABNTERM | FD_SR0_SEEK, FD_SR1_NW,
     1444                                 0x00);
     1445            Assert(len == 0);
     1446            goto transfer_error;
    15831447        }
    1584 #endif
    1585 
     1448    }
    15861449
    15871450    rel_pos = fdctrl->data_pos % FD_SECTOR_LEN;
     
    15991462            len < FD_SECTOR_LEN || rel_pos != 0)) {
    16001463            /* READ & SCAN commands and realign to a sector for WRITE */
    1601 #ifdef VBOX
    16021464            rc = blk_read(cur_drv, fd_sector(cur_drv), fdctrl->fifo, 1);
    16031465            if (RT_FAILURE(rc))
    1604 #else
    1605             if (bdrv_read(cur_drv->bs, fd_sector(cur_drv),
    1606                           fdctrl->fifo, 1) < 0)
    1607 #endif
    16081466            {
    16091467                FLOPPY_DPRINTF("Floppy: error getting sector %d\n",
     
    16161474        case FD_DIR_READ:
    16171475            /* READ commands */
    1618 #ifdef VBOX
    16191476            {
    16201477                uint32_t read;
     
    16251482                AssertMsgRC (rc2, ("DMAWriteMemory -> %Rrc\n", rc2));
    16261483            }
    1627 #else
    1628             DMA_write_memory (nchan, fdctrl->fifo + rel_pos,
    1629                               fdctrl->data_pos, len);
    1630 #endif
    1631 /*          cpu_physical_memory_write(addr + fdctrl->data_pos, */
    1632 /*                                    fdctrl->fifo + rel_pos, len); */
    16331484            break;
    16341485        case FD_DIR_WRITE:
    16351486            /* WRITE commands */
    1636 #ifdef VBOX
    16371487            {
    16381488                uint32_t written;
     
    16461496            rc = blk_write(cur_drv, fd_sector(cur_drv), fdctrl->fifo, 1);
    16471497            if (RT_FAILURE(rc))
    1648 #else
    1649             DMA_read_memory (nchan, fdctrl->fifo + rel_pos,
    1650                              fdctrl->data_pos, len);
    1651             if (bdrv_write(cur_drv->bs, fd_sector(cur_drv),
    1652                            fdctrl->fifo, 1) < 0)
    1653 #endif
    16541498            {
    16551499                FLOPPY_ERROR("writing sector %d\n", fd_sector(cur_drv));
     
    16581502            }
    16591503            break;
    1660 #ifdef VBOX
    16611504        case FD_DIR_FORMAT:
    16621505            /* FORMAT command */
     
    16891532            }
    16901533            break;
    1691 #endif
    16921534        default:
    16931535            /* SCAN commands */
     
    16951537                uint8_t tmpbuf[FD_SECTOR_LEN];
    16961538                int ret;
    1697 #ifdef VBOX
    16981539                uint32_t read;
    16991540                int rc2 = PDMDevHlpDMAReadMemory (fdctrl->pDevIns, nchan, tmpbuf,
    17001541                                                  fdctrl->data_pos, len, &read);
    17011542                AssertMsg(RT_SUCCESS(rc2), ("DMAReadMemory -> %Rrc2\n", rc2)); NOREF(rc2);
    1702 #else
    1703                 DMA_read_memory (nchan, tmpbuf, fdctrl->data_pos, len);
    1704 #endif
    17051543                ret = memcmp(tmpbuf, fdctrl->fifo + rel_pos, len);
    17061544                if (ret == 0) {
     
    17471585    uint32_t retval = 0;
    17481586    unsigned pos;
    1749 #ifdef VBOX
    17501587    int rc;
    1751 #endif
    17521588
    17531589    cur_drv = get_cur_drv(fdctrl);
     
    17661602                    return 0;
    17671603                }
    1768 #ifdef VBOX
    17691604            rc = blk_read(cur_drv, fd_sector(cur_drv), fdctrl->fifo, 1);
    17701605            if (RT_FAILURE(rc))
    1771 #else
    1772             if (bdrv_read(cur_drv->bs, fd_sector(cur_drv), fdctrl->fifo, 1) < 0)
    1773 #endif
    17741606            {
    17751607                FLOPPY_DPRINTF("error getting sector %d\n",
     
    18021634    fdrive_t *cur_drv;
    18031635    uint8_t kh, kt, ks;
    1804 #ifdef VBOX
    18051636    int ok = 0, rc;
    1806 #endif
    18071637
    18081638    SET_CUR_DRV(fdctrl, fdctrl->fifo[1] & FD_DOR_SELMASK);
     
    18501680    }
    18511681    memset(fdctrl->fifo, 0, FD_SECTOR_LEN);
    1852 #ifdef VBOX
    18531682    if (cur_drv->pDrvMedia) {
    18541683        rc = blk_write(cur_drv, fd_sector(cur_drv), fdctrl->fifo, 1);
     
    18611690    }
    18621691    if (ok) {
    1863 #else
    1864     if (cur_drv->bs == NULL ||
    1865         bdrv_write(cur_drv->bs, fd_sector(cur_drv), fdctrl->fifo, 1) < 0) {
    1866         FLOPPY_ERROR("formatting sector %d\n", fd_sector(cur_drv));
    1867         fdctrl_stop_transfer(fdctrl, FD_SR0_ABNTERM | FD_SR0_SEEK, 0x00, 0x00);
    1868     } else {
    1869 #endif
    18701692        if (cur_drv->sect == cur_drv->last_sect) {
    18711693            fdctrl->data_state &= ~FD_STATE_FORMAT;
     
    19961818    fdctrl->msr &= ~FD_MSR_RQM;
    19971819    cur_drv->head = (fdctrl->fifo[1] >> 2) & 1;
    1998 #ifdef VBOX
    19991820    TMTimerSetMillies(fdctrl->result_timer, 1000 / 50);
    2000 #else
    2001     qemu_mod_timer(fdctrl->result_timer,
    2002                    qemu_get_clock(vm_clock) + (get_ticks_per_sec() / 50));
    2003 #endif
    20041821}
    20051822
     
    21231940    cur_drv = get_cur_drv(fdctrl);
    21241941    fdctrl_reset_fifo(fdctrl);
    2125 #ifdef VBOX
     1942
    21261943    /* The seek command just sends step pulses to the drive and doesn't care if
    21271944     * there's a medium inserted or if it's banging the head against the drive.
     
    21321949    /* Raise Interrupt */
    21331950    fdctrl_raise_irq(fdctrl, FD_SR0_SEEK | GET_CUR_DRV(fdctrl));
    2134 #else
    2135     if (fdctrl->fifo[2] > cur_drv->max_track) {
    2136         fdctrl_raise_irq(fdctrl, FD_SR0_ABNTERM | FD_SR0_SEEK);
    2137     } else {
    2138         cur_drv->track = fdctrl->fifo[2];
    2139         /* Raise Interrupt */
    2140         fdctrl_raise_irq(fdctrl, FD_SR0_SEEK);
    2141     }
    2142 #endif
    21431951}
    21441952
     
    23062114        if (pos == FD_SECTOR_LEN - 1 ||
    23072115            fdctrl->data_pos == fdctrl->data_len) {
    2308 #ifdef VBOX
    23092116            blk_write(cur_drv, fd_sector(cur_drv), fdctrl->fifo, 1);
    2310 #else
    2311             bdrv_write(cur_drv->bs, fd_sector(cur_drv),
    2312                        fdctrl->fifo, 1);
    2313 #endif
    23142117        }
    23152118        /* Switch from transfer mode to status mode
     
    23592162    }
    23602163    /* READ_ID can't automatically succeed! */
    2361 #ifdef VBOX
    23622164    if (!cur_drv->max_track) {
    23632165        FLOPPY_DPRINTF("read id when no disk in drive\n");
     
    23752177    }
    23762178    else
    2377 #endif
    23782179        fdctrl_stop_transfer(fdctrl, 0x00, 0x00, 0x00);
    23792180}
    23802181
    2381 
    2382 #ifdef VBOX
    23832182
    23842183/* -=-=-=-=-=-=-=-=- Timer Callback -=-=-=-=-=-=-=-=- */
     
    29772776        AssertMsgFailed(("Memory mapped floppy not support by now\n"));
    29782777        return VERR_NOT_SUPPORTED;
    2979 #if 0
    2980         FLOPPY_ERROR("memory mapped floppy not supported by now !\n");
    2981         io_mem = cpu_register_io_memory(0, fdctrl_mem_read, fdctrl_mem_write);
    2982         cpu_register_physical_memory(base, 0x08, io_mem);
    2983 #endif
    29842778    }
    29852779    else
     
    30942888};
    30952889
    3096 #endif /* VBOX */
    3097 
    30982890/*
    30992891 * Local Variables:
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