mirror of
https://github.com/reactos/reactos.git
synced 2024-08-06 19:36:50 +00:00
![Hermès Bélusca-Maïto](/assets/img/avatar_default.png)
PS2: - By default all the PS/2 ports are disabled. They become enabled by the BIOS at the POST step. - Similarly it is the BIOS POST that sets up the PS/2 controller configuration byte. - Synchronize the value of bit 2 "System flag" and bit 4 "Keyboard enable flag" in the status register, according to what is set in the controller configuration register. What is the "keyboard enable flag" ? See http://www.os2museum.com/wp/the-dos-4-0-shell-mouse-mystery/ for more details... HW MOUSE: - Resetting the mouse sends also an ACKnowledge byte too... BIOS32: - Fix the reported number of bytes in the BIOS configuration table. - Enable the PS/2 ports in the POST. - Implement the "Pointing Device BIOS Interface" INT 15h, AH=C2h, AL=00h...09h based on VBox OSE & SeaBIOS; we should make our PS/2 mouse driver use it. The real call to INT 15h, AH=C2h function is still disabled because our mouse driver doesn't react well with it, when we run some applications like MS Diagnostics. PS2 MOUSE DRV: - Update copyright notice; - Remove 2 useless functions; - I've put in comments in the code the places where calls to the BIOS ps/2 mouse interface are needed. svn path=/trunk/; revision=68613
84 lines
2.1 KiB
C
84 lines
2.1 KiB
C
/*
|
|
* COPYRIGHT: GPL - See COPYING in the top level directory
|
|
* PROJECT: ReactOS Virtual DOS Machine
|
|
* FILE: mouse32.h
|
|
* PURPOSE: VDM 32-bit compatible PS/2 MOUSE.COM driver
|
|
* PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
|
|
*/
|
|
|
|
#ifndef _MOUSE32_H_
|
|
#define _MOUSE32_H_
|
|
|
|
/* DEFINES ********************************************************************/
|
|
|
|
//
|
|
// We are ReactOS PS/2 Mouse Driver Version 6.26, compatible MS-MOUSE 6.26
|
|
//
|
|
#define MOUSE_VERSION MAKEWORD(0x26, 0x06)
|
|
|
|
#define DOS_MOUSE_INTERRUPT 0x33
|
|
#define MOUSE_IRQ_INT 0x74
|
|
#define MOUSE_MAX_HORIZ 640
|
|
#define MOUSE_MAX_VERT 200
|
|
|
|
enum
|
|
{
|
|
MOUSE_BUTTON_LEFT,
|
|
MOUSE_BUTTON_RIGHT,
|
|
MOUSE_BUTTON_MIDDLE,
|
|
NUM_MOUSE_BUTTONS
|
|
};
|
|
|
|
typedef struct _MOUSE_USER_HANDLER
|
|
{
|
|
/*
|
|
* CallMask format: see table: http://www.ctyme.com/intr/rb-5968.htm#Table3171
|
|
* Alternatively, see table: http://www.ctyme.com/intr/rb-5981.htm#Table3174
|
|
*/
|
|
USHORT CallMask;
|
|
ULONG Callback; // Far pointer to the callback
|
|
} MOUSE_USER_HANDLER, *PMOUSE_USER_HANDLER;
|
|
|
|
typedef struct _MOUSE_DRIVER_STATE
|
|
{
|
|
SHORT ShowCount;
|
|
COORD Position;
|
|
WORD Character;
|
|
WORD ButtonState;
|
|
WORD PressCount[NUM_MOUSE_BUTTONS];
|
|
COORD LastPress[NUM_MOUSE_BUTTONS];
|
|
WORD ReleaseCount[NUM_MOUSE_BUTTONS];
|
|
COORD LastRelease[NUM_MOUSE_BUTTONS];
|
|
SHORT HorizCount;
|
|
SHORT VertCount;
|
|
WORD MinX, MaxX, MinY, MaxY;
|
|
|
|
/*
|
|
* User Subroutine Handlers called on mouse events
|
|
*/
|
|
MOUSE_USER_HANDLER Handler0; // Handler compatible MS MOUSE v1.0+
|
|
MOUSE_USER_HANDLER Handlers[3]; // Handlers compatible MS MOUSE v6.0+
|
|
|
|
struct
|
|
{
|
|
WORD ScreenMask;
|
|
WORD CursorMask;
|
|
} TextCursor;
|
|
|
|
struct
|
|
{
|
|
COORD HotSpot;
|
|
WORD ScreenMask[16];
|
|
WORD CursorMask[16];
|
|
} GraphicsCursor;
|
|
} MOUSE_DRIVER_STATE, *PMOUSE_DRIVER_STATE;
|
|
|
|
/* FUNCTIONS ******************************************************************/
|
|
|
|
BOOLEAN DosMouseInitialize(VOID);
|
|
VOID DosMouseCleanup(VOID);
|
|
|
|
#endif // _MOUSE32_H_
|
|
|
|
/* EOF */
|