인터넷에서 찾은 소스코드가 동작을 안하네요
아래의 코드가 맞는건지 틀린건지 알고 싶어요 ^^
///////////////////////////////////////////////////////////////////
/*
D7 D6 D5 D4 D3 D2 D1 D0
1st YV XV YS XS 1 0 R L
2nd X7 X6 X5 X4 X3 X2 X1 X0
3rd Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
L Left Button State (1 = pressed down)
R Right Button State (1 = pressed down)
X0-X7 Movement in the X direction
Y0-Y7 Movement in the Y direction
XS Direction of the movement in the X axis (1 = UP)
YS Direction of the movement in the Y axis (1 = LEFT)
XV,YV Overflow of the movement data bits (1 = overflow has
occured)
*/
int nIndex = 0;
WORD nMousePos = 0xFFFF;
// disable the keyboard
WRITE_PORT_UCHAR(0x64, 0xad);
// enable the aux device
WRITE_PORT_UCHAR(0x64, 0xa8);
for(nIndex = 0; nIndex < 5; nIndex++)
{
// send the first command
WRITE_PORT_UCHAR(0x60, 0xF1);
// write to the output port
WRITE_PORT_UCHAR(0x64, 0xd4);
// send the second command
WRITE_PORT_UCHAR(0x60, nMousePos);
// write to the output port
WRITE_PORT_UCHAR(0x64, 0xd4);
// send the third command
_outp(0x60, nMousePos);
// write to the output port
WRITE_PORT_UCHAR(0x64, 0xd4);
nMousePos++;
}
// disable the aux device
WRITE_PORT_UCHAR(0x64, 0xa7);
// enable the keyboard
WRITE_PORT_UCHAR(0x64, 0xae);
///////////////////////////////////////////////////////////////////
아래 소스는...움..
aux포트에 직접 접근하여 컨트롤을 하려는 것 같은데요...
실제로 동작을 할지 안할지는 저도 잘 모르겠네요.(할것도 같습니다만...^^;)
NTDDK의 SRC -> Input 폴더 아래에 있는 Mouser와 mouclass소스를 빡쎄게 분석하시면 마우스 드라이버를 작성하실 수 있을 겁니다.
도움이 되었길 바라겠습니다.