We already have 1ms USB game controller polling in MiSTer and it is great.
But why not speed up keyboard and mouse USB polling as well, to reduce mouse and keyboard input lag? I think this is useful for computer cores like ao486 and minimig, for example, for fast action or skill games.
I propose to add usbhid.mousepoll=1 and usbhid.kbpoll=1 in linux/uboot.txt:
v=loglevel=4 usbhid.jspoll=1 usbhid.mousepoll=1 usbhid.kbpoll=1 xpad.cpoll=1
I am testing this with minimig and ao486 and see no problems so far. I don't have scientific means of testing mouse and keyboard input lag. I feel like it is better, but it could be placebo.
Faster USB keyboard and mouse polling
Re: Faster USB keyboard and mouse polling
Well, this is another case where trying to improve on the original design of the hardware could potentially be counterproductive. For example, without additional code, increasing the polling interval on the keyboard would likely result in additional keystrokes being pressed -- i.e. Trying to type:
Could inadvertently turn into:
Can it be worked around? Probably. Would it potentially cause other issues that would turn into posts like "Why does game X do crazy thing Y?" More than likely.
Don't get me wrong, I'm all for efforts to improve things where they need improving, but not at the expense of introducing quirky behavior that becomes cumbersome to troubleshoot and removes things too far from the original.
Code: Select all
cd C:\DOS
Code: Select all
cccddd CCCC:::\\\DDDOOOSSS
Don't get me wrong, I'm all for efforts to improve things where they need improving, but not at the expense of introducing quirky behavior that becomes cumbersome to troubleshoot and removes things too far from the original.
Re: Faster USB keyboard and mouse polling
Ha, that's what it looks like when I accidentally enable the repeat rate on my Ducky keyboard.lupin3rd wrote: ↑Fri Jul 31, 2020 6:58 pm (snip)
Could inadvertently turn into:Code: Select all
cd C:\DOS
Code: Select all
cccddd CCCC:::\\\DDDOOOSSS
Re: Faster USB keyboard and mouse polling
That problem you mention with repeated keys doesn't happen at all. That's not how keyboard polling works AFAIK. Why don't you try it first, instead of guessing? It is just a simple quick edit of uboot.txt.
I have been using my suggested uboot.txt for several days now, no problems encountered so far.
Maybe some linux coder or someone who is actually knowledgable with this linux polling stuff could respond and explain whether it is a good or bad idea?
Alternatively, someone with means to reliably test keyboard and mouse input lag could respond and inform us whether my suggestion actually reduces input lag for keyboard and mouse?
I have been using my suggested uboot.txt for several days now, no problems encountered so far.
Maybe some linux coder or someone who is actually knowledgable with this linux polling stuff could respond and explain whether it is a good or bad idea?
Alternatively, someone with means to reliably test keyboard and mouse input lag could respond and inform us whether my suggestion actually reduces input lag for keyboard and mouse?
Github: github.com/rsn8887
- LamerDeluxe
- Top Contributor
- Posts: 1239
- Joined: Sun May 24, 2020 10:25 pm
- Has thanked: 887 times
- Been thanked: 284 times
Re: Faster USB keyboard and mouse polling
I think this is a good idea. It is very common to have a high polling rate with mouse input on Windows, for instance. And mouse input on the Amiga is very direct with minimum lag.