VirtualBox

Changeset 2558 in vbox for trunk/src/VBox


Ignore:
Timestamp:
May 9, 2007 1:10:57 PM (18 years ago)
Author:
vboxsync
Message:

Undid incorrect commit.

Location:
trunk/src/VBox
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Display/driver.h

    r2557 r2558  
    5252    POINTL  ptlOrg;                     // Where this display is anchored in
    5353                                        //   the virtual desktop.
    54     POINTL  ptlDevOrg;                  // Device origin for DualView (0,0 for primary view).
    5554    ULONG   ulMode;                     // Mode the mini-port driver is in.
    5655    LONG    lDeltaScreen;               // Distance from one scan to the next.
     
    116115} CLIPRECTS;
    117116
    118 /** Escape codes used to communicate with the VBox display
    119  *  driver from userland.
    120  */
    121 #define VBOX_ESC_QUERY_SUPPORT          1110
    122117
    123118BOOL vboxVbvaEnable (PPDEV ppdev);
  • trunk/src/VBox/Additions/WINNT/Graphics/Display/enable.c

    r2557 r2558  
    2626    {   INDEX_DrvDisableSurface,        (PFN) DrvDisableSurface     },  //  4
    2727    {   INDEX_DrvAssertMode,            (PFN) DrvAssertMode         },  //  5
     28    {   INDEX_DrvOffset,                (PFN) DrvOffset             },  //  6
    2829    {   INDEX_DrvDisableDriver,         (PFN) DrvDisableDriver      },  //  8
    2930    {   INDEX_DrvRealizeBrush,          (PFN) DrvRealizeBrush       },  // 12
     
    6667}
    6768
     69ULONG APIENTRY DrvEscape(
     70    SURFOBJ *pso,
     71    ULONG    iEsc,
     72    ULONG    cjIn,
     73    PVOID    pvIn,
     74    ULONG    cjOut,
     75    PVOID    pvOut
     76    )
     77{
     78    DISPDBG((0, "Experimental %s: %p, %p, %p, %p, %p, %p\n", __FUNCTION__, pso, iEsc, cjIn, pvIn, cjOut, pvOut));
     79    return 0;
     80}
     81   
    6882BOOL DrvConnect (PVOID x1, PVOID x2, PVOID x3, PVOID x4)
    6983{
     
    124138    DISPDBG((0, "Experimental %s: %p, %p, %p, %p\n", __FUNCTION__, dhpdev, pCallBacks, pSurfaceCallBacks, pPaletteCallBacks));
    125139    return FALSE;
    126 }
    127 
    128 /******************************Public*Routine******************************\
    129 * DrvEscape
    130 *
    131 * Called by GDI in response to user level ExtEscape() calls
    132 *
    133 * Currently unused, but could be useful if we needed to communicate with the
    134 * display driver and/or miniport from userspace apps.
    135 *
    136 \**************************************************************************/
    137 
    138 ULONG DrvEscape(
    139 SURFOBJ *pso,
    140 ULONG iEsc,
    141 ULONG cjIn,
    142 PVOID pvIn,
    143 ULONG cjOut,
    144 PVOID pvOut)
    145 {
    146     ULONG ulResult = 0;
    147 
    148     DISPDBG((0, "Experimental %s: %p, %p, %p, %p, %p, %p\n", __FUNCTION__, pso, iEsc, cjIn, pvIn, cjOut, pvOut));
    149 
    150     switch(iEsc)
    151     {
    152         case VBOX_ESC_QUERY_SUPPORT:
    153             DISPDBG((3, "VBOX_ESC_QUERY_SUPPORT (PSO = %p)\n", pso));
    154             ulResult = 1;
    155             break;
    156         default:
    157             DISPDBG((3, "unknown escape %d\n", iEsc));
    158     }
    159     return ulResult;
    160140}
    161141
     
    187167    {   INDEX_DrvSaveScreenBits,        (PFN) DrvSaveScreenBits     },  // 40 0x28
    188168    {   INDEX_DrvGetModes,              (PFN) DrvGetModes           },  // 41 0x29
    189     {   INDEX_DrvNotify,                (PFN) DrvNotify             },  // 87 0x57
    190169//     /* Experimental. */
    191 //     {   INDEX_DrvEscape,                (PFN) DrvEscape             },       // 24 0x18
    192170//     {   0x7,                            (PFN) DrvResetPDEV          },       // 0x7
    193171//     {   0x5b,                           (PFN) DrvNineGrid           },       // 0x5b
    194172//     {   0x2b,                           (PFN) DrvDestroyFont        },       // 0x2b
     173//     {   0x18,                           (PFN) DrvEscape             },       // 0x18
    195174//     {   0x4d,                           (PFN) DrvConnect            },       // 0x4d
    196175//     {   0x4e,                           (PFN) DrvDisconnect         },       // 0x4e
     
    425404
    426405    EngFreeMem(dhpdev);
     406}
     407
     408/******************************Public*Routine******************************\
     409* VOID DrvOffset
     410*
     411* DescriptionText
     412*
     413\**************************************************************************/
     414
     415BOOL DrvOffset(
     416SURFOBJ*    pso,
     417LONG        x,
     418LONG        y,
     419FLONG       flReserved)
     420{
     421    PDEV*   ppdev = (PDEV*) pso->dhpdev;
     422
     423    // Add back last offset that we subtracted.  I could combine the next
     424    // two statements, but I thought this was more clear.  It's not
     425    // performance critical anyway.
     426
     427    ppdev->pjScreen += ((ppdev->ptlOrg.y * ppdev->lDeltaScreen) +
     428                        (ppdev->ptlOrg.x * ((ppdev->ulBitCount+1) >> 3)));
     429
     430    // Subtract out new offset
     431
     432    ppdev->pjScreen -= ((y * ppdev->lDeltaScreen) +
     433                        (x * ((ppdev->ulBitCount+1) >> 3)));
     434
     435    ppdev->ptlOrg.x = x;
     436    ppdev->ptlOrg.y = y;
     437
     438    return(TRUE);
    427439}
    428440
     
    810822}
    811823
    812 /******************************Public*Routine******************************\
    813 * DrvNotify
    814 *
    815 * Called by GDI to notify us of certain "interesting" events
    816 *
    817 * DN_DEVICE_ORIGIN is used to communicate the X/Y offsets of individual monitors
    818 *                  when DualView is in effect.
    819 *
    820 \**************************************************************************/
    821 
    822 VOID DrvNotify(
    823 SURFOBJ *pso,
    824 ULONG iType,
    825 PVOID pvData)
    826 {
    827     PDEV*   ppdev = (PDEV*) pso->dhpdev;
    828 
    829     DISPDBG((0, "VBoxDisp::DrvNotify called.\n"));
    830 
    831     switch(iType)
    832     {
    833         case DN_DEVICE_ORIGIN:
    834             ppdev->ptlDevOrg = *(PPOINTL)pvData;
    835             DISPDBG((3, "DN_DEVICE_ORIGIN: %d, %d (PSO = %p)\n", ppdev->ptlDevOrg.x,
    836                      ppdev->ptlDevOrg.y, pso));
    837             break;
    838         case DN_DRAWING_BEGIN:
    839             DISPDBG((3, "DN_DRAWING_BEGIN (PSO = %p)\n", pso));
    840             break;
    841     }
    842 }
  • trunk/src/VBox/Devices/Storage/fdc.c

    r2557 r2558  
    147147} fdisk_flags_t;
    148148
    149 #ifdef VBOX
    150 typedef enum fdrive_drate_t {
    151     FDRIVE_RATE_500K  = 0x00, /* 500 Kbps               */
    152     FDRIVE_RATE_300K  = 0x01, /* 300 Kbps               */
    153     FDRIVE_RATE_250K  = 0x02, /* 250 Kbps               */
    154     FDRIVE_RATE_1M    = 0x03  /* 1 Mbps                 */
    155 } fdrive_drate_t;
    156 #endif
    157 
    158149typedef struct fdrive_t {
    159150#ifndef VBOX
     
    181172    /** The Diskette present/missing flag. */
    182173    bool                            fMediaPresent;
    183     /** Data rate required by media. */
    184     fdrive_drate_t                  media_rate;
    185174#endif
    186175    /* Drive status */
     
    285274    fdrive_type_t drive;
    286275    fdisk_type_t  disk;
    287     fdrive_drate_t rate;
    288276    uint8_t last_sect;
    289277    uint8_t max_track;
     
    295283    /* First entry is default format */
    296284    /* 1.44 MB 3"1/2 floppy disks */
    297     { FDRIVE_DRV_144, FDRIVE_DISK_144, FDRIVE_RATE_500K, 18, 80, 1, "1.44 MB 3\"1/2", },
    298     { FDRIVE_DRV_144, FDRIVE_DISK_144, FDRIVE_RATE_500K, 20, 80, 1,  "1.6 MB 3\"1/2", },
    299     { FDRIVE_DRV_144, FDRIVE_DISK_144, FDRIVE_RATE_500K, 21, 80, 1, "1.68 MB 3\"1/2", },
    300     { FDRIVE_DRV_144, FDRIVE_DISK_144, FDRIVE_RATE_500K, 21, 82, 1, "1.72 MB 3\"1/2", },
    301     { FDRIVE_DRV_144, FDRIVE_DISK_144, FDRIVE_RATE_500K, 21, 83, 1, "1.74 MB 3\"1/2", },
    302     { FDRIVE_DRV_144, FDRIVE_DISK_144, FDRIVE_RATE_500K, 22, 80, 1, "1.76 MB 3\"1/2", },
    303     { FDRIVE_DRV_144, FDRIVE_DISK_144, FDRIVE_RATE_500K, 23, 80, 1, "1.84 MB 3\"1/2", },
    304     { FDRIVE_DRV_144, FDRIVE_DISK_144, FDRIVE_RATE_500K, 24, 80, 1, "1.92 MB 3\"1/2", },
     285    { FDRIVE_DRV_144, FDRIVE_DISK_144, 18, 80, 1, "1.44 MB 3\"1/2", },
     286    { FDRIVE_DRV_144, FDRIVE_DISK_144, 20, 80, 1,  "1.6 MB 3\"1/2", },
     287    { FDRIVE_DRV_144, FDRIVE_DISK_144, 21, 80, 1, "1.68 MB 3\"1/2", },
     288    { FDRIVE_DRV_144, FDRIVE_DISK_144, 21, 82, 1, "1.72 MB 3\"1/2", },
     289    { FDRIVE_DRV_144, FDRIVE_DISK_144, 21, 83, 1, "1.74 MB 3\"1/2", },
     290    { FDRIVE_DRV_144, FDRIVE_DISK_144, 22, 80, 1, "1.76 MB 3\"1/2", },
     291    { FDRIVE_DRV_144, FDRIVE_DISK_144, 23, 80, 1, "1.84 MB 3\"1/2", },
     292    { FDRIVE_DRV_144, FDRIVE_DISK_144, 24, 80, 1, "1.92 MB 3\"1/2", },
    305293    /* 2.88 MB 3"1/2 floppy disks */
    306     { FDRIVE_DRV_288, FDRIVE_DISK_288, FDRIVE_RATE_500K, 36, 80, 1, "2.88 MB 3\"1/2", },
    307     { FDRIVE_DRV_288, FDRIVE_DISK_288, FDRIVE_RATE_500K, 39, 80, 1, "3.12 MB 3\"1/2", },
    308     { FDRIVE_DRV_288, FDRIVE_DISK_288, FDRIVE_RATE_500K, 40, 80, 1,  "3.2 MB 3\"1/2", },
    309     { FDRIVE_DRV_288, FDRIVE_DISK_288, FDRIVE_RATE_500K, 44, 80, 1, "3.52 MB 3\"1/2", },
    310     { FDRIVE_DRV_288, FDRIVE_DISK_288, FDRIVE_RATE_500K, 48, 80, 1, "3.84 MB 3\"1/2", },
     294    { FDRIVE_DRV_288, FDRIVE_DISK_288, 36, 80, 1, "2.88 MB 3\"1/2", },
     295    { FDRIVE_DRV_288, FDRIVE_DISK_288, 39, 80, 1, "3.12 MB 3\"1/2", },
     296    { FDRIVE_DRV_288, FDRIVE_DISK_288, 40, 80, 1,  "3.2 MB 3\"1/2", },
     297    { FDRIVE_DRV_288, FDRIVE_DISK_288, 44, 80, 1, "3.52 MB 3\"1/2", },
     298    { FDRIVE_DRV_288, FDRIVE_DISK_288, 48, 80, 1, "3.84 MB 3\"1/2", },
    311299    /* 720 kB 3"1/2 floppy disks */
    312     { FDRIVE_DRV_144, FDRIVE_DISK_720, FDRIVE_RATE_250K, 9, 80, 1,  "720 kB 3\"1/2", },
    313     { FDRIVE_DRV_144, FDRIVE_DISK_720, FDRIVE_RATE_250K, 10, 80, 1,  "800 kB 3\"1/2", },
    314     { FDRIVE_DRV_144, FDRIVE_DISK_720, FDRIVE_RATE_250K, 10, 82, 1,  "820 kB 3\"1/2", },
    315     { FDRIVE_DRV_144, FDRIVE_DISK_720, FDRIVE_RATE_250K, 10, 83, 1,  "830 kB 3\"1/2", },
    316     { FDRIVE_DRV_144, FDRIVE_DISK_720, FDRIVE_RATE_250K, 13, 80, 1, "1.04 MB 3\"1/2", },
    317     { FDRIVE_DRV_144, FDRIVE_DISK_720, FDRIVE_RATE_250K, 14, 80, 1, "1.12 MB 3\"1/2", },
     300    { FDRIVE_DRV_144, FDRIVE_DISK_720, 9, 80, 1,  "720 kB 3\"1/2", },
     301    { FDRIVE_DRV_144, FDRIVE_DISK_720, 10, 80, 1,  "800 kB 3\"1/2", },
     302    { FDRIVE_DRV_144, FDRIVE_DISK_720, 10, 82, 1,  "820 kB 3\"1/2", },
     303    { FDRIVE_DRV_144, FDRIVE_DISK_720, 10, 83, 1,  "830 kB 3\"1/2", },
     304    { FDRIVE_DRV_144, FDRIVE_DISK_720, 13, 80, 1, "1.04 MB 3\"1/2", },
     305    { FDRIVE_DRV_144, FDRIVE_DISK_720, 14, 80, 1, "1.12 MB 3\"1/2", },
    318306    /* 1.2 MB 5"1/4 floppy disks */
    319     { FDRIVE_DRV_120, FDRIVE_DISK_288, FDRIVE_RATE_500K, 15, 80, 1,  "1.2 kB 5\"1/4", },
    320     { FDRIVE_DRV_120, FDRIVE_DISK_288, FDRIVE_RATE_500K, 18, 80, 1, "1.44 MB 5\"1/4", },
    321     { FDRIVE_DRV_120, FDRIVE_DISK_288, FDRIVE_RATE_500K, 18, 82, 1, "1.48 MB 5\"1/4", },
    322     { FDRIVE_DRV_120, FDRIVE_DISK_288, FDRIVE_RATE_500K, 18, 83, 1, "1.49 MB 5\"1/4", },
    323     { FDRIVE_DRV_120, FDRIVE_DISK_288, FDRIVE_RATE_500K, 20, 80, 1,  "1.6 MB 5\"1/4", },
     307    { FDRIVE_DRV_120, FDRIVE_DISK_288, 15, 80, 1,  "1.2 kB 5\"1/4", },
     308    { FDRIVE_DRV_120, FDRIVE_DISK_288, 18, 80, 1, "1.44 MB 5\"1/4", },
     309    { FDRIVE_DRV_120, FDRIVE_DISK_288, 18, 82, 1, "1.48 MB 5\"1/4", },
     310    { FDRIVE_DRV_120, FDRIVE_DISK_288, 18, 83, 1, "1.49 MB 5\"1/4", },
     311    { FDRIVE_DRV_120, FDRIVE_DISK_288, 20, 80, 1,  "1.6 MB 5\"1/4", },
    324312    /* 720 kB 5"1/4 floppy disks */
    325     { FDRIVE_DRV_120, FDRIVE_DISK_288, FDRIVE_RATE_250K, 9, 80, 1,  "720 kB 5\"1/4", },
    326     { FDRIVE_DRV_120, FDRIVE_DISK_288, FDRIVE_RATE_250K, 11, 80, 1,  "880 kB 5\"1/4", },
     313    { FDRIVE_DRV_120, FDRIVE_DISK_288, 9, 80, 1,  "720 kB 5\"1/4", },
     314    { FDRIVE_DRV_120, FDRIVE_DISK_288, 11, 80, 1,  "880 kB 5\"1/4", },
    327315    /* 360 kB 5"1/4 floppy disks */
    328     { FDRIVE_DRV_120, FDRIVE_DISK_288, FDRIVE_RATE_300K, 9, 40, 1,  "360 kB 5\"1/4", },
    329     { FDRIVE_DRV_120, FDRIVE_DISK_288, FDRIVE_RATE_300K, 9, 40, 0,  "180 kB 5\"1/4", },
    330     { FDRIVE_DRV_120, FDRIVE_DISK_288, FDRIVE_RATE_300K, 10, 41, 1,  "410 kB 5\"1/4", },
    331     { FDRIVE_DRV_120, FDRIVE_DISK_288, FDRIVE_RATE_300K, 10, 42, 1,  "420 kB 5\"1/4", },
     316    { FDRIVE_DRV_120, FDRIVE_DISK_288, 9, 40, 1,  "360 kB 5\"1/4", },
     317    { FDRIVE_DRV_120, FDRIVE_DISK_288, 9, 40, 0,  "180 kB 5\"1/4", },
     318    { FDRIVE_DRV_120, FDRIVE_DISK_288, 10, 41, 1,  "410 kB 5\"1/4", },
     319    { FDRIVE_DRV_120, FDRIVE_DISK_288, 10, 42, 1,  "420 kB 5\"1/4", },
    332320    /* 320 kB 5"1/4 floppy disks */
    333     { FDRIVE_DRV_120, FDRIVE_DISK_288, FDRIVE_RATE_250K, 8, 40, 1,  "320 kB 5\"1/4", },
    334     { FDRIVE_DRV_120, FDRIVE_DISK_288, FDRIVE_RATE_250K, 8, 40, 0,  "160 kB 5\"1/4", },
     321    { FDRIVE_DRV_120, FDRIVE_DISK_288, 8, 40, 1,  "320 kB 5\"1/4", },
     322    { FDRIVE_DRV_120, FDRIVE_DISK_288, 8, 40, 0,  "160 kB 5\"1/4", },
    335323    /* 360 kB must match 5"1/4 better than 3"1/2... */
    336     { FDRIVE_DRV_144, FDRIVE_DISK_720, FDRIVE_RATE_250K, 9, 80, 0,  "360 kB 3\"1/2", },
     324    { FDRIVE_DRV_144, FDRIVE_DISK_720, 9, 80, 0,  "360 kB 3\"1/2", },
    337325    /* end */
    338     { FDRIVE_DRV_NONE, FDRIVE_DISK_NONE, FDRIVE_RATE_1M, -1, -1, 0, NULL, },
     326    { FDRIVE_DRV_NONE, FDRIVE_DISK_NONE, -1, -1, 0, NULL, },
    339327};
    340328
     
    417405        drv->ro = ro;
    418406#ifdef VBOX
    419         drv->media_rate = parse->rate;
    420407        drv->fMediaPresent = true;
    421408#endif
     
    478465static void fdctrl_write_data (fdctrl_t *fdctrl, uint32_t value);
    479466static uint32_t fdctrl_read_dir (fdctrl_t *fdctrl);
    480 #ifdef VBOX
    481 static void fdctrl_write_ccr (fdctrl_t *fdctrl, uint32_t value);
    482 #endif
    483467
    484468enum {
     
    550534    /* precompensation */
    551535    uint8_t precomp_trk;
    552 #ifdef VBOX
    553     /* data rate */
    554     uint8_t drate;
    555 #endif
    556536    uint8_t config;
    557537    uint8_t lock;
     
    625605        fdctrl_write_data(fdctrl, value);
    626606        break;
    627 #ifdef VBOX
    628     case 0x07:
    629         fdctrl_write_ccr(fdctrl, value);
    630         break;
    631 #endif
    632607    default:
    633608        break;
     
    774749    /* Initialise controller */
    775750    fdctrl->cur_drv = 0;
    776 #ifdef VBOX
    777     fdctrl->drate = 2;  /* Default to 250 Kbps*/
    778 #endif
    779751    /* FIFO state */
    780752    fdctrl->data_pos = 0;
     
    951923    }
    952924/* //        fdctrl.precomp = (value >> 2) & 0x07; */
    953 #ifdef VBOX
    954     fdctrl->drate = value & 0x03;
    955 #endif
    956925}
    957926
     
    978947    return retval;
    979948}
    980 
    981 #ifdef VBOX
    982 /* Configuration control register : 0x07 (write) */
    983 static void fdctrl_write_ccr (fdctrl_t *fdctrl, uint32_t value)
    984 {
    985     FLOPPY_DPRINTF("configuration control register set to 0x%02x\n", value);
    986     fdctrl->drate = value & 0x03;
    987 }
    988 #endif
    989949
    990950/* FIFO state control */
     
    11001060        break;
    11011061    }
    1102 #ifdef VBOX
    1103     /* Check that selected data rate is correct.
    1104      * NB: Software may deduce media type from selected data rate, eg. 250Kbps
    1105      * in a 3.5" drive implies 720KB media, while 500Kbps implies 1.44MB.
    1106      */
    1107     if (fdctrl->drate != cur_drv->media_rate) {
    1108         FLOPPY_DPRINTF("Data rate mismatch (controller 0x%02x, media 0x%02x)\n", fdctrl->drate, cur_drv->media_rate);
    1109         fdctrl_stop_transfer(fdctrl, 0x40, 0x04, 0x00);
    1110         fdctrl->fifo[3] = kt;
    1111         fdctrl->fifo[4] = kh;
    1112         fdctrl->fifo[5] = ks;
    1113         return;
    1114     }
    1115 #endif
    11161062    /* Set the FIFO state */
    11171063    fdctrl->data_dir = direction;
     
    24932439    qemu_put_8s (f, &s->timer1);
    24942440    qemu_put_8s (f, &s->precomp_trk);
    2495     qemu_put_8s (f, &s->drate);
    24962441    qemu_put_8s (f, &s->config);
    24972442    qemu_put_8s (f, &s->lock);
     
    25502495    qemu_get_8s (f, &s->timer1);
    25512496    qemu_get_8s (f, &s->precomp_trk);
    2552     qemu_get_8s (f, &s->drate);
    25532497    qemu_get_8s (f, &s->config);
    25542498    qemu_get_8s (f, &s->lock);
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