First post, by Kazoo
I've seen a lot of complaints about a large deadzone when playing some games, such as Privateer and Wing Commander. Those complaints tend to be worse when using some of the Saitek (e.g. x52) sticks and better when they're using a Sidewinder Force Feedback. That is, the actual joystick seems to affect it.
After a lot of playing around, I've discovered a number of things. In no particular order:
- Doubling the OHMS value in the Joystick code eliminates the deadzone and seems to make Wing Commander quite playable on my machine. I suspect it has to do with the relative speed of how fast my system is vs. what I force DosBox to run at. I think, perhaps, providing a sensitivity setting on the joystick will allow people to tweak it. Or, perhaps, there is a simulated I/O delay for reading port 201 which isn't present in real life which makes reading the joystick loop take fewer iterations.
- The SideWinder FF 2 joystick appears to be slightly non-linear in terms of delta change based on stick movement. I seem to have a higher rate of change near the center and a lower rate near the edges. This would tend to provide a higher change for a smaller movement, providing a smaller deadzone and better responsiveness. The Saitec x52 appears to be much more linear.
- The method for emulating port 201 seems to be inverted from the official game port specification. That is, normally you write to the port, which sends all the axis bits to 0, then you poll it and time until they come back to a 1. However, the code DB uses inverts that. It sets the bit to 1 and changes it to 0 when the timer expires. Frankly, I don't know how WC work with it that way, but it does. Maybe some ports are one way and some another?
- When I 'fixed' the above, my axis were suddenly inverted! I don't understand why that would be, and it make me doubt the fix. Again, it seems to work regardless so this is more for information and consideration.
So... in summary, I think adding a sensitivity option to the joystick would help solve this a lot. I'll work on that tomorrow.