17#include <reactos/buildno.h>
18#include <reactos/version.h>
29#include "../console/video.h"
43 "ReactOS PS/2 16/32-bit Mouse Driver Compatible MS-MOUSE 6.26\r\n"
44 "Version "KERNEL_VERSION_STR
" (Build "KERNEL_VERSION_BUILD_STR
")\r\n"
45 "Copyright (C) ReactOS Team 1996-"COPYRIGHT_YEAR
"\0";
65#define MICKEYS_PER_CELL_HORIZ 8
66#define MICKEYS_PER_CELL_VERT 16
186 for (
i = 0;
i < 16;
i++)
192 for (
j = 0;
j < 4;
j++)
203 for (
j = 0;
j < 16;
j++)
213 for (
j = 0;
j < 4;
j++)
244 for (
i = 0;
i < 16;
i++)
256 for (
j = 0;
j < 16;
j++)
267 CursorLine[
j] ^= 0x0F;
305 for (
i = 0;
i < 16;
i++)
307 WORD CursorLine[4] = {0};
312 for (
j = 0;
j < 16;
j++)
320 for (
j = 0;
j < 4;
j++)
339 for (
i = 0;
i < 16;
i++)
425 DPRINT(
"Calling Handler0 %04X:%04X with CallMask 0x%04X\n",
473 DPRINT1(
"Calling Handler[%d] %04X:%04X with CallMask 0x%04X\n",
524 if (NewState > OldState)
530 CallMask |= (1 << (2 *
i + 1));
532 else if (NewState < OldState)
538 CallMask |= (1 << (2 *
i + 2));
551 SHORT DeltaX, DeltaY;
723 DPRINT(
"Setting mouse horizontal range: %u - %u\n",
Min,
Max);
742 DPRINT(
"Setting mouse vertical range: %u - %u\n",
Min,
Max);
778 else if (BX == 0x0001)
781 DPRINT1(
"Defining hardware cursor is unimplemented\n");
788 DPRINT1(
"Invalid BX value 0x%04X\n", BX);
811 DPRINT1(
"Define callback 0x%04X, %04X:%04X\n",
835 DPRINT1(
"INT 33h, AH=13h: Mouse double-speed threshold is UNSUPPORTED\n");
847 DPRINT1(
"Exchange old callback 0x%04X, %04X:%04X with new callback 0x%04X, %04X:%04X\n",
908 DPRINT1(
"Define v6.0+ callback 0x%04X, %04X:%04X\n",
911 if (CallMask == 0x0000)
955 USHORT EmptyHandler = 0xFFFF;
960 if (EmptyHandler == 0xFFFF &&
981 if (!
Success && EmptyHandler != 0xFFFF
1036 DPRINT1(
"INT 33h, AH=1Ah: Mouse sensitivity is UNSUPPORTED\n");
1052 DPRINT1(
"INT 33h, AH=1Bh: Mouse sensitivity is UNSUPPORTED\n");
1227 DPRINT1(
"BIOS Function INT 33h, AX = 0x%04X NOT IMPLEMENTED\n",
getAX());
VOID PicIRQComplete(BYTE IntNum)
#define BIOS_MISC_INTERRUPT
_In_ CDROM_SCAN_FOR_SPECIAL_INFO _In_ PCDROM_SCAN_FOR_SPECIAL_HANDLER Function
#define TO_LINEAR(seg, off)
#define SEG_OFF_TO_PTR(seg, off)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
ULONG RegisterInt32(IN ULONG FarPtr, IN BYTE IntNumber, IN EMULATOR_INT32_PROC IntHandler, OUT PSIZE_T CodeSize OPTIONAL)
VOID Int32Call(IN PCALLBACK16 Context, IN BYTE IntNumber)
#define Int16To32StubSize
static VOID DosUpdatePosition(PCOORD NewPosition)
static MOUSE_DRIVER_STATE DriverState
static VOID DosUpdateButtons(BYTE ButtonState)
static BOOLEAN DriverEnabled
static VOID WINAPI DosMouseService(LPWORD Stack)
static VOID DosMouseDisable(VOID)
static DWORD OldIrqHandler
static const CHAR MouseCopyright[]
static VOID EraseMouseCursor(VOID)
#define MICKEYS_PER_CELL_HORIZ
VOID BiosPs2Service(UCHAR Function)
static DWORD OldIntHandler
static VOID ToMouseCoordinates(PCOORD Position)
static VOID WINAPI DosMouseIrq(LPWORD Stack)
static PMOUSE_DRIVER MouseData
#define MICKEYS_PER_CELL_VERT
BOOLEAN DosMouseInitialize(VOID)
static WORD DefaultGfxCursorMask[16]
static WORD MouseDataSegment
static VOID FromMouseCoordinates(PCOORD Position)
struct _MOUSE_DRIVER * PMOUSE_DRIVER
struct _MOUSE_DRIVER MOUSE_DRIVER
static VOID CallMouseUserHandlers(USHORT CallMask)
VOID DosMouseCleanup(VOID)
static CALLBACK16 MouseContext
static WORD DefaultGfxScreenMask[16]
static VOID PaintMouseCursor(VOID)
static VOID DosMouseEnable(VOID)
#define DOS_MOUSE_INTERRUPT
struct _MOUSE_DRIVER_STATE MOUSE_DRIVER_STATE
struct _MOUSE_DRIVER_STATE * PMOUSE_DRIVER_STATE
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
BOOLEAN PS2PortQueueRead(BYTE PS2Port)
MOUSE_USER_HANDLER Handlers[3]
COORD LastRelease[NUM_MOUSE_BUTTONS]
MOUSE_USER_HANDLER Handler0
WORD PressCount[NUM_MOUSE_BUTTONS]
COORD LastPress[NUM_MOUSE_BUTTONS]
struct _MOUSE_DRIVER_STATE::@5057 TextCursor
WORD ReleaseCount[NUM_MOUSE_BUTTONS]
struct _MOUSE_DRIVER_STATE::@5058 GraphicsCursor
BYTE MouseDosInt16Stub[Int16To32StubSize]
BYTE MouseContextScratch[TRAMPOLINE_SIZE]
BYTE MouseIrqInt16Stub[Int16To32StubSize]
CHAR Copyright[sizeof(MouseCopyright)]
BOOLEAN VgaGetDoubleVisionState(PBOOLEAN Horizontal, PBOOLEAN Vertical)
VOID InitializeContext(IN PCALLBACK16 Context, IN USHORT Segment, IN USHORT Offset)
VOID RunCallback16(IN PCALLBACK16 Context, IN ULONG FarPtr)
FAST486_STATE EmulatorContext
WORD DosAllocateMemory(WORD Size, WORD *MaxAvailable)
BOOLEAN DosFreeMemory(WORD BlockData)
VOID MouseGetDataFast(PCOORD CurrentPosition, PBYTE CurrentButtonState)
VOID IOWriteB(USHORT Port, UCHAR Buffer)
UCHAR IOReadB(USHORT Port)
VOID FASTCALL EmulatorReadMemory(PFAST486_STATE State, ULONG Address, PVOID Buffer, ULONG Size)
VOID FASTCALL EmulatorWriteMemory(PFAST486_STATE State, ULONG Address, PVOID Buffer, ULONG Size)
COORD VgaGetDisplayResolution(VOID)
@ VGA_GC_READ_MAP_SEL_REG
#define FIELD_OFFSET(t, f)
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
_In_ HFONT _Out_ PUINT Height
VOID WINAPI setBX(USHORT)
VOID WINAPI setCX(USHORT)
VOID WINAPI setDX(USHORT)
USHORT WINAPI getBX(VOID)
USHORT WINAPI getDS(VOID)
USHORT WINAPI getCX(VOID)
USHORT WINAPI getSI(VOID)
USHORT WINAPI getDX(VOID)
VOID WINAPI setDS(USHORT)
USHORT WINAPI getAX(VOID)
USHORT WINAPI getES(VOID)
USHORT WINAPI getBP(VOID)
USHORT WINAPI getDI(VOID)
VOID WINAPI setBP(USHORT)
VOID WINAPI setAX(USHORT)
VOID WINAPI setES(USHORT)
VOID WINAPI setSI(USHORT)
VOID WINAPI setDI(USHORT)
#define GRAPHICS_VIDEO_SEG
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT _In_ USHORT Version
_In_ WDFINTERRUPT _In_ PFN_WDF_INTERRUPT_SYNCHRONIZE Callback
_In_ WDFREQUEST _In_ PIO_STACK_LOCATION Stack
_Must_inspect_result_ _In_ ULONG Flags