Race Sim Central
Rec.Autos.Simulators Archive

"Poll with interrupts enabled" - what is it?

2 posts by 2 people · 13 Apr 1999 - 13 Apr 1999

I've had to uncheck this to get my controllers working with my PCI128. Can anyone explain what it's about and whether I'm going to suffer by not having it checked? I can't say I've noticed a difference so far, but it'll be bad news if there is software out there that requires it to be checked. Cheers Mark Reading, UK
Cutting to the chase... I believe that this setting will only have an effect on the computer while you're running a program that is using DirectInput to read the joystick. So you don't need to worry about it messing up Quicken or Excel or whatever. While running games, having this box unchecked can cause a couple of anomalies... (1) It's possible that your system clock may run a little slowly while running the game. (2) If the game uses any devices that require frequent and/or timely attention by the CPU (the serial ports are most notorious for this), these devices may not operate very well while the box is unchecked. So if you find you're now having more disconnects, or jumpy on-line game performance, you may need to adjust your serial port settings. Now, some background... The computer reads a standard PC gameport joystick by timing how long it takes to charge a capacitor on each axis. When you move the joystick, you alter the resistance on the axis, and thus how long it takes for the capacitor to charge to a certain level. A compliant joystick will use variable resistors (potentiometers - a.k.a. "pots") that yield a maximum charge time of about one millisecond. This may seem to be almost instantaneous, but on a 400MHz machine, it's an eternity! To read the joystick, the CPU will tell the gameport "Discharge your capacitors now, and start recharging them." The CPU will then sit in a loop that tests each capacitor, noting when each one has recharged. The "when" here may be "how many times have I tested the capacitors so far?", or "How many clock cycles have passed since I told the capacitors to discharge?", or some such. While the CPU is sitting in its loop waiting for the capacitors to recharge, some other device in the computer may generate an interrupt. For example, the serial port might say "Hey! You need to feed me more characters to transmit!", or "Hey! I've received a bunch of characters, and my buffer is getting full! You better read them out of my buffer soon, or I'm not going to have anyplace to put new characters as I receive them!", etc. If this happens, and if the joystick reader hasn't turned off interrupts, the computer will go off and service the interrupt. So, the joystick reader won't necessarily have an accurate idea of when each capacitor has recharged, giving you "jumpy" joystick reads. They will be particularly jumpy if the reader is using the "how many times have I tested the capacitors so far?" method of timing. In this case, its timing will be thrown off if the interrupt came in any time after it discharged the capacitors. If it's using the "How many machine cycles have passed..." method, then it will only be thrown off if the interrupt comes in just as a capacitor is about to become recharged. Either way, by disallowing interrupts while reading the joystick, you give the joystick reader a better chance of coming up with an accurate read. Randy

Sponsors

Affiliate Links

Sim Gaming Expo MOZA Racing Sim-Lab Fanatec TrakRacer Asetek Internet Privacy From NordVPN Dreamhost Capital One Credit Card Application Fanatical CDKeys Amazon Amazon UK Project Motor Racing iRacing Get your racing gloves, boots and more from Demon Tweeks. Enlist at Roberts Space Industries, developers of Star Citizen and Squadron 42


Back from the ashes since July, 2019. First created in 2001 with the merger of Legends Central (founded 1999) and simracing.dk.

A site by a sort of sim racer, for sim racers, about racing sims. News and information on both modern and historic sim racing software titles.

All products and licenses property of their respective owners.


Facebook Threads Bluesky Twitter Mastodon Instagram YouTube Tiktok Twitch Reddit Google News Apple News Subscribe via WordPress Flipboard eBay

Race Sim Central © 1999-2026 | Some links pay RSC a commission. Advertising does not equal endorsement.Cookie Policy