USB drivers fixing seemingly unrelated issue with gamepad?

The intent of this forum is to discuss my DOS TSR programs (available at http://bretjohnson.us), how they work and don't work, new/missing features, status of updates, and anything else related to them that may need to be discussed.

USB drivers fixing seemingly unrelated issue with gamepad?

Postby netham45 » Wed Apr 07, 2021 3:29 pm

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.
netham45
 
Posts: 2
Joined: Wed Apr 07, 2021 3:20 pm

Re: USB drivers fixing seemingly unrelated issue with gamepad?

Postby Bret » Thu Apr 08, 2021 8:24 am

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.
Bret
 
Posts: 478
Joined: Fri Oct 10, 2008 3:43 am
Location: Rio Rancho, NM

Re: USB drivers fixing seemingly unrelated issue with gamepad?

Postby netham45 » Wed Jul 12, 2023 8:59 am

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.
netham45
 
Posts: 2
Joined: Wed Apr 07, 2021 3:20 pm

Re: USB drivers fixing seemingly unrelated issue with gamepad?

Postby Bret » Sun Jul 30, 2023 9:43 am

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.
Bret
 
Posts: 478
Joined: Fri Oct 10, 2008 3:43 am
Location: Rio Rancho, NM


Return to Programs

Who is online

Users browsing this forum: No registered users and 3 guests

cron