delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/06/29/14:45:15

From: "Pavlos" <trash24379 AT usa DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Wheel mice
Date: Tue, 29 Jun 1999 21:09:13 +0300
Organization: An OTEnet S.A. customer
Lines: 74
Message-ID: <7lb25d$nsc$1@newssrv.otenet.gr>
NNTP-Posting-Host: dram-a05.otenet.gr
X-Trace: newssrv.otenet.gr 930679789 24460 195.167.113.228 (29 Jun 1999 18:09:49 GMT)
X-Complaints-To: abuse AT otenet DOT gr
NNTP-Posting-Date: 29 Jun 1999 18:09:49 GMT
X-Newsreader: Microsoft Outlook Express 4.72.3110.1
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Is there any way to use the extra two buttons (Button 4&5) from wheel mice
using DJGPP+Allegro?
I think this can't be done under clean DOS, but can it be done under Windows
DOS prompt?

This is some info I found about Intellimice from Microsoft
Can we sent those commands described here?
I appreciate any help (even if you tell me it can't be done and why)
Thanx a lot
Pavlos

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

2.2 Setting the Extended Mode

Since there is no widely accepted provision in normal PS/2 protocol for
different modes or wheel data Microsoft drivers use normal PS/2 commands in
a particular sequence to signal the mouse to change modes. To set the mouse
to the extended mode the driver sends the following command sequence:

SET_SAMPLING_RATE 200 HZ(0xF3 0xC8)
SET_SAMPLING_RATE 100 HZ(0xF3 0x64)
SET_SAMPLING_RATE 80 HZ(0xF3 0x50)
In order for the mouse to change modes it must receive these commands
exactly as above with no other commands interspersed in the sequence. Once
the driver sends this sequence it must determine if the mouse supports the
extended mode so it will know to expect the extra wheel data that is not a
normal part of a PS/2 mouse data packet. Once an IntelliMouse changes to the
extended mode its device ID becomes 0x03. Note: Normally a PS/2 mouse has an
ID of 0x00. Immediately after sending the SET_SAMPLING_RATE sequence above
the driver issues a READ_DEVICE_TYPE (0xF2) command. If the mouse returns an
ID of 0x03 then the driver knows an IntelliMouse compatible device is
attached and expects an extended PS/2 mouse data packet. If the driver doesn
't receive a device ID of 0x03 in response to the READ_DEVICE_TYPE command
it will issue a RESET (0xFF) command and start over treating the device as
it would a normal two-button mouse. Note that a RESET (0xFF) command will
return an IntelliMouse to its power up default mode.



2.3 IntelliMouse Default PS/2 Data Packet

When in the default mode IntelliMouse sends its mouse data in a Microsoft
standard PS/2 3-byte data packet. When in this mode pressing the wheel
button or turning the wheel will have no effect.

  D7 D6 D5 D4 D3 D2 D1 D0
Byte 1 0 0 Y7 X7 1 0 Right
Button Left
Button
Byte 2 X7 X6 X5 X4 X3 X2 X1 X0
Byte 3 Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0



2.4 IntelliMouse Extended PS/2 Data Packet

When IntelliMouse pointing devices are in the extended mode they send their
mouse data in a 4-byte data packet. The packet is the normal Microsoft
standard PS/2 3-byte packet plus one additional byte containing the wheel
data denoted as Z below. Also, the wheel button is reported in D2 of Byte 1
(the third button.)

  D7 D6 D5 D4 D3 D2 D1 D0
Byte 1 0 0 Y7 X7 1 Wheel
Button Right
Button Left
Button
Byte 2 X7 X6 X5 X4 X3 X2 X1 X0
Byte 3 Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
Byte 4 Z7 Z6 Z5 Z4 Z3 Z2 Z1 Z0



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019