Page 1 of 1

USB drivers fixing seemingly unrelated issue with gamepad?

PostPosted: Wed Apr 07, 2021 3:29 pm
by netham45
I bought an ES1868-based sound card and the game port on it had issues with the analog input bouncing between 0 and the mid point for both the X and Y axis. These issues are cleared up when I have your USB keyboard and mouse drivers installed, which both work great. I haven't actually tried the USB joystick drivers yet.

I've tested it both ways a number of times now, when I don't have your driver loaded the game port jitters and when I have your driver loaded it works exactly as it should. I'm rather curious what your driver might be doing to resolve the game port issue as I'm not sure what's causing it to begin with nor do I see how a USB driver would affect just an ISA sound card's game port. Before your driver loads I use BIOS legacy USB support which only provides keyboard emulation on my PC, no mouse.

Re: USB drivers fixing seemingly unrelated issue with gamepad?

PostPosted: Thu Apr 08, 2021 8:24 am
by Bret
Wow -- that's a new one one me. My keyboard and mouse drivers fix an analog joystick problem. The two shouldn't be related at all, as far as I can tell just from a high-level view without going into a lot of detailed experimentation.

If I had to guess, I suspect it might be related to timing. When the USB drivers are running in the background, your computer runs a little more slowly than it does without them. Game ports on newer (faster) computers are notorious for being somewhat flaky and maybe your computer is a little too fast without the USB drivers installed. Just a guess.

One experiment you could try to see if it is somehow related to speed would be to experiment with my SLOWDOWN program, which simply slows things down with actually doing anything useful like the USB drivers do.

Re: USB drivers fixing seemingly unrelated issue with gamepad?

PostPosted: Wed Jul 12, 2023 8:59 am
by netham45
I did some more investigation into this after seeing https://www.youtube.com/watch?v=duGC4MCktV0 where he found the built-in USB HID support of some BIOSes causes speed issues and found that it was also the cause of my gameport flickering. If I disable USB HID support in my BIOS the gameport flicker is gone.

So my guess now is there's something wrong with my BIOS's built-in USB keyboard handing routine and using your driver is replacing the routine with one that doesn't have that issue.

Re: USB drivers fixing seemingly unrelated issue with gamepad?

PostPosted: Sun Jul 30, 2023 9:43 am
by Bret
There are two different things discussed in that particular thread, the idea of polling and the idea of System Management Mode. I don't think the idea of polling is relevant since USB doesn't poll, at least not in the same sense that I think they are referring to.

It's probably more related to System Management Mode, which is how USB controllers are able to virtualize keboards, mice, and disks in Legacy Mode. System Management Mode is very complex and slow, and also has a higher priority than almost everything else on the computer. That is, once the compguter enters SMM it can't be interrupted the way a "normal" process can and the computer stops doing anything else until SMM has exited. SMM is the only way a computer can virtualize legacy devices before the Operating System loads, such as for the BIOS or for an OS like DOS that expects the BIOS to handle things like keyboards and disks. Once a "real" USB driver is installed for the OS, the computer no longer needs to enter SMM and the USB hardware is prioritized and handled similar to how it is done on a older computer.