VirtualBox

Changeset 44446 in vbox


Ignore:
Timestamp:
Jan 29, 2013 3:07:28 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
83437
Message:

Made the bus mouse sample extpack buildable. Cleaned it up a little bit, eliminating an unncessary crit sect.

Location:
trunk/src/VBox/ExtPacks/BusMouseSample
Files:
1 edited
3 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ExtPacks/BusMouseSample/BusMouse.cpp

    r40280 r44446  
    3333*******************************************************************************/
    3434#define LOG_GROUP LOG_GROUP_DEV_KBD
    35 #include "vl_vbox.h"
    3635#include <VBox/vmm/pdmdev.h>
    3736#include <iprt/assert.h>
    3837#include <iprt/uuid.h>
    3938
    40 #include "VBoxDD.h"
    41 
    42 /*  The Microsoft Bus Mouse was an early mouse sold by Microsoft, originally
     39
     40/** @page pg_busmouse DevBusMouse - Microsoft Bus Mouse Emulation
     41 *
     42 * The Microsoft Bus Mouse was an early mouse sold by Microsoft, originally
    4343 * introduced in 1983. The mouse had a D-shaped 9-pin connector which plugged
    4444 * into a small ISA add-in board.
    45  *  The mouse itself was very simple (compared to a serial mouse) and most of
    46  * the logic was located on the ISA board. Later, Microsoft sold an InPort
    47  * mouse, which was also called a "bus mouse", but used a different interface.
     45 *
     46 * The mouse itself was very simple (compared to a serial mouse) and most of the
     47 * logic was located on the ISA board. Later, Microsoft sold an InPort mouse,
     48 * which was also called a "bus mouse", but used a different interface.
    4849 *
    4950 * Microsoft part numbers for the Bus Mouse were 037-099 (100 ppi)
     
    7071 */
    7172
    72 /* The original bus mouse controller is fixed at I/O port 0x23C. */
     73
     74/*******************************************************************************
     75*   Defined Constants And Macros                                               *
     76*******************************************************************************/
     77/** The original bus mouse controller is fixed at I/O port 0x23C. */
    7378#define BMS_IO_BASE         0x23C
    7479#define BMS_IO_SIZE         4
    7580
    76 /* Offsets relative to the I/O base. */
    77 #define BMS_PORT_DATA       0   /* 8255 Port A. */
    78 #define BMS_PORT_SIG        1   /* 8255 Port B. */
    79 #define BMS_PORT_CTRL       2   /* 8255 Port C. */
    80 #define BMS_PORT_INIT       3   /* 8255 Control Port. */
    81 
    82 /* Port C bits (control port). */
    83 #define BMS_CTL_INT_DIS     RT_BIT(4)   /* Disable IRQ (else enabled). */
    84 #define BMS_CTL_SEL_HIGH    RT_BIT(5)   /* Select hi nibble (else lo). */
    85 #define BMS_CTL_SEL_Y       RT_BIT(6)   /* Select X to read (else Y). */
    86 #define BMS_CTL_HOLD        RT_BIT(7)   /* Hold counter (else clear). */
    87 
    88 /* Port A bits (data port). */
    89 #define BMS_DATA_DELTA      0x0F        /* Motion delta in lower nibble. */
    90 #define BMS_DATA_B3_UP      RT_BIT(5)   /* Button 3 (right) is up. */
    91 #define BMS_DATA_B2_UP      RT_BIT(6)   /* Button 2 (middle) is up. */
    92 #define BMS_DATA_B1_UP      RT_BIT(7)   /* Button 1 (left) is up. */
    93 
    94 /* Convert IRQ level (2/3/4/5) to a bit in the control register. */
     81/** @name Offsets relative to the I/O base.
     82 *@{ */
     83#define BMS_PORT_DATA       0   /**< 8255 Port A. */
     84#define BMS_PORT_SIG        1   /**< 8255 Port B. */
     85#define BMS_PORT_CTRL       2   /**< 8255 Port C. */
     86#define BMS_PORT_INIT       3   /**< 8255 Control Port. */
     87/** @} */
     88
     89/** @name Port C bits (control port).
     90 * @{  */
     91#define BMS_CTL_INT_DIS     RT_BIT(4)   /**< Disable IRQ (else enabled). */
     92#define BMS_CTL_SEL_HIGH    RT_BIT(5)   /**< Select hi nibble (else lo). */
     93#define BMS_CTL_SEL_Y       RT_BIT(6)   /**< Select X to read (else Y). */
     94#define BMS_CTL_HOLD        RT_BIT(7)   /**< Hold counter (else clear). */
     95/** @} */
     96
     97/** @name Port A bits (data port).
     98 * @{ */
     99#define BMS_DATA_DELTA      0x0F        /**< Motion delta in lower nibble. */
     100#define BMS_DATA_B3_UP      RT_BIT(5)   /**< Button 3 (right) is up. */
     101#define BMS_DATA_B2_UP      RT_BIT(6)   /**< Button 2 (middle) is up. */
     102#define BMS_DATA_B1_UP      RT_BIT(7)   /**< Button 1 (left) is up. */
     103/** @} */
     104
     105/** Convert IRQ level (2/3/4/5) to a bit in the control register. */
    95106#define BMS_IRQ_BIT(a)      (1 << (5 - a))
    96107
    97 /* IRQ period, corresponds to approx. 30 Hz. */
     108/** IRQ period, corresponds to approx. 30 Hz. */
    98109#define BMS_IRQ_PERIOD_MS   34
    99110
    100 /* Default IRQ setting. */
     111/** Default IRQ setting. */
    101112#define BMS_DEFAULT_IRQ     3
    102113
     114/** The saved state version. */
    103115#define BMS_SAVED_STATE_VERSION     1
    104116
    105117
     118/*******************************************************************************
     119*   Structures and Typedefs                                                    *
     120*******************************************************************************/
    106121typedef struct MouState {
    107122    /* 8255A state */
     
    133148    /** Pointer to the device instance. */
    134149    PPDMDEVINSR0    pDevInsR0;
    135     /** Critical section protecting the state. */
    136     PDMCRITSECT     CritSect;
     150
    137151    /**
    138152     * Mouse port - LUN#0.
     
    155169} MouState;
    156170
     171
     172
    157173#ifndef VBOX_DEVICE_STRUCT_TESTCASE
    158174
    159 #ifdef IN_RING3
    160 
    161 /* Report a change in status down the driver chain.
    162  * We want to report the mouse as enabled if and only if the guest
    163  * is "using" it. That way, other devices (e.g. a PS/2 or USB mouse)
    164  * can receive mouse events when the bus mouse is disabled.
    165  * Enabling interrupts constitutes enabling the bus mouse. The mouse
    166  * is considered disabled if interrupts are disabled for several
    167  * consecutive mouse timer ticks; this is because the interrupt handler
    168  * in the guest typically temporarily disables interrupts and we do not
    169  * want to toggle the enabled/disabled state more often than necessary.
     175# ifdef IN_RING3
     176
     177/**
     178 * Report a change in status down the driver chain.
     179 *
     180 * We want to report the mouse as enabled if and only if the guest is "using"
     181 * it. That way, other devices (e.g. a PS/2 or USB mouse) can receive mouse
     182 * events when the bus mouse is disabled. Enabling interrupts constitutes
     183 * enabling the bus mouse. The mouse is considered disabled if interrupts are
     184 * disabled for several consecutive mouse timer ticks; this is because the
     185 * interrupt handler in the guest typically temporarily disables interrupts and
     186 * we do not want to toggle the enabled/disabled state more often than
     187 * necessary.
    170188 */
    171189static void bms_update_downstream_status(MouState *pThis)
     
    176194}
    177195
    178 /* Set the emulated hardware to a known initial state. */
    179 static void bms_reset(void *opaque)
    180 {
    181     MouState *s = (MouState*)opaque;
    182 
     196/**
     197 * Set the emulated hardware to a known initial state.
     198 */
     199static void bms_reset(MouState *pThis)
     200{
    183201    /* Clear the device setup. */
    184     s->port_a = s->port_b = 0;
    185     s->port_c = BMS_CTL_INT_DIS;    /* Interrupts disabled. */
    186     s->ctrl_port = 0x91;            /* Default 8255A setup. */
     202    pThis->port_a = pThis->port_b = 0;
     203    pThis->port_c = BMS_CTL_INT_DIS;    /* Interrupts disabled. */
     204    pThis->ctrl_port = 0x91;            /* Default 8255A setup. */
    187205
    188206    /* Clear motion/button state. */
    189     s->cnt_held = false;
    190     s->mouse_dx = s->mouse_dy = 0;
    191     s->mouse_buttons = 0;
    192     s->mouse_buttons_reported = 0;
    193     s->disable_counter = 0;
    194     s->irq_toggle_counter = 1000;
    195 
    196     if (s->mouse_enabled)
    197     {
    198         s->mouse_enabled = false;
    199         bms_update_downstream_status(s);
     207    pThis->cnt_held = false;
     208    pThis->mouse_dx = pThis->mouse_dy = 0;
     209    pThis->mouse_buttons = 0;
     210    pThis->mouse_buttons_reported = 0;
     211    pThis->disable_counter = 0;
     212    pThis->irq_toggle_counter = 1000;
     213
     214    if (pThis->mouse_enabled)
     215    {
     216        pThis->mouse_enabled = false;
     217        bms_update_downstream_status(pThis);
    200218    }
    201219}
    202220
    203221/* Process a mouse event coming from the host. */
    204 static void bms_mouse_event(void *opaque, int dx, int dy, int dz, int dw,
     222static void bms_mouse_event(MouState *pThis, int dx, int dy, int dz, int dw,
    205223                            int buttons_state)
    206224{
    207     MouState    *s = (MouState*)opaque;
    208 
    209225    LogRel3(("%s: dx=%d, dy=%d, dz=%d, dw=%d, buttons_state=0x%x\n",
    210226             __PRETTY_FUNCTION__, dx, dy, dz, dw, buttons_state));
    211227
    212228    /* Only record X/Y movement and buttons. */
    213     s->mouse_dx += dx;
    214     s->mouse_dy += dy;
    215     s->mouse_buttons = buttons_state;
    216 }
    217 
    218 static void bms_timer(void *opaque)
    219 {
    220     MouState    *s = (MouState*)opaque;
     229    pThis->mouse_dx += dx;
     230    pThis->mouse_dy += dy;
     231    pThis->mouse_buttons = buttons_state;
     232}
     233
     234static DECLCALLBACK(void) bmsTimerCallback(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
     235{
     236    MouState   *pThis = PDMINS_2_DATA(pDevIns, MouState *);
    221237    uint8_t     irq_bit;
    222238
    223239    /* Toggle the IRQ line if interrupts are enabled. */
    224     irq_bit = BMS_IRQ_BIT(s->irq);
    225 
    226     if (s->port_c & irq_bit)
    227     {
    228         if (!(s->port_c & BMS_CTL_INT_DIS))
    229             PDMDevHlpISASetIrq(s->CTX_SUFF(pDevIns), s->irq, PDM_IRQ_LEVEL_LOW);
    230         s->port_c &= ~irq_bit;
     240    irq_bit = BMS_IRQ_BIT(pThis->irq);
     241
     242    if (pThis->port_c & irq_bit)
     243    {
     244        if (!(pThis->port_c & BMS_CTL_INT_DIS))
     245            PDMDevHlpISASetIrq(pThis->CTX_SUFF(pDevIns), pThis->irq, PDM_IRQ_LEVEL_LOW);
     246        pThis->port_c &= ~irq_bit;
    231247    }
    232248    else
    233249    {
    234         s->port_c |= irq_bit;
    235         if (!(s->port_c & BMS_CTL_INT_DIS))
    236             PDMDevHlpISASetIrq(s->CTX_SUFF(pDevIns), s->irq, PDM_IRQ_LEVEL_HIGH);
     250        pThis->port_c |= irq_bit;
     251        if (!(pThis->port_c & BMS_CTL_INT_DIS))
     252            PDMDevHlpISASetIrq(pThis->CTX_SUFF(pDevIns), pThis->irq, PDM_IRQ_LEVEL_HIGH);
    237253    }
    238254
    239255    /* Handle enabling/disabling of the mouse interface. */
    240     if (s->port_c & BMS_CTL_INT_DIS)
    241     {
    242         if (s->disable_counter)
    243             --s->disable_counter;
    244 
    245         if (s->disable_counter == 0 && s->mouse_enabled)
     256    if (pThis->port_c & BMS_CTL_INT_DIS)
     257    {
     258        if (pThis->disable_counter)
     259            --pThis->disable_counter;
     260
     261        if (pThis->disable_counter == 0 && pThis->mouse_enabled)
    246262        {
    247             s->mouse_enabled = false;
    248             bms_update_downstream_status(s);
     263            pThis->mouse_enabled = false;
     264            bms_update_downstream_status(pThis);
    249265        }
    250266    }
    251267    else
    252268    {
    253         s->disable_counter = 8; /* Re-arm the disable countdown. */
    254         if (!s->mouse_enabled)
     269        pThis->disable_counter = 8; /* Re-arm the disable countdown. */
     270        if (!pThis->mouse_enabled)
    255271        {
    256             s->mouse_enabled = true;
    257             bms_update_downstream_status(s);
     272            pThis->mouse_enabled = true;
     273            bms_update_downstream_status(pThis);
    258274        }
    259275    }
    260 }
    261 
    262 #endif /* IN_RING3 */
    263 
    264 static void bms_set_reported_buttons(MouState *s, unsigned fButtons, unsigned fButtonMask)
    265 {
    266     s->mouse_buttons_reported |= (fButtons & fButtonMask);
    267     s->mouse_buttons_reported &= (fButtons | ~fButtonMask);
     276
     277    /* Re-arm the timer. */
     278    TMTimerSetMillies(pTimer, pThis->cTimerPeriodMs);
     279}
     280
     281# endif /* IN_RING3 */
     282
     283static void bms_set_reported_buttons(MouState *pThis, unsigned fButtons, unsigned fButtonMask)
     284{
     285    pThis->mouse_buttons_reported |= (fButtons & fButtonMask);
     286    pThis->mouse_buttons_reported &= (fButtons | ~fButtonMask);
    268287}
    269288
    270289/* Update the internal state after a write to port C. */
    271 static void bms_update_ctrl(MouState *s)
     290static void bms_update_ctrl(MouState *pThis)
    272291{
    273292    int32_t     dx, dy;
    274293
    275294    /* If the controller is in hold state, transfer data from counters. */
    276     if (s->port_c & BMS_CTL_HOLD)
    277     {
    278         if (!s->cnt_held)
     295    if (pThis->port_c & BMS_CTL_HOLD)
     296    {
     297        if (!pThis->cnt_held)
    279298        {
    280             s->cnt_held = true;
    281             dx = s->mouse_dx < 0 ? RT_MAX(s->mouse_dx, -128)
    282                                  : RT_MIN(s->mouse_dx, 127);
    283             dy = s->mouse_dy < 0 ? RT_MAX(s->mouse_dy, -128)
    284                                  : RT_MIN(s->mouse_dy, 127);
    285             s->mouse_dx -= dx;
    286             s->mouse_dy -= dy;
    287             bms_set_reported_buttons(s, s->mouse_buttons & 0x07, 0x07);
     299            pThis->cnt_held = true;
     300            dx = pThis->mouse_dx < 0 ? RT_MAX(pThis->mouse_dx, -128)
     301                                     : RT_MIN(pThis->mouse_dx, 127);
     302            dy = pThis->mouse_dy < 0 ? RT_MAX(pThis->mouse_dy, -128)
     303                                     : RT_MIN(pThis->mouse_dy, 127);
     304            pThis->mouse_dx -= dx;
     305            pThis->mouse_dy -= dy;
     306            bms_set_reported_buttons(pThis, pThis->mouse_buttons & 0x07, 0x07);
    288307
    289308            /* Force type conversion. */
    290             s->held_dx = dx;
    291             s->held_dy = dy;
     309            pThis->held_dx = dx;
     310            pThis->held_dy = dy;
    292311        }
    293312    }
    294313    else
    295         s->cnt_held = false;
     314        pThis->cnt_held = false;
    296315
    297316    /* Move the appropriate nibble into port A. */
    298     if (s->cnt_held)
    299     {
    300         if (s->port_c & BMS_CTL_SEL_Y)
     317    if (pThis->cnt_held)
     318    {
     319        if (pThis->port_c & BMS_CTL_SEL_Y)
    301320        {
    302             if (s->port_c & BMS_CTL_SEL_HIGH)
    303                 s->port_a = s->held_dy >> 4;
     321            if (pThis->port_c & BMS_CTL_SEL_HIGH)
     322                pThis->port_a = pThis->held_dy >> 4;
    304323            else
    305                 s->port_a = s->held_dy & 0xF;
     324                pThis->port_a = pThis->held_dy & 0xF;
    306325        }
    307326        else
    308327        {
    309             if (s->port_c & BMS_CTL_SEL_HIGH)
    310                 s->port_a = s->held_dx >> 4;
     328            if (pThis->port_c & BMS_CTL_SEL_HIGH)
     329                pThis->port_a = pThis->held_dx >> 4;
    311330            else
    312                 s->port_a = s->held_dx & 0xF;
     331                pThis->port_a = pThis->held_dx & 0xF;
    313332        }
    314333        /* And update the button bits. */
    315         s->port_a |= s->mouse_buttons & 1 ? 0 : BMS_DATA_B1_UP;
    316         s->port_a |= s->mouse_buttons & 2 ? 0 : BMS_DATA_B3_UP;
    317         s->port_a |= s->mouse_buttons & 4 ? 0 : BMS_DATA_B2_UP;
     334        pThis->port_a |= pThis->mouse_buttons & 1 ? 0 : BMS_DATA_B1_UP;
     335        pThis->port_a |= pThis->mouse_buttons & 2 ? 0 : BMS_DATA_B3_UP;
     336        pThis->port_a |= pThis->mouse_buttons & 4 ? 0 : BMS_DATA_B2_UP;
    318337    }
    319338    /* Immediately clear the IRQ if necessary. */
    320     if (s->port_c & BMS_CTL_INT_DIS)
    321     {
    322         PDMDevHlpISASetIrq(s->CTX_SUFF(pDevIns), s->irq, PDM_IRQ_LEVEL_LOW);
    323         s->port_c &= ~(BMS_IRQ_BIT(s->irq));
    324     }
    325 }
    326 
    327 static int bms_write_port(void *opaque, uint32_t addr, uint32_t val)
     339    if (pThis->port_c & BMS_CTL_INT_DIS)
     340    {
     341        PDMDevHlpISASetIrq(pThis->CTX_SUFF(pDevIns), pThis->irq, PDM_IRQ_LEVEL_LOW);
     342        pThis->port_c &= ~(BMS_IRQ_BIT(pThis->irq));
     343    }
     344}
     345
     346static int bms_write_port(MouState *pThis, uint32_t addr, uint32_t val)
    328347{
    329348    int rc = VINF_SUCCESS;
    330     MouState *s = (MouState*)opaque;
    331349
    332350    LogRel3(("%s: write port %d: 0x%02x\n", __PRETTY_FUNCTION__, addr, val));
     
    335353    case BMS_PORT_SIG:
    336354        /* Update port B. */
    337         s->port_b = val;
     355        pThis->port_b = val;
    338356        break;
    339357    case BMS_PORT_DATA:
     
    341359        break;
    342360    case BMS_PORT_INIT:
    343         s->ctrl_port = val;
     361        pThis->ctrl_port = val;
    344362        break;
    345363    case BMS_PORT_CTRL:
    346364        /* Update the high nibble of port C. */
    347         s->port_c = (val & 0xF0) | (s->port_c & 0x0F);
    348         bms_update_ctrl(s);
     365        pThis->port_c = (val & 0xF0) | (pThis->port_c & 0x0F);
     366        bms_update_ctrl(pThis);
    349367        break;
    350368    default:
     
    355373}
    356374
    357 static uint32_t bms_read_port(void *opaque, uint32_t addr)
    358 {
    359     MouState *s = (MouState*)opaque;
     375static uint32_t bms_read_port(MouState *pThis, uint32_t addr)
     376{
    360377    uint32_t val;
    361378
     
    363380    case BMS_PORT_DATA:
    364381        /* Read port A. */
    365         val = s->port_a;
     382        val = pThis->port_a;
    366383        break;
    367384    case BMS_PORT_SIG:
    368385        /* Read port B. */
    369         val = s->port_b;
     386        val = pThis->port_b;
    370387        break;
    371388    case BMS_PORT_CTRL:
    372389        /* Read port C. */
    373         val = s->port_c;
     390        val = pThis->port_c;
    374391        /* Some Microsoft driver code reads the control port 10,000 times when
    375392         * determining the IRQ level. This can occur faster than the IRQ line
     
    377394         * the IRQ bit to toggle every once in a while.
    378395         */
    379         if (s->irq_toggle_counter)
    380             s->irq_toggle_counter--;
     396        if (pThis->irq_toggle_counter)
     397            pThis->irq_toggle_counter--;
    381398        else
    382399        {
    383             s->irq_toggle_counter = 1000;
    384             val ^= BMS_IRQ_BIT(s->irq);
     400            pThis->irq_toggle_counter = 1000;
     401            val ^= BMS_IRQ_BIT(pThis->irq);
    385402        }
    386403        break;
    387404    case BMS_PORT_INIT:
    388405        /* Read the 8255A control port. */
    389         val = s->ctrl_port;
     406        val = pThis->ctrl_port;
    390407        break;
    391408    default:
     
    414431    {
    415432        MouState *pThis = PDMINS_2_DATA(pDevIns, MouState *);
    416         int rc = PDMCritSectEnter(&pThis->CritSect, VINF_IOM_R3_IOPORT_READ);
    417         if (RT_LIKELY(rc == VINF_SUCCESS))
    418         {
    419             *pu32 = bms_read_port(pThis, Port & 3);
    420             PDMCritSectLeave(&pThis->CritSect);
    421             Log2(("mouIOPortRead: Port=%#x cb=%d *pu32=%#x\n", Port, cb, *pu32));
    422         }
    423         return rc;
     433        *pu32 = bms_read_port(pThis, Port & 3);
     434        Log2(("mouIOPortRead: Port=%#x cb=%d *pu32=%#x\n", Port, cb, *pu32));
     435        return VINF_SUCCESS;
    424436    }
    425437    AssertMsgFailed(("Port=%#x cb=%d\n", Port, cb));
     
    445457    {
    446458        MouState *pThis = PDMINS_2_DATA(pDevIns, MouState *);
    447         rc = PDMCritSectEnter(&pThis->CritSect, VINF_IOM_R3_IOPORT_WRITE);
    448         if (RT_LIKELY(rc == VINF_SUCCESS))
    449         {
    450             rc = bms_write_port(pThis, Port & 3, u32);
    451             PDMCritSectLeave(&pThis->CritSect);
    452             Log2(("mouIOPortWrite: Port=%#x cb=%d u32=%#x\n", Port, cb, u32));
    453         }
     459        rc = bms_write_port(pThis, Port & 3, u32);
     460        Log2(("mouIOPortWrite: Port=%#x cb=%d u32=%#x\n", Port, cb, u32));
    454461    }
    455462    else
     
    458465}
    459466
    460 #ifdef IN_RING3
     467# ifdef IN_RING3
    461468
    462469/**
     
    469476static DECLCALLBACK(int) mouSaveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSMHandle)
    470477{
    471     MouState    *s = PDMINS_2_DATA(pDevIns, MouState *);
    472     int         rc;
     478    MouState    *pThis = PDMINS_2_DATA(pDevIns, MouState *);
    473479
    474480    /* 8255A state. */
    475     SSMR3PutU8(pSSMHandle, s->port_a);
    476     SSMR3PutU8(pSSMHandle, s->port_b);
    477     SSMR3PutU8(pSSMHandle, s->port_c);
    478     SSMR3PutU8(pSSMHandle, s->ctrl_port);
     481    SSMR3PutU8(pSSMHandle, pThis->port_a);
     482    SSMR3PutU8(pSSMHandle, pThis->port_b);
     483    SSMR3PutU8(pSSMHandle, pThis->port_c);
     484    SSMR3PutU8(pSSMHandle, pThis->ctrl_port);
    479485    /* Other device state. */
    480     SSMR3PutU8(pSSMHandle, s->cnt_held);
    481     SSMR3PutU8(pSSMHandle, s->held_dx);
    482     SSMR3PutU8(pSSMHandle, s->held_dy);
    483     SSMR3PutU8(pSSMHandle, s->irq);
    484     SSMR3PutU32(pSSMHandle, s->cTimerPeriodMs);
     486    SSMR3PutU8(pSSMHandle, pThis->cnt_held);
     487    SSMR3PutU8(pSSMHandle, pThis->held_dx);
     488    SSMR3PutU8(pSSMHandle, pThis->held_dy);
     489    SSMR3PutU8(pSSMHandle, pThis->irq);
     490    SSMR3PutU32(pSSMHandle, pThis->cTimerPeriodMs);
    485491    /* Current mouse state deltas. */
    486     SSMR3PutS32(pSSMHandle, s->mouse_dx);
    487     SSMR3PutS32(pSSMHandle, s->mouse_dy);
    488     SSMR3PutU8(pSSMHandle, s->mouse_buttons_reported);
     492    SSMR3PutS32(pSSMHandle, pThis->mouse_dx);
     493    SSMR3PutS32(pSSMHandle, pThis->mouse_dy);
     494    SSMR3PutU8(pSSMHandle, pThis->mouse_buttons_reported);
    489495    /* Timer. */
    490     rc = TMR3TimerSave(s->MouseTimer, pSSMHandle);
    491 
    492     return rc;
    493 }
    494 
     496    return TMR3TimerSave(pThis->MouseTimer, pSSMHandle);
     497}
    495498
    496499/**
     
    506509{
    507510    int         rc;
    508     MouState    *s = PDMINS_2_DATA(pDevIns, MouState *);
     511    MouState    *pThis = PDMINS_2_DATA(pDevIns, MouState *);
    509512
    510513    Assert(uPass == SSM_PASS_FINAL); NOREF(uPass);
     
    514517
    515518    /* 8255A state. */
    516     SSMR3GetU8(pSSMHandle, &s->port_a);
    517     SSMR3GetU8(pSSMHandle, &s->port_b);
    518     SSMR3GetU8(pSSMHandle, &s->port_c);
    519     SSMR3GetU8(pSSMHandle, &s->ctrl_port);
     519    SSMR3GetU8(pSSMHandle, &pThis->port_a);
     520    SSMR3GetU8(pSSMHandle, &pThis->port_b);
     521    SSMR3GetU8(pSSMHandle, &pThis->port_c);
     522    SSMR3GetU8(pSSMHandle, &pThis->ctrl_port);
    520523    /* Other device state. */
    521     SSMR3GetU8(pSSMHandle, &s->cnt_held);
    522     SSMR3GetU8(pSSMHandle, &s->held_dx);
    523     SSMR3GetU8(pSSMHandle, &s->held_dy);
    524     SSMR3GetU8(pSSMHandle, &s->irq);
    525     SSMR3GetU32(pSSMHandle, &s->cTimerPeriodMs);
     524    SSMR3GetU8(pSSMHandle, &pThis->cnt_held);
     525    SSMR3GetU8(pSSMHandle, &pThis->held_dx);
     526    SSMR3GetU8(pSSMHandle, &pThis->held_dy);
     527    SSMR3GetU8(pSSMHandle, &pThis->irq);
     528    SSMR3GetU32(pSSMHandle, &pThis->cTimerPeriodMs);
    526529    /* Current mouse state deltas. */
    527     SSMR3GetS32(pSSMHandle, &s->mouse_dx);
    528     SSMR3GetS32(pSSMHandle, &s->mouse_dy);
    529     SSMR3GetU8(pSSMHandle, &s->mouse_buttons_reported);
     530    SSMR3GetS32(pSSMHandle, &pThis->mouse_dx);
     531    SSMR3GetS32(pSSMHandle, &pThis->mouse_dy);
     532    SSMR3GetU8(pSSMHandle, &pThis->mouse_buttons_reported);
    530533    /* Timer. */
    531     rc = TMR3TimerLoad(s->MouseTimer, pSSMHandle);
     534    rc = TMR3TimerLoad(pThis->MouseTimer, pSSMHandle);
    532535    return rc;
    533536}
     
    571574 */
    572575static DECLCALLBACK(int) mouPutEvent(PPDMIMOUSEPORT pInterface, int32_t iDeltaX, int32_t iDeltaY,
    573                                           int32_t iDeltaZ, int32_t iDeltaW, uint32_t fButtonStates)
     576                                     int32_t iDeltaZ, int32_t iDeltaW, uint32_t fButtonStates)
    574577{
    575578    MouState *pThis = RT_FROM_MEMBER(pInterface, MouState, Mouse.IPort);
    576     int rc = PDMCritSectEnter(&pThis->CritSect, VERR_SEM_BUSY);
     579    int rc = PDMCritSectEnter(pThis->CTX_SUFF(pDevIns)->CTX_SUFF(pCritSectRo), VERR_SEM_BUSY);
    577580    AssertReleaseRC(rc);
    578581
    579582    bms_mouse_event(pThis, iDeltaX, iDeltaY, iDeltaZ, iDeltaW, fButtonStates);
    580583
    581     PDMCritSectLeave(&pThis->CritSect);
     584    PDMCritSectLeave(pThis->CTX_SUFF(pDevIns)->CTX_SUFF(pCritSectRo));
    582585    return VINF_SUCCESS;
    583586}
     
    589592{
    590593    AssertFailedReturn(VERR_NOT_SUPPORTED);
    591 }
    592 
    593 static DECLCALLBACK(void) mouTimerCallback(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
    594 {
    595     MouState   *s = PDMINS_2_DATA(pDevIns, MouState *);
    596 
    597     bms_timer(s);
    598 
    599     /* Re-arm the timer. */
    600     TMTimerSetMillies(pTimer, s->cTimerPeriodMs);
    601594}
    602595
     
    720713    PDMDEV_CHECK_VERSIONS_RETURN_QUIET(pDevIns);
    721714
    722     PDMR3CritSectDelete(&pThis->CritSect);
    723 
    724715    return VINF_SUCCESS;
    725716}
     
    758749
    759750    pThis->irq = irq_lvl;
    760     //@todo: remove after properly enabling RC/GC support
     751    ///@todo: remove after properly enabling RC/GC support
    761752    fGCEnabled = fR0Enabled = false;
    762753    Log(("busmouse: IRQ=%d fGCEnabled=%RTbool fR0Enabled=%RTbool\n", irq_lvl, fGCEnabled, fR0Enabled));
     
    773764
    774765    /*
    775      * Initialize the critical section.
    776      */
    777     rc = PDMDevHlpCritSectInit(pDevIns, &pThis->CritSect, RT_SRC_POS, "BUSMS#%d", iInstance);
    778     if (RT_FAILURE(rc))
    779         return rc;
    780 
    781     /*
    782766     * Create the interrupt timer.
    783767     */
    784     rc = PDMDevHlpTMTimerCreate(pDevIns, TMCLOCK_VIRTUAL, mouTimerCallback,
     768    rc = PDMDevHlpTMTimerCreate(pDevIns, TMCLOCK_VIRTUAL, bmsTimerCallback,
    785769                                pThis, TMTIMER_FLAGS_DEFAULT_CRIT_SECT,
    786770                                "Bus Mouse Timer", &pThis->MouseTimer);
     
    882866};
    883867
    884 #endif /* IN_RING3 */
     868# endif /* IN_RING3 */
    885869#endif /* !VBOX_DEVICE_STRUCT_TESTCASE */
    886870
  • trunk/src/VBox/ExtPacks/BusMouseSample/ExtPack.xml

    r44441 r44446  
    11<?xml version="1.0"?>
    22<VirtualBoxExtensionPack xmlns="http://www.virtualbox.org/VirtualBoxExtensionPack" version="1.0">
    3     <Name>Skeleton</Name>
    4     <Description>The extension pack skeleton sample.</Description>
     3    <Name>BusMouse</Name>
     4    <Description>The bus mouse sample extension pack.</Description>
    55    <Version revision="@VBOX_SVN_REV@">@VBOX_VERSION_STRING@</Version>
    6     <MainModule>VBoxSkeletonMain</MainModule>
    7     <!-- VRDEModule>VBoxVNC</VRDEModule -->
     6    <MainModule>VBoxBusMouseMain</MainModule>
    87    <ShowLicense/>
    98</VirtualBoxExtensionPack>
  • trunk/src/VBox/ExtPacks/BusMouseSample/Makefile.kmk

    r44441 r44446  
    11# $Id$
    22## @file
    3 # Sub-Makefile for the Skeleton Extension Pack Sample.
     3# Sub-Makefile for the Bus Mouse Extension Pack Sample.
    44#
    55
    66#
    7 # Copyright (C) 2010-2012 Oracle Corporation
     7# Copyright (C) 2010-2013 Oracle Corporation
    88#
    99# Permission is hereby granted, free of charge, to any person
     
    3535# Extend the extension pack templates.
    3636#
    37 TEMPLATE_VBoxR3ExtPackSkeleton          = For the ring-3 context modules in the Skeleton extension pack.
    38 TEMPLATE_VBoxR3ExtPackSkeleton_EXTENDS  = VBoxR3ExtPack
    39 TEMPLATE_VBoxR3ExtPackSkeleton_INST     = $(INST_EXTPACK)Skeleton/$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)/
     37TEMPLATE_VBoxR3ExtPackBusMouse          = For the ring-3 context modules in the Bus Mouse extension pack.
     38TEMPLATE_VBoxR3ExtPackBusMouse_EXTENDS  = VBoxR3ExtPack
     39TEMPLATE_VBoxR3ExtPackBusMouse_INST     = $(INST_EXTPACK)BusMouse/$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)/
    4040
    41 TEMPLATE_VBoxR0ExtPackSkeleton          = For the ring-0 context modules in the Skeleton extension pack.
    42 TEMPLATE_VBoxR0ExtPackSkeleton_EXTENDS  = VBoxR0ExtPack
    43 TEMPLATE_VBoxR0ExtPackSkeleton_INST     = $(INST_EXTPACK)Skeleton/$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)/
     41TEMPLATE_VBoxR0ExtPackBusMouse          = For the ring-0 context modules in the Bus Mouse extension pack.
     42TEMPLATE_VBoxR0ExtPackBusMouse_EXTENDS  = VBoxR0ExtPack
     43TEMPLATE_VBoxR0ExtPackBusMouse_INST     = $(INST_EXTPACK)BusMouse/$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)/
    4444
    45 TEMPLATE_VBoxRcExtPackSkeleton          = For the raw-mode context modules in the Skeleton extension pack.
    46 TEMPLATE_VBoxRcExtPackSkeleton_EXTENDS  = VBoxRcExtPack
    47 TEMPLATE_VBoxRcExtPackSkeleton_INST     = $(INST_EXTPACK)Skeleton/$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)/
     45TEMPLATE_VBoxRcExtPackBusMouse          = For the raw-mode context modules in the Bus Mouse extension pack.
     46TEMPLATE_VBoxRcExtPackBusMouse_EXTENDS  = VBoxRcExtPack
     47TEMPLATE_VBoxRcExtPackBusMouse_INST     = $(INST_EXTPACK)BusMouse/$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)/
    4848
    49 TEMPLATE_VBoxInsExtPackSkeleton         = For the install targets of an extension pack.
    50 TEMPLATE_VBoxInsExtPackSkeleton_EXTENDS = VBoxR0ExtPack
    51 TEMPLATE_VBoxInsExtPackSkeleton_INST    = $(INST_EXTPACK)Skeleton/
     49TEMPLATE_VBoxInsExtPackBusMouse         = For the install targets of an extension pack.
     50TEMPLATE_VBoxInsExtPackBusMouse_EXTENDS = VBoxR0ExtPack
     51TEMPLATE_VBoxInsExtPackBusMouse_INST    = $(INST_EXTPACK)BusMouse/
    5252
    5353#
    5454# Globals.
    5555#
    56 VBOX_SKELETON_NAME         = Skeleton
    57 VBOX_SKELETON_MANGLED_NAME = Skeleton
    58 VBOX_PATH_EXTPACK_SKELETON = $(PATH_STAGE)/$(INST_EXTPACK)Skeleton
     56VBOX_BUSMOUSE_NAME         = BusMouse
     57VBOX_BUSMOUSE_MANGLED_NAME = BusMouse
     58VBOX_PATH_EXTPACK_BUSMOUSE = $(PATH_STAGE)/$(INST_EXTPACK)BusMouse
    5959
    6060
    6161#
    62 # VBoxSkeletonMain - The module which the VirtualBox Main API talks to.
     62# VBoxBusMouseMain - The module which the VirtualBox Main API talks to.
    6363#
    64 DLLS += VBoxSkeletonMain
    65 VBoxSkeletonMain_TEMPLATE = VBoxR3ExtPackSkeleton
    66 VBoxSkeletonMain_SOURCES = VBoxSkeletonMain.cpp
    67 VBoxSkeletonMain_DEFS =
     64DLLS += VBoxBusMouseMain
     65VBoxBusMouseMain_TEMPLATE = VBoxR3ExtPackBusMouse
     66VBoxBusMouseMain_SOURCES = VBoxBusMouseMain.cpp
     67VBoxBusMouseMain_DEFS =
     68
     69
     70#
     71# The device code.
     72#
     73DLLS += VBoxBusMouseR3
     74VBoxBusMouseR3_TEMPLATE = VBoxR3ExtPackBusMouse
     75VBoxBusMouseR3_SOURCES  = BusMouse.cpp
     76
     77SYSMODS += VBoxBusMouseR0
     78VBoxBusMouseR0_TEMPLATE = VBoxR0ExtPackBusMouse
     79VBoxBusMouseR0_SOURCES  = BusMouse.cpp
     80
     81ifdef VBOX_WITH_RAW_MODE
     82 SYSMODS += VBoxBusMouseRC
     83 VBoxBusMouseRC_TEMPLATE = VBoxRcExtPackBusMouse
     84 VBoxBusMouseRC_SOURCES  = BusMouse.cpp
     85endif
     86
    6887
    6988#
    7089# Install the description.
    7190#
    72 INSTALLS += VBoxSkeletonIns
    73 VBoxSkeletonIns_TEMPLATE = VBoxInsExtPackSkeleton
    74 VBoxSkeletonIns_SOURCES = \
    75         $(VBoxSkeletonIns_0_OUTDIR)/ExtPack.xml
    76 $(call VBOX_EDIT_VERSION_RULE_FN,VBoxSkeletonIns,ExtPack.xml)
     91INSTALLS += VBoxBusMouseIns
     92VBoxBusMouseIns_TEMPLATE = VBoxInsExtPackBusMouse
     93VBoxBusMouseIns_SOURCES = \
     94        $(VBoxBusMouseIns_0_OUTDIR)/ExtPack.xml
     95$(call VBOX_EDIT_VERSION_RULE_FN,VBoxBusMouseIns,ExtPack.xml)
    7796
    7897
     
    8099# Packing.
    81100#
    82 ifndef VBOX_WITHOUT_EXTPACK_SKELETON_PACKING
    83  PACKING += $(VBOX_PATH_PACKAGES)/$(VBOX_SKELETON_MANGLED_NAME)-$(VBOX_VERSION_STRING)r$(VBOX_SVN_REV).vbox-extpack
     101ifndef VBOX_WITHOUT_EXTPACK_BUSMOUSE_PACKING
     102 PACKING += $(VBOX_PATH_PACKAGES)/$(VBOX_BUSMOUSE_MANGLED_NAME)-$(VBOX_VERSION_STRING)r$(VBOX_SVN_REV).vbox-extpack
    84103endif
    85104
     
    91110
    92111# Build the file list.  The macro takes 1=darwin.x86, 2=dist/VirtualBox.app/Contents/MacOS, 3=dylib
    93 VBOX_SKELETON_FILES_MACRO = \
    94         $(PATH_OUT_BASE)/$(1)/$(KBUILD_TYPE)/$(2)/ExtensionPacks/$(VBOX_SKELETON_MANGLED_NAME)/$(1)/VBoxSkeletonMain.$(3)=>$(1)/VBoxSkeletonMain.$(3)
     112VBOX_BUSMOUSE_FILES_MACRO = \
     113        $(PATH_OUT_BASE)/$(1)/$(KBUILD_TYPE)/$(2)/ExtensionPacks/$(VBOX_BUSMOUSE_MANGLED_NAME)/$(1)/VBoxBusMouseMain.$(3)=>$(1)/VBoxBusMouseMain.$(3) \
     114        $(PATH_OUT_BASE)/$(1)/$(KBUILD_TYPE)/$(2)/ExtensionPacks/$(VBOX_BUSMOUSE_MANGLED_NAME)/$(1)/VBoxBusMouseR3.$(3)=>$(1)/VBoxBusMouseR3.$(3) \
     115        $(PATH_OUT_BASE)/$(1)/$(KBUILD_TYPE)/$(2)/ExtensionPacks/$(VBOX_BUSMOUSE_MANGLED_NAME)/$(1)/VBoxBusMouseR0.r0=>$(1)/VBoxBusMouseR0.r0
     116ifdef VBOX_WITH_RAW_MODE
     117 VBOX_BUSMOUSE_FILES_MACRO += \
     118        $(PATH_OUT_BASE)/$(1)/$(KBUILD_TYPE)/$(2)/ExtensionPacks/$(VBOX_BUSMOUSE_MANGLED_NAME)/$(1)/VBoxBusMouseRC.rc=>$(1)/VBoxBusMouseRC.rc
     119endif
    95120
    96 VBOX_SKELETON_FILES := \
    97         $(VBOX_PATH_EXTPACK_SKELETON)/ExtPack.xml=>ExtPack.xml
     121VBOX_BUSMOUSE_FILES := \
     122        $(VBOX_PATH_EXTPACK_BUSMOUSE)/ExtPack.xml=>ExtPack.xml
    98123
    99124if1of (darwin.amd64, $(VBOX_WITH_EXTPACK_OS_ARCHS))
    100  VBOX_SKELETON_FILES += $(call VBOX_SKELETON_FILES_MACRO,darwin.amd64,dist/VirtualBox.app/Contents/MacOS,dylib)
     125 VBOX_BUSMOUSE_FILES += $(call VBOX_BUSMOUSE_FILES_MACRO,darwin.amd64,dist/VirtualBox.app/Contents/MacOS,dylib)
    101126endif
    102127if1of (darwin.x86, $(VBOX_WITH_EXTPACK_OS_ARCHS))
    103  VBOX_SKELETON_FILES += $(call VBOX_SKELETON_FILES_MACRO,darwin.x86,dist/VirtualBox.app/Contents/MacOS,dylib)
     128 VBOX_BUSMOUSE_FILES += $(call VBOX_BUSMOUSE_FILES_MACRO,darwin.x86,dist/VirtualBox.app/Contents/MacOS,dylib)
    104129endif
    105130if1of (freebsd.amd64, $(VBOX_WITH_EXTPACK_OS_ARCHS))
    106  VBOX_SKELETON_FILES += $(call VBOX_SKELETON_FILES_MACRO,freebsd.amd64,bin,so)
     131 VBOX_BUSMOUSE_FILES += $(call VBOX_BUSMOUSE_FILES_MACRO,freebsd.amd64,bin,so)
    107132endif
    108133if1of (freebsd.x86, $(VBOX_WITH_EXTPACK_OS_ARCHS))
    109  VBOX_SKELETON_FILES += $(call VBOX_SKELETON_FILES_MACRO,freebsd.x86,bin,so)
     134 VBOX_BUSMOUSE_FILES += $(call VBOX_BUSMOUSE_FILES_MACRO,freebsd.x86,bin,so)
    110135endif
    111136if1of (linux.amd64, $(VBOX_WITH_EXTPACK_OS_ARCHS))
    112  VBOX_SKELETON_FILES += $(call VBOX_SKELETON_FILES_MACRO,linux.amd64,bin,so)
     137 VBOX_BUSMOUSE_FILES += $(call VBOX_BUSMOUSE_FILES_MACRO,linux.amd64,bin,so)
    113138endif
    114139if1of (linux.x86, $(VBOX_WITH_EXTPACK_OS_ARCHS))
    115  VBOX_SKELETON_FILES += $(call VBOX_SKELETON_FILES_MACRO,linux.x86,bin,so)
     140 VBOX_BUSMOUSE_FILES += $(call VBOX_BUSMOUSE_FILES_MACRO,linux.x86,bin,so)
    116141endif
    117142if1of (os2.x86, $(VBOX_WITH_EXTPACK_OS_ARCHS))
    118  VBOX_SKELETON_FILES += $(call VBOX_SKELETON_FILES_MACRO,os2.x86,bin,so)
     143 VBOX_BUSMOUSE_FILES += $(call VBOX_BUSMOUSE_FILES_MACRO,os2.x86,bin,so)
    119144endif
    120145if1of (solaris.amd64, $(VBOX_WITH_EXTPACK_OS_ARCHS))
    121  VBOX_SKELETON_FILES += $(call VBOX_SKELETON_FILES_MACRO,solaris.amd64,bin,so)
     146 VBOX_BUSMOUSE_FILES += $(call VBOX_BUSMOUSE_FILES_MACRO,solaris.amd64,bin,so)
    122147endif
    123148if1of (solaris.x86, $(VBOX_WITH_EXTPACK_OS_ARCHS))
    124  VBOX_SKELETON_FILES += $(call VBOX_SKELETON_FILES_MACRO,solaris.x86,bin,so)
     149 VBOX_BUSMOUSE_FILES += $(call VBOX_BUSMOUSE_FILES_MACRO,solaris.x86,bin,so)
    125150endif
    126151if1of (win.amd64, $(VBOX_WITH_EXTPACK_OS_ARCHS))
    127  VBOX_SKELETON_FILES += $(call VBOX_SKELETON_FILES_MACRO,win.amd64,bin,dll)
     152 VBOX_BUSMOUSE_FILES += $(call VBOX_BUSMOUSE_FILES_MACRO,win.amd64,bin,dll)
    128153endif
    129154if1of (win.x86, $(VBOX_WITH_EXTPACK_OS_ARCHS))
    130  VBOX_SKELETON_FILES += $(call VBOX_SKELETON_FILES_MACRO,win.x86,bin,dll)
     155 VBOX_BUSMOUSE_FILES += $(call VBOX_BUSMOUSE_FILES_MACRO,win.x86,bin,dll)
    131156endif
    132157
    133158# Pack it all up using a temporary staging directory.
    134 $(VBOX_PATH_PACKAGES)/$(VBOX_SKELETON_MANGLED_NAME)-$(VBOX_VERSION_STRING)r$(VBOX_SVN_REV).vbox-extpack: \
    135                 $$(foreach file, $$(VBOX_SKELETON_FILES), $$(firstword $$(subst =>,$$(SP),$$(file)))) \
     159$(VBOX_PATH_PACKAGES)/$(VBOX_BUSMOUSE_MANGLED_NAME)-$(VBOX_VERSION_STRING)r$(VBOX_SVN_REV).vbox-extpack: \
     160                $$(foreach file, $$(VBOX_BUSMOUSE_FILES), $$(firstword $$(subst =>,$$(SP),$$(file)))) \
    136161                | $(VBOX_PATH_PACKAGES)/
    137         $(RM) -f $(wildcard $(VBOX_PATH_PACKAGES)/$(VBOX_SKELETON_MANGLED_NAME)-*.vbox-extpack) \
    138                 $(VBoxSkeletonIns_0_OUTDIR)/ExtPack.manifest \
    139                 $(VBoxSkeletonIns_0_OUTDIR)/ExtPack.signature
     162        $(RM) -f $(wildcard $(VBOX_PATH_PACKAGES)/$(VBOX_BUSMOUSE_MANGLED_NAME)-*.vbox-extpack) \
     163                $(VBoxBusMouseIns_0_OUTDIR)/ExtPack.manifest \
     164                $(VBoxBusMouseIns_0_OUTDIR)/ExtPack.signature
    140165# Stage all the files
    141         $(RM) -Rf $(VBoxSkeletonIns_0_OUTDIR)/Stage/
    142         $(foreach file, $(VBOX_SKELETON_FILES),\
    143                 $(NLTAB)$(MKDIR) -p $(dir $(lastword $(subst =>,$(SP)$(VBoxSkeletonIns_0_OUTDIR)/Stage/,$(file)))) \
    144                 $(NLTAB)$(CP) $(subst =>,$(SP)$(VBoxSkeletonIns_0_OUTDIR)/Stage/,$(file)) )
     166        $(RM) -Rf $(VBoxBusMouseIns_0_OUTDIR)/Stage/
     167        $(foreach file, $(VBOX_BUSMOUSE_FILES),\
     168                $(NLTAB)$(MKDIR) -p $(dir $(lastword $(subst =>,$(SP)$(VBoxBusMouseIns_0_OUTDIR)/Stage/,$(file)))) \
     169                $(NLTAB)$(CP) $(subst =>,$(SP)$(VBoxBusMouseIns_0_OUTDIR)/Stage/,$(file)) )
    145170# Create the manifest
    146171        $(VBOX_RTMANIFEST) \
    147                 --manifest $(VBoxSkeletonIns_0_OUTDIR)/Stage/ExtPack.manifest \
    148                 --chdir $(VBoxSkeletonIns_0_OUTDIR)/Stage/ \
    149                 $(foreach file, $(VBOX_SKELETON_FILES), $(lastword $(subst =>,$(SP),$(file))))
    150         $(APPEND) $(VBoxSkeletonIns_0_OUTDIR)/Stage/ExtPack.signature "todo"
     172                --manifest $(VBoxBusMouseIns_0_OUTDIR)/Stage/ExtPack.manifest \
     173                --chdir $(VBoxBusMouseIns_0_OUTDIR)/Stage/ \
     174                $(foreach file, $(VBOX_BUSMOUSE_FILES), $(lastword $(subst =>,$(SP),$(file))))
     175        $(APPEND) $(VBoxBusMouseIns_0_OUTDIR)/Stage/ExtPack.signature "todo"
    151176        $(CHMOD) a+r \
    152                 $(VBoxSkeletonIns_0_OUTDIR)/Stage/ExtPack.manifest \
    153                 $(VBoxSkeletonIns_0_OUTDIR)/Stage/ExtPack.signature
     177                $(VBoxBusMouseIns_0_OUTDIR)/Stage/ExtPack.manifest \
     178                $(VBoxBusMouseIns_0_OUTDIR)/Stage/ExtPack.signature
    154179# Tar it up.
    155         tar -cvf - -C $(VBoxSkeletonIns_0_OUTDIR)/Stage/ . | gzip -9c > $@
     180        tar -cvf - -C $(VBoxBusMouseIns_0_OUTDIR)/Stage/ . | gzip -9c > $@
    156181# Clean up
    157         $(RM) -Rf $(VBoxSkeletonIns_0_OUTDIR)/Stage/
     182        $(RM) -Rf $(VBoxBusMouseIns_0_OUTDIR)/Stage/
    158183
    159184BLDDIRS += $(VBOX_PATH_PACKAGES)/
  • trunk/src/VBox/ExtPacks/BusMouseSample/VBoxBusMouseMain.cpp

    r44441 r44446  
    11/* $Id$ */
    22/** @file
    3  * Skeleton main module.
     3 * Bus Mouse main module.
    44 */
    55
    66/*
    7  * Copyright (C) 2010-2012 Oracle Corporation
     7 * Copyright (C) 2010-2013 Oracle Corporation
    88 *
    99 * Permission is hereby granted, free of charge, to any person
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