My mouse is A4tech X-750F model. When connected through USB it always sends 3 bytes after any mouse event and there is no way (AFAIK) to switch to other protocol using 'magic sequences' (like f3,c8,f3,64,f3,50 for Intellimouse). It also sends data after scrolling a wheel and pressing additional keys but the bytes sent are meaningless (always 08,00,00). After connecting through 'ordinary' mouse port it answers to the above sequence (ID=03)-sends 4 bytes in each packet so for example scrolling can be detected. It also uses some 'special protocol' (seq.: f3,c8,f3,64,f3,50,f3,3c,f3,28,f3,14, found here: http://linux.schottelius.org/gpm/browse ... int-0.01.c or http://rapidshare.com/files/80800633/gm ... .01.c.html)-sends 4 bytes per packet but they are completely different from ps2 or intellimouse standards...
1. I haven't tried 'usb things' yet but is it always the case that the mouse connected to usb port sends data to port 0x60 like an ordinary mouse? And why it doesn't respond to initialization sequences?
2. Is there a way to detect whether a mouse (responding through 0x60) is connected to usb or mouse port?
3. What are other so called 'magic sequences' for different models and where to get info about them?
Mouse recognition & protocol used
Re: Mouse recognition & protocol used
It's not the mouse itself that 'sends data to a port', as the mouse is connected through the USB controller. It's the BIOS (through SMM) that emulates a PS/2 mouse (and keyboard). See e.g. this page and search for SMM. It presumably doesn't respond to initialization sequences because it is emulated one-way.arkady wrote:1. I haven't tried 'usb things' yet but is it always the case that the mouse connected to usb port sends data to port 0x60 like an ordinary mouse? And why it doesn't respond to initialization sequences?
Not directly. The BIOS emulates a PS/2 mouse, so I would think it's rather BIOS and main board vendor specific what is emulated and what isn't.2. Is there a way to detect whether a mouse (responding through 0x60) is connected to usb or mouse port?
Check the WIKI! See here. Some additional information (also linked from the Wiki) can be found here.3. What are other so called 'magic sequences' for different models and where to get info about them?
JAL
Mouse recognition & protocol used
Jal, you also said that 'BIOS emulates a PS/2 mouse'. But what if I'm in protected mode and a mouse is connected to usb? BIOS doesn't have a chance to emulate a ps2 mouse in this situation (I mean: no bios routines are called in PMode). Unless the BIOS did something while POST (or when DOS was loading-I'm running my VERY simple 'os' from DOS) and after that it's all taken care of by the hardware. Am I right??jal wrote: It's the BIOS (through SMM) that emulates a PS/2 mouse (and keyboard)...
BTW, thx for your answer!
As far as I know the emulation dissapears when you enable USB, so the setting probably puts the usb controller in some mode that allows it to translate keyboard and mouse data into ps/2 data.
The cake is a lie | rackbits.com
Re: Mouse recognition & protocol used
It is called SMM (System Management Mode). google and the intel manuals will tell you the details.arkady wrote:jal wrote:I mean: no bios routines are called in PMode
Re: Mouse recognition & protocol used
Actually, as Brendan pointed out to me, the system can enter SMM at any time, without the OS even knowing about it. When in SMM mode, BIOS is active. And that is how a USB mouse emulates a PS2 mouse -- any USB mouse input flips the CPU into SMM mode, then passes the mouse input through the BIOS.arkady wrote: Jal, you also said that 'BIOS emulates a PS/2 mouse'. But what if I'm in protected mode and a mouse is connected to usb? BIOS doesn't have a chance to emulate a ps2 mouse in this situation (I mean: no bios routines are called in PMode).
(oops, bluecode posted while I was typing.
Wikipedia also has a page on it. Basically, it's completely transparent to the OS, you cannot disable it or circumvent it directly. However, as the link to the M$ page I provided shows, you can disable it for USB, as it is a feature of the USB controller (which makes sense, as the USB controller must issue an SMI for SMM to kick in).arkady wrote:I'll take a closer look to that SMM... when I'm ready :D Looks like an interesting subject. Meanwhile, thank you all guys! You were very helpful!
JAL

