just to add the other nightmare problem that reading these ports could
cause - there is no way to determine whether a byte read from the mouse
over i8042 is the beginning or the middle of a packet. Swallow a byte
of the packet and suddenly your mouse will start flying all over the
screen because the mouse and the driver are out of synch on the data
stream.
i8042prt has some code to detect and rectify this situation but it
usually can’t kick in until the mouse has flown aroudn the screen
randomly for a while, really pissing off the customer in the process.
-p
-----Original Message-----
From: Doron Holan
Sent: Tuesday, October 29, 2002 7:44 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Detecting bus & mouse type and disable the ps/2
mouse.
Which bits are IBF / OBF ? do you mean input buffer full and output
buffer full? If so, are you referring to the kbd or the mouse when
talking about these bits? Any unsynchronized reads can easily race with
8042 … for instance, if the we are writing the typematic or LEDs to
the device at the time, you could eat the ACK from underneath i8042prt.
Also, user’s get quite ticked off when a keystroke is lost, just imagine
the frustration the user would experience when random keys don’t work
one time, esp if they are pressing C+A+D or typing their password when
they are logging in.
Why do you need to read from these ports in the first place? Do you
have an auxiliary device other then a keyboard or mouse attached to the
ps/2 ports?
D
This posting is provided “AS IS” with no warranties, and confers no
rights.
-----Original Message-----
From: Sundeep [mailto:xxxxx@nital.stpp.soft.net]
Sent: Tuesday, October 29, 2002 7:39 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Detecting bus & mouse type and disable the ps/2
mouse.
Thanks Doron.
I was tempted to access 8042 ports direcly.But, I agree that safest way
is through filter driver.
Just out of curiosity I have one question. If I read these ports, when
OBF or IBF are not set, then I think ISR for kb/mouse won’t miss the
inputs. I mean reading data will not affect IBF/OBF flags and OS will
not face any trouble. My driver will still get data as unless next data
is written, 60h will not get refreshed. It is likely that drv will miss
some kb hits, but that is ok.
Sundeep
----- Original Message -----
From: Doron Holan
To: NT Developers Interest List
Sent: Saturday, October 26, 2002 6:42 PM
Subject: [ntdev] RE: Detecting bus & mouse type and disable the ps/2
mouse.
> The ps/2 driver does not allow disabled w/out a reboot, so even if you
found the ps/2 mouse, you could not disable and reenable it (btw, there
is no way documented way to find out if the mouse on the system is ps/2
or not). If you are trying to write to the ps/2 ports (0x60 and x064),
then perhaps you should consider installing a device upper filter on the
keyboard and / or mouse ps/2 devices; see the moufilr and kbdfiltr
examples in the DDK for a starting point.
>
> D
>
> This posting is provided “AS IS” with no warranties, and confers no
rights.
>
>
> -----Original Message-----
> From: Sundeep [mailto:xxxxx@nital.stpp.soft.net]
> Sent: Friday, October 25, 2002 6:32 AM
> To: NT Developers Interest List
> Subject: [ntdev] Detecting bus & mouse type and disable the ps/2
mouse.
>
> Hi all,
>
> I am trying to develope win2k driver. I wish to detect –
> 1. if my pc has MCA or EISA bus.
> 2. if MCA system, check if ps/2 mouse is present & enabled. 3. if
> enabled, disable it,(if possible all auxillary ports) & again enable
> it,after driver completes its specified functioning.
>
> I DONOT want to control the mouse/modify its events.
> For my application, it is acceptable that till driver completes its
> specified function, no other application can have mouse inputs.
>
> Can anybody help me in this?
>
> Thanks in advance,
> Sundeep
>
> —
> You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
> To unsubscribe send a blank email to %%email.unsub%%
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@nital.stpp.soft.net
> To unsubscribe send a blank email to %%email.unsub%%
—
You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to %%email.unsub%%
—
You are currently subscribed to ntdev as: xxxxx@microsoft.com To
unsubscribe send a blank email to %%email.unsub%%