PS2 mouse issues

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

PS2 mouse issues

Post by Pype.Clicker »

Hi all...

i can remember of people on this forum talking about a "buggy" mouse that was getting out of synch after a few times ... it happen to occur to me while integrating SANiK&Whyme's mouse driver in clicker video server 0.1 ... on bochs and real hardware, everything was fine, but on qemu, it occured to have buttons info read as byte 1 instead of byte 0.

The trick i found to fix this is to use the fact that byte 0 is supposed to have bit 3 always set. So when i receive a byte that is supposed to be #0 with bit 3 cleared, i simply discard it and assume byte 0 will come next. As long as you're on synch, this is completely transparent, and when the mouse comes out of synch, only a few events are sufficient to restore synchronization (especially fast with steady clicks)
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:PS2 mouse issues

Post by Pype.Clicker »

oh, btw. on real hardware (fairy's computer), middle button seems to do nothing. i thought it was a regular wheelmouse (thus clicking the wheel should appear as clicking the middle button) but it's like i was singing John Lennon in front of the screen.

anyone had similar stuff ?
mystran

Re:PS2 mouse issues

Post by mystran »

does the wheel work?
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:PS2 mouse issues

Post by Pype.Clicker »

on windows, yes (no penguins avl. on FairyStation).

we have no wheel mouse code support so far (not to my knowledge, at least) so i cannot tell in Clicker ... Indeed, it may be a 2 buttons mouse that becomes 5 buttons once wheel is enabled ...
AR

Re:PS2 mouse issues

Post by AR »

Wheel mice need to be set to operate in Microsoft Intellimouse mode for the wheel and additional buttons to work, if you don't switch it to Intellimouse mode it operates in "legacy" mode where there are only 2 buttons. (You'll need to look it up though, I'm reasonably sure this is correct but I haven't got up to needing a mouse driver yet)
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:PS2 mouse issues

Post by Pype.Clicker »

glad to learn it. My other wheelmice (both logitech and another from an unknown brand) are 3-buttons legacy mice.
Post Reply