Info on Serial/PS2/USB Mouse 'Polling'

From BYOAC New Wiki
Revision as of 20:03, 10 March 2007 by Silver (talk) (USB Mice + Windows Polling rate fix)
Jump to navigation Jump to search

This info is paraphrased from posts made by Derrik Renaud on BYOAC which contains useful info on the polling of mice with different interfaces. See here: http://forum.arcadecontrols.com/index.php?topic=61381.msg608294#msg608294

General Info on Mouse Polling

Polling affects the ability of the emulated control to match the real control, which would be perceived as smoothness. There are 2 different polling things in emulation to be aware of. One is the polling rate of the original game. Usually done during v-blank. And the other is the OS's polling rate.

The original game knows nothing about your OS, so it is up to MAME to get the info and feed it to the game when the game asks for it.

Ideally we want an OS sample rate that is much higher then the original game. This is so that the values can gbe smoothed out to better simulate what the original control used. If the original game used 60Hz and the OS uses 100Hz, then during 40 of the games polls it uses the combined reading of 2 OS polls of the control. For the other 20 game polls, it uses only 1 OS poll of the control.

For the same 60Hz game, lets say we now use 500Hz OS polling. So now during 20 of the game polls, the OS supplies 9 polls. For the other 40 game polls, the OS supplies 8. From that you can see that the higher the OS poll rate, the closer the OS polling will match the original games polling.

This is also the same reasoning for wanting a high resolution control. That way it can be scaled down to match the original control. A lower resolution control can not easily match all games. It will have a jerky reaction to it because it can not smoothly be scaled to match the original game.


Serial Mice

So lets say the game polls once each field for a polling rate of 60 times a second. Now lets say you are using a serial mouse with a polling rate of 40Hz. That means in every second of polling, 20 samples are missed because the serial mouse can't keep up. The moral here is... Throw Your Serial Mice Away!


PS/2 mice

PS/2 mice are the bare minimum you should use. You should also set the PS/2 sampling to 200Hz in the XP control panel, or by using a utility program such as: http://www.majorgeeks.com/PS2Rate_Plus_d300.html

Even if you do not use a PS/2 mouse, you NEED this program because it will tell you the polling rate of your mouse.

Now the first thing you find on XP, is that your PS/2 200Hz polling rate, is limited by XP to 125Hz. (I've said this many times, but here goes again. Windows input handling blows!) So you need to also do the USB fix below.


USB Mice + Windows Polling rate fix

USB mice are the best if you have XP, even though windows limits the polling rate to 125Hz. That is because you can use this nifty utility to up that rate:

http://www.majorgeeks.com/USB_Mouserate_Switcher_d4469.html

Set a rate of 250 or 500. USB set to 1000 is overkill.

Note that without using this utility, then PS2 beats USB. 125 is too low.

You can also need the "PS/2" utility above to confirm the polling rate. Even though it is called PS2 rate, it reads USB rates too. http://www.majorgeeks.com/PS2Rate_Plus_d300.html