Disabling the mouse portion of i8042prt on NT4

Hi all,

I’m working on a mouse that has 2 modes: a PS2 compatible mode, and an
enhanced mode. I am writing a NT4 custom mouse driver to take avantage
of the extra capabilities of the enhanced mode. In order to do that,
somehow I need to stop the default i8042prt from finding my mouse.
Everything will be messed up once it starts talking to my mouse the PS2
way. I can’t just disable i8042prt because I still need it to function
as my keyboard port driver. I’ve looked at the i8042prt source code in
the NT4 ddk, and it seems that it will always find my mouse by its call
to IoQueryDeviceDescription, since my mouse does also support the PS2
protocol. Any idea on how to get around this problem? Is there any way
to pass some boot parameters to NTDETECT to ask it to not probe for the
mouse?

I’ve been thinking about manually deleting the PS2 pointer peripheral
key in the hardware description key with my driver, and making sure that
it loads before i8042prt. Will that work? Is that a bad idea? Will I
have sufficient permission to delete those keys?

Thanks a lot!

There is no real way to do this. The Zw function for deleting values
out of the registry are not in the NT4 DDKs so you would have to remove
the value in another fashion. Perhaps you could change the values to be
something else that would make IoQueryDeviceDescription to ignore them
though…BUT the location in the registry where
IoQueryDeviceDescription searches depends on the machine, so you cannot
hardcode that path into the registry in your driver.

There is no flag to tell NTDETECT to NOT detect the mouse either.

D

This posting is provided “AS IS” with no warranties, and confers no
rights.

-----Original Message-----
From: Faris Y. Yau [mailto:xxxxx@stg.com]
Sent: Tuesday, April 02, 2002 1:51 PM
To: NT Developers Interest List
Subject: [ntdev] Disabling the mouse portion of i8042prt on NT4

Hi all,

I’m working on a mouse that has 2 modes: a PS2 compatible mode, and an
enhanced mode. I am writing a NT4 custom mouse driver to take avantage
of the extra capabilities of the enhanced mode. In order to do that,
somehow I need to stop the default i8042prt from finding my mouse.
Everything will be messed up once it starts talking to my mouse the PS2
way. I can’t just disable i8042prt because I still need it to function
as my keyboard port driver. I’ve looked at the i8042prt source code in
the NT4 ddk, and it seems that it will always find my mouse by its call
to IoQueryDeviceDescription, since my mouse does also support the PS2
protocol. Any idea on how to get around this problem? Is there any way
to pass some boot parameters to NTDETECT to ask it to not probe for the
mouse?

I’ve been thinking about manually deleting the PS2 pointer peripheral
key in the hardware description key with my driver, and making sure that
it loads before i8042prt. Will that work? Is that a bad idea? Will I
have sufficient permission to delete those keys?

Thanks a lot!


You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to %%email.unsub%%

You can load another driver before your mouse driver is loaded.
This driver will have a callout routine sent as a parameter to
IoQueryDeviceDescription. It grabs the pointer controller and
peripheral configuration information, and then changes “PS2”
to something like “PS/2”

-----Original Message-----
From: Doron Holan [mailto:xxxxx@windows.microsoft.com]
Sent: Tuesday, April 02, 2002 3:27 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Disabling the mouse portion of i8042prt on NT4

There is no real way to do this. The Zw function for deleting values
out of the registry are not in the NT4 DDKs so you would have to remove
the value in another fashion. Perhaps you could change the values to be
something else that would make IoQueryDeviceDescription to ignore them
though…BUT the location in the registry where
IoQueryDeviceDescription searches depends on the machine, so you cannot
hardcode that path into the registry in your driver.

There is no flag to tell NTDETECT to NOT detect the mouse either.

D

This posting is provided “AS IS” with no warranties, and confers no
rights.

-----Original Message-----
From: Faris Y. Yau [mailto:xxxxx@stg.com]
Sent: Tuesday, April 02, 2002 1:51 PM
To: NT Developers Interest List
Subject: [ntdev] Disabling the mouse portion of i8042prt on NT4

Hi all,

I’m working on a mouse that has 2 modes: a PS2 compatible mode, and an
enhanced mode. I am writing a NT4 custom mouse driver to take avantage
of the extra capabilities of the enhanced mode. In order to do that,
somehow I need to stop the default i8042prt from finding my mouse.
Everything will be messed up once it starts talking to my mouse the PS2
way. I can’t just disable i8042prt because I still need it to function
as my keyboard port driver. I’ve looked at the i8042prt source code in
the NT4 ddk, and it seems that it will always find my mouse by its call
to IoQueryDeviceDescription, since my mouse does also support the PS2
protocol. Any idea on how to get around this problem? Is there any way
to pass some boot parameters to NTDETECT to ask it to not probe for the
mouse?

I’ve been thinking about manually deleting the PS2 pointer peripheral
key in the hardware description key with my driver, and making sure that
it loads before i8042prt. Will that work? Is that a bad idea? Will I
have sufficient permission to delete those keys?

Thanks a lot!


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@synaptics.com
To unsubscribe send a blank email to %%email.unsub%%

I knew there was another problem :). The keyboard and mouse cannot be
controlled by 2 different drivers b/c you will have no way of
synchronizing access between the drivers to the same ports. If you are
writing to the device while the LEDs are being written, the controller
could lock, freak out, etc. I don’t even know if the Io function to
acquire the hardware ports will allow the ports to be shared. You are
best off disabling i8042prt for NT4 and having your driver control the
keyboard as well (you can just copy that code out of the NT4 DDK).

For win2k and beyond, you can create a ps/2 mouse filter driver that can
control the mouse and still be synchronized with the keyboard.

D

This posting is provided “AS IS” with no warranties, and confers no
rights.

-----Original Message-----
From: Nupur Gupta [mailto:xxxxx@synaptics.com]
Sent: Tuesday, April 02, 2002 3:59 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Disabling the mouse portion of i8042prt on NT4

You can load another driver before your mouse driver is loaded. This
driver will have a callout routine sent as a parameter to
IoQueryDeviceDescription. It grabs the pointer controller and peripheral
configuration information, and then changes “PS2” to something like
“PS/2”

-----Original Message-----
From: Doron Holan [mailto:xxxxx@windows.microsoft.com]
Sent: Tuesday, April 02, 2002 3:27 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Disabling the mouse portion of i8042prt on NT4

There is no real way to do this. The Zw function for deleting values
out of the registry are not in the NT4 DDKs so you would have to remove
the value in another fashion. Perhaps you could change the values to be
something else that would make IoQueryDeviceDescription to ignore them
though…BUT the location in the registry where
IoQueryDeviceDescription searches depends on the machine, so you cannot
hardcode that path into the registry in your driver.

There is no flag to tell NTDETECT to NOT detect the mouse either.

D

This posting is provided “AS IS” with no warranties, and confers no
rights.

-----Original Message-----
From: Faris Y. Yau [mailto:xxxxx@stg.com]
Sent: Tuesday, April 02, 2002 1:51 PM
To: NT Developers Interest List
Subject: [ntdev] Disabling the mouse portion of i8042prt on NT4

Hi all,

I’m working on a mouse that has 2 modes: a PS2 compatible mode, and an
enhanced mode. I am writing a NT4 custom mouse driver to take avantage
of the extra capabilities of the enhanced mode. In order to do that,
somehow I need to stop the default i8042prt from finding my mouse.
Everything will be messed up once it starts talking to my mouse the PS2
way. I can’t just disable i8042prt because I still need it to function
as my keyboard port driver. I’ve looked at the i8042prt source code in
the NT4 ddk, and it seems that it will always find my mouse by its call
to IoQueryDeviceDescription, since my mouse does also support the PS2
protocol. Any idea on how to get around this problem? Is there any way
to pass some boot parameters to NTDETECT to ask it to not probe for the
mouse?

I’ve been thinking about manually deleting the PS2 pointer peripheral
key in the hardware description key with my driver, and making sure that
it loads before i8042prt. Will that work? Is that a bad idea? Will I
have sufficient permission to delete those keys?

Thanks a lot!


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@synaptics.com 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%%

Thanks guys for your advice! To make a long story short,
synchronization with the i8042 controller won’t be an issue because we
have some special HW setup and my mouse does not care what happens at
those ports once I’ve put it in its “enhanced mode”. I’ve already got
this same driver working on 2k and XP without any problem. Now I just
need to take care of NT4.

IoQueryDeviceDescription. It grabs the pointer controller and peripheral
configuration information, and then changes “PS2” to something like
“PS/2”

That sounds like a good idea, but how do I commit my changes back to the
registry so that it will affect the i8042prt driver? The callback only
gives me the data in the registry, but not the handle to the key,
right? Or does it give me the name of the key? I thought I only get
the name of the value and its data. I suppose I can always enumerate
the registry and look around, find the right key and value and change
them. But that’s a lot of work. I’m hoping there will be an easier
way. :wink:

Anyway, thanks a lot!

Doron Holan wrote:

I knew there was another problem :). The keyboard and mouse cannot be
controlled by 2 different drivers b/c you will have no way of
synchronizing access between the drivers to the same ports. If you are
writing to the device while the LEDs are being written, the controller
could lock, freak out, etc. I don’t even know if the Io function to
acquire the hardware ports will allow the ports to be shared. You are
best off disabling i8042prt for NT4 and having your driver control the
keyboard as well (you can just copy that code out of the NT4 DDK).

For win2k and beyond, you can create a ps/2 mouse filter driver that can
control the mouse and still be synchronized with the keyboard.

D

This posting is provided “AS IS” with no warranties, and confers no
rights.

-----Original Message-----
From: Nupur Gupta [mailto:xxxxx@synaptics.com]
Sent: Tuesday, April 02, 2002 3:59 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Disabling the mouse portion of i8042prt on NT4

You can load another driver before your mouse driver is loaded. This
driver will have a callout routine sent as a parameter to
IoQueryDeviceDescription. It grabs the pointer controller and peripheral
configuration information, and then changes “PS2” to something like
“PS/2”

-----Original Message-----
From: Doron Holan [mailto:xxxxx@windows.microsoft.com]
Sent: Tuesday, April 02, 2002 3:27 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Disabling the mouse portion of i8042prt on NT4

There is no real way to do this. The Zw function for deleting values
out of the registry are not in the NT4 DDKs so you would have to remove
the value in another fashion. Perhaps you could change the values to be
something else that would make IoQueryDeviceDescription to ignore them
though…BUT the location in the registry where
IoQueryDeviceDescription searches depends on the machine, so you cannot
hardcode that path into the registry in your driver.

There is no flag to tell NTDETECT to NOT detect the mouse either.

D

This posting is provided “AS IS” with no warranties, and confers no
rights.

-----Original Message-----
From: Faris Y. Yau [mailto:xxxxx@stg.com]
Sent: Tuesday, April 02, 2002 1:51 PM
To: NT Developers Interest List
Subject: [ntdev] Disabling the mouse portion of i8042prt on NT4

Hi all,

I’m working on a mouse that has 2 modes: a PS2 compatible mode, and an
enhanced mode. I am writing a NT4 custom mouse driver to take avantage
of the extra capabilities of the enhanced mode. In order to do that,
somehow I need to stop the default i8042prt from finding my mouse.
Everything will be messed up once it starts talking to my mouse the PS2
way. I can’t just disable i8042prt because I still need it to function
as my keyboard port driver. I’ve looked at the i8042prt source code in
the NT4 ddk, and it seems that it will always find my mouse by its call
to IoQueryDeviceDescription, since my mouse does also support the PS2
protocol. Any idea on how to get around this problem? Is there any way
to pass some boot parameters to NTDETECT to ask it to not probe for the
mouse?

I’ve been thinking about manually deleting the PS2 pointer peripheral
key in the hardware description key with my driver, and making sure that
it loads before i8042prt. Will that work? Is that a bad idea? Will I
have sufficient permission to delete those keys?

Thanks a lot!


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@synaptics.com 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@stg.com
To unsubscribe send a blank email to %%email.unsub%%


Faris Y. Yau
Software Technologies Group, Inc.
Voice: (708) 547-0110 x270
Fax: (708) 547-0783