2014-09-16 00:51:15 +00:00
|
|
|
/*
|
|
|
|
* COPYRIGHT: GPL - See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS Virtual DOS Machine
|
2015-09-18 17:01:49 +00:00
|
|
|
* FILE: subsystems/mvdm/ntvdm/dos/mouse32.h
|
2015-08-07 16:10:18 +00:00
|
|
|
* PURPOSE: VDM 32-bit compatible PS/2 MOUSE.COM driver
|
2014-09-16 00:51:15 +00:00
|
|
|
* PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _MOUSE32_H_
|
|
|
|
#define _MOUSE32_H_
|
|
|
|
|
|
|
|
/* DEFINES ********************************************************************/
|
|
|
|
|
[NTVDM]
Mouse:
- Remove now useless code in mouse support in BIOS.
- Implement INT 33h, AH=1Bh "Return mouse sensitivity" (returning hardcoded standard values since we don't support custom sensitivities) (AH=13h and 1Ah are marked as UNSUPPORTED).
- INT 33h, AH=1Fh "Disable mouse driver" returns in ES:BX the old INT 33h vector value: implement that.
- Implement INT 33h, AH=21h "Software reset", AH=24h and 4Dh and 6Dh "Software version and mouse info", "pointer to copyright string" and "version 'string'" functionalities.
DOS:
- Initialize in Win2k3-ntvdm-compatible order the DOS drivers: NUL, then CON, then XMS, and then EMS.
- Fix segment/offset inversion usage in INT 21h, AH=5Ch "Lock/Unlock region of file": when using MAKELONG macro to build a far pointer, the first parameter (loword) is the offset, and the second parameter (hiword) is the segment.
svn path=/trunk/; revision=67518
2015-05-02 20:48:08 +00:00
|
|
|
//
|
2015-08-07 16:10:18 +00:00
|
|
|
// We are ReactOS PS/2 Mouse Driver Version 6.26, compatible MS-MOUSE 6.26
|
[NTVDM]
Mouse:
- Remove now useless code in mouse support in BIOS.
- Implement INT 33h, AH=1Bh "Return mouse sensitivity" (returning hardcoded standard values since we don't support custom sensitivities) (AH=13h and 1Ah are marked as UNSUPPORTED).
- INT 33h, AH=1Fh "Disable mouse driver" returns in ES:BX the old INT 33h vector value: implement that.
- Implement INT 33h, AH=21h "Software reset", AH=24h and 4Dh and 6Dh "Software version and mouse info", "pointer to copyright string" and "version 'string'" functionalities.
DOS:
- Initialize in Win2k3-ntvdm-compatible order the DOS drivers: NUL, then CON, then XMS, and then EMS.
- Fix segment/offset inversion usage in INT 21h, AH=5Ch "Lock/Unlock region of file": when using MAKELONG macro to build a far pointer, the first parameter (loword) is the offset, and the second parameter (hiword) is the segment.
svn path=/trunk/; revision=67518
2015-05-02 20:48:08 +00:00
|
|
|
//
|
|
|
|
#define MOUSE_VERSION MAKEWORD(0x26, 0x06)
|
|
|
|
|
2014-11-11 01:40:23 +00:00
|
|
|
#define DOS_MOUSE_INTERRUPT 0x33
|
2015-04-17 00:20:39 +00:00
|
|
|
#define MOUSE_IRQ_INT 0x74
|
|
|
|
#define MOUSE_MAX_HORIZ 640
|
|
|
|
#define MOUSE_MAX_VERT 200
|
2014-09-16 00:51:15 +00:00
|
|
|
|
|
|
|
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;
|
2015-04-17 00:20:39 +00:00
|
|
|
WORD MinX, MaxX, MinY, MaxY;
|
2014-09-16 00:51:15 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* 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;
|
2016-03-10 00:59:50 +00:00
|
|
|
|
|
|
|
BYTE GraphicsData[256];
|
2014-09-16 00:51:15 +00:00
|
|
|
} MOUSE_DRIVER_STATE, *PMOUSE_DRIVER_STATE;
|
|
|
|
|
|
|
|
/* FUNCTIONS ******************************************************************/
|
|
|
|
|
|
|
|
BOOLEAN DosMouseInitialize(VOID);
|
|
|
|
VOID DosMouseCleanup(VOID);
|
|
|
|
|
2015-10-03 21:47:46 +00:00
|
|
|
#endif /* _MOUSE32_H_ */
|