• Please review our updated Terms and Rules here

Game port joystick range of motion/sensitivity.

flynth

Member
Joined
Nov 20, 2022
Messages
28
I've got this old Genius Flight 2000 f-16 game port joystick which I'm trying to use on my windows 98 machine (a slot1 P3 machine with an opti sound card in an isa slot connected joystick) and it seems the joystick appears a bit "twitchy". What I meant an by this is that after calibration the pointer shown trembles/moves on its own. In a dos test tool that shows joystick output with high precision and frequency I see the same, but in another tool that has less precise numbers it looks fine.

I found a program called dxtweak so I can set dead zones etc so it is kind off playable, but only if I set dead zones to 15%+. Being used to modern controllers this seems quite bad.

Also I opened it up and I looked inside. It had 100k potentiometers that only move a little bit. Perhaps that's why and it never was really good? Or is it likely pots are deteriorated and need changing? Externally it looks almost new.

Could someone say if this is normal for this equipment, or if not is it a common fault?
 
The PC joystick interface just isn't all that great to begin with... basically just a set of 555 timer IC's (556 dual timer IC) in a one-shot configuration, and the xy potentiometers control the duration of the output pulse. The software on the PC determines the position of the stick by counting the length of the pulses. Cheap.

With that being said, I'd say you're on the right track by cleaning/changing the pots, because the wipers do get dirty and that will be detrimental to the operation. Would be the first thing I'd look at, after it was determined that the issue is isolated down to a particular joystick.

It could be a number of things:
- The condition of the pots
Clean/replace

- The signal path
Check cable condition, contact condition

- The software
Many different joystick software routines out there, results will vary.
Does it happen in pure DOS as well as in Windows 98? A Windows driver or DOS TSR could be interfering with the software while it is trying to read the joystick port. Try using the joystick in the two different environments.

- Another joystick interface in the system trying to share the same port resource.
If there's another ISA/PCI card in the system that also has a joystick port (or joystick headers on the card), look for a jumper to disable it.

Then we can go off into the weeds if none of that seems to point to why your joystick is a bit twitchy.
 
The PC joystick interface just isn't all that great to begin with... basically just a set of 555 timer IC's (556 dual timer IC) in a one-shot configuration, and the xy potentiometers control the duration of the output pulse. The software on the PC determines the position of the stick by counting the length of the pulses. Cheap.

With that being said, I'd say you're on the right track by cleaning/changing the pots, because the wipers do get dirty and that will be detrimental to the operation. Would be the first thing I'd look at, after it was determined that the issue is isolated down to a particular joystick.

It could be a number of things:
- The condition of the pots
Clean/replace

- The signal path
Check cable condition, contact condition

- The software
Many different joystick software routines out there, results will vary.
Does it happen in pure DOS as well as in Windows 98? A Windows driver or DOS TSR could be interfering with the software while it is trying to read the joystick port. Try using the joystick in the two different environments.

- Another joystick interface in the system trying to share the same port resource.
If there's another ISA/PCI card in the system that also has a joystick port (or joystick headers on the card), look for a jumper to disable it.

Then we can go off into the weeds if none of that seems to point to why your joystick is a bit twitchy.

Thanks for this. Unfortunately I have only one pc joystick, so this makes troubleshooting somewhat difficult, but I can try it on a different PC.

The windows 98 pc (one I got the joystick for) has only one game port. The other IO is motherboard integrated so there is no separate IO card.

I've booted the PC in DOS mode (by using F8 at win98 startup and choosing command line only) and two DOS joystick testing programs had the following results:
Joystickchk - it shows joystick output graphically, is very sensitive, updates very fast - same as Windows, very jittery on all axes even when nothing touches it.
Joysticktst - this shows numbers seem to update a lot less - it appeared almost rock solid, but as previously joystick's range was shown graphically with high resolution here the entire range first between numbers 3-16 (like a built in average/dead zone).

It is similar to what I see in Windows with dxtweak tool. It shows raw values that seem to be dancing around and direct x input that has some smoothing applied to it.

Yesterday i tried another game after setting a dead zone of 12% and Motoracer 1 was actually playable fine. So at least some games can cope with it. An example of one game that was barely playable was Carmageddon 1.

Regarding other specific items you listed:
- cable/connection continuity
I haven't checked it with a multimeter, but I deoxed the port and plug. Also I looked for any changes in a test program while manipulating the cable in the usual places where it breaks. I saw no difference. So I doubt it is this, but I'll check it with a multimeter too when I have a chance just in case.

-The condition of pots
Externally they look good as well as the joystick. It looks like it might have been used once by the previous owner and it spent the rest of the time in storage. It is possible pot wipers deteriorated. It is a big surprising they all behave pretty much the same. Dancing when stationary. Previously when I dealt with defunct pots (usually as volume knobs) they would crackle and change when touched. When testing the cable I'll test the resistance too. They look like standard 6mm shaft pots, but the body is smaller diameter than ones I have, so I'll have to order them if it turns out it is them.

-The software - I guess we'll know for sure once I plug it into another pc (this is a much older 386 pc with both a sound card and an io card game port). On the other Windows 98 machine I have a fairly fast cpu. The motherboard supposedly supports only cpus up to p2 533mhz or so, but I'm using a modified slotket and a P3 933mhz running at 700mhz. Perhaps those pulses it is supposed to measure the length of don't have a chance to complete every time it polls? Well know once it is tested on a 386.

Also, I found it surprising that they used 100k pots and maybe 15% of their range when the entire measurable range I read is 100k. It woukd be much better to get for example 600k pots (and still use only the beginning). When replacing I might try both.
 
It is not normal to have the stick axes twitch around constantly if the stick is not being pushed. That sounds like dirty pots to me; couldn't hurt to blast some deoxit in there. However, sometimes the contacts just wear out.

I wrote a joystick calibration utility for DOS that uses the 8253 PIT for timing, so it is not affected by system speed; you can grab it here: http://www.oldskool.org/pc/joycalib
You may want to give it a try to see if the stick is truly damaged, or if other factors (windows, etc.) were at play.
 
It is not normal to have the stick axes twitch around constantly if the stick is not being pushed. That sounds like dirty pots to me; couldn't hurt to blast some deoxit in there. However, sometimes the contacts just wear out.

I wrote a joystick calibration utility for DOS that uses the 8253 PIT for timing, so it is not affected by system speed; you can grab it here: http://www.oldskool.org/pc/joycalib
You may want to give it a try to see if the stick is truly damaged, or if other factors (windows, etc.) were at play.
Great, thank you for publishing it. I'll give it a try.
 
Perhaps those pulses it is supposed to measure the length of don't have a chance to complete every time it polls?
Let me preface this with noting that I am only of average intelligence... and also fairly new to writing the asm code for handling joysticks. Someone might come through here and mop the floor with my face, and that's fine...

In my experience when doing the asm code, using a Kraft KC3 in fairly decent condition, it twitched very little. This is on a Tandy 1000 TL w/ 8mhz 286.
The way it works is we start by outputting a byte to the joyport 201h, to start the pulse. We then keep reading the port in a loop, keeping count of how many loop iterations the pulse is high. In the end, the pulses finally reach 0, and now we have a 2 values of 0-255 that correspond to the joystick x and y positions.

Raw values I read without touching the stick only moved only maybe +/- 1 or 2 digits, pretty darn stable. But this is just an assembly test program running in pure DOS that does nothing else but read the stick...

I've never tried using the standard PC joystick interface on a screamin' fast P3 at 700mhz, so this is just a guess. Seems like your machine is just too fast to get an accurate reading on an old PC joystick interface. I did find an article out there that seems to agree with my hunch:
NerdlyPleasures - Joystick Problems with DOS....
Thus routines would take 20% of the CPU's time an 8088 may only take 10% or less of the CPU's time on the more efficient 286. When CPU speeds began increasing to 6MHz, 8MHz and beyond, routines that were designed for the IBM PC would complete themselves far too quickly to get an accurate read of the joystick.

Perhaps this really is just a case of the machine being too fast. The fastest one I have here is a Pentium Pro 180 MHz.
So I just tried my little joystick test program on this machine. It is noticeably "twitchier," the value being displayed is +/- 5-10 instead of +/- 1-2 on my Tandy 1000 TL.

I wouldn't try to replace the 100k pots with 600k, that'll really mess up the time constant of the capacitor charge/discharge and I doubt it would work with any software. But then again I'm kinda stupid, so...

Also, I found it surprising that they used 100k pots and maybe 15% of their range when the entire measurable range I read is 100k.

Curious. Does that mean you're reading 0-100K ohms resistance over the whole pot with an ohmmeter, but the PC only "sees" 15% of that range?
 
In my experience when doing the asm code, using a Kraft KC3 in fairly decent condition, it twitched very little. This is on a Tandy 1000 TL w/ 8mhz 286.

You might have forgotten to disable interrupts with CLI/STI when originally writing the code.

Seems like your machine is just too fast to get an accurate reading on an old PC joystick interface. I did find an article out there that seems to agree with my hunch:
NerdlyPleasures - Joystick Problems with DOS....

The problems were usually with speed-based routines to read the stick, not time-based ones. The utility I posted earlier defaults to using time-based, so it is consistent across all speeds.
 
Thanks for the info.

You might have forgotten to disable interrupts with CLI/STI when originally writing the code.

You're right. I'll go back to that little project and give that a shot.
What I did was hijack the int 1C timer interrupt, to set a flag to read the joystick on the main loop. I'm used to programming microcontrollers, so that was one of the first things I tried to figure out, was the timer.

One day maybe I'll finally get to the goal I had my heart set on, which is at the very least move a sprite around with the joystick, smoothly animated, in Tandy 1000 video mode E. Tell you what, it's going to be a loooong time before I get there...

Just want to say, I definitely appreciate everything you've done out there for the old computer community, really.
 
I didn't have a chance to do much with the joystick yet, but I'll reply to the below based on previous findings.

Let me preface this with noting that I am only of average intelligence... and also fairly new to writing the asm code for handling joysticks. Someone might come through here and mop the floor with my face, and that's fine...

In my experience when doing the asm code, using a Kraft KC3 in fairly decent condition, it twitched very little. This is on a Tandy 1000 TL w/ 8mhz 286.
The way it works is we start by outputting a byte to the joyport 201h, to start the pulse. We then keep reading the port in a loop, keeping count of how many loop iterations the pulse is high. In the end, the pulses finally reach 0, and now we have a 2 values of 0-255 that correspond to the joystick x and y positions.

Raw values I read without touching the stick only moved only maybe +/- 1 or 2 digits, pretty darn stable. But this is just an assembly test program running in pure DOS that does nothing else but read the stick...

I've never tried using the standard PC joystick interface on a screamin' fast P3 at 700mhz, so this is just a guess. Seems like your machine is just too fast to get an accurate reading on an old PC joystick interface. I did find an article out there that seems to agree with my hunch:
NerdlyPleasures - Joystick Problems with DOS....
This is very interesting. To quantify "moving on its own" is usually about 5% of the visible range raising to 10% occasionally. That's why once I set 12% dead zone I could play motoracer.

As we're only using around 15~20% of the pots then 5~10% of that is 0.7%~2%of the whole measurement range. If this is measured by 8 bits that means it fluctuates by 2 up to 5 numbers when not touched. That seems over double of what you describe. So it does seem excessive at least on this pc.

Perhaps this really is just a case of the machine being too fast. The fastest one I have here is a Pentium Pro 180 MHz.
So I just tried my little joystick test program on this machine. It is noticeably "twitchier," the value being displayed is +/- 5-10 instead of +/- 1-2 on my Tandy 1000 TL.

I wouldn't try to replace the 100k pots with 600k, that'll really mess up the time constant of the capacitor charge/discharge and I doubt it would work with any software. But then again I'm kinda stupid, so...



Curious. Does that mean you're reading 0-100K ohms resistance over the whole pot with an ohmmeter, but the PC only "sees" 15% of that range?
I haven't measured the entire range of motion of the pots with an ohmmeter, but 100k is what is written on them and they are normal pots that have an almost one entire turn of range of motion while the joystick really only moves them the first 15%~20%. So it appears only the beginnings of pots is used.

Once i do proper measurements(and testing on 386) and it turns out it is pots fault I'll try replacing them with the same, but if I'm ordering pots I can get few bigger ones too (470k perhaps as 20% of it is 94k). Then I would try both. The idea being that if a pc can measure up to 100k it will be much more precise when used over its entire range than have to "amplify" 15k or so. Or it might have nothing to do with the hardware and the cpu is just too fast for it...
 
Back
Top