a17c410acd1e0603a222c8713de7fb128b400fbc
2 * COPYRIGHT: GPL - See COPYING in the top level directory
3 * PROJECT: ReactOS Virtual DOS Machine
5 * PURPOSE: VDM Mouse 32-bit BIOS
6 * PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
9 /* INCLUDES *******************************************************************/
16 #include "moubios32.h"
20 #include "hardware/ps2.h"
22 /* PRIVATE VARIABLES **********************************************************/
24 /* PRIVATE FUNCTIONS **********************************************************/
27 static VOID WINAPI
BiosMouseIrq(LPWORD Stack
)
29 PicIRQComplete(LOBYTE(Stack
[STACK_INT_NUM
]));
32 VOID
BiosMousePs2Interface(LPWORD Stack
)
34 DPRINT1("INT 15h, AH = C2h must be implemented in order to support vendor mouse drivers\n");
38 /* Enable / Disable */
50 /* Set Sampling Rate */
74 /* Extended Commands */
80 /* Set Device Handler Address */
86 /* Write to Pointer Port */
92 /* Read from Pointer Port */
100 DPRINT1("INT 15h, AH = C2h, AL = 0x%02X NOT IMPLEMENTED\n",
106 /* PUBLIC FUNCTIONS ***********************************************************/
108 BOOLEAN
MouseBios32Initialize(VOID
)
110 BYTE ControllerConfig
;
112 /* Clear the mouse queue */
113 while (PS2PortQueueRead(1)) continue;
115 /* Enable packet reporting */
116 IOWriteB(PS2_CONTROL_PORT
, 0xD4);
117 IOWriteB(PS2_DATA_PORT
, 0xF4);
119 /* Read the mouse ACK reply */
123 IOWriteB(PS2_CONTROL_PORT
, 0x20);
124 ControllerConfig
= IOReadB(PS2_DATA_PORT
);
125 IOWriteB(PS2_CONTROL_PORT
, 0x60);
126 IOWriteB(PS2_DATA_PORT
, ControllerConfig
| 0x02);
128 /* Set up the HW vector interrupts */
129 EnableHwIRQ(12, BiosMouseIrq
);
134 VOID
MouseBios32Cleanup(VOID
)