VOGONS

Common searches


First post, by Guest

User metadata

I just recently discovered DOSBox and it has help me rekindle the love of my old Origin game Privateer!

To fully enjoy this game I have to dig out an >old 15-pin< joystick and connect it to my sound card.

Of course most game peripherals these days have gone >USB<!

I'm wondering how hard it would be to write a virtual USB game port driver to work with DOSBOX that would fool an old gameport based game to using a newer USB based joystick?

All gameport calls would be redirected to receiving and translating data from the USB based stick...

This would allow me to enjoy my new Saitek X52 with my favorite game - Privateer!

Reply 1 of 9, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

You can find gameport to USB connectors. I remember using one for my ol' Sidewinder gamepad. I can't find it right now so I can't do a search but here's a very crude adapter that is similar: http://www.pccables.com/70609.htm

How To Ask Questions The Smart Way
Make your games work offline

Reply 2 of 9, by Guest

User metadata

Hi, yes I've seen these but what I'm asking for, (I think) is the opposite - I want the >usb joystick< to act as or plug into the 15-pin game port.

This device if I understand it correctly converts a >15-pin joystick to a USB< device - I don't need that...

I want my USB joystick to be recognized as a 15-pin joystick when I play my old Privateer game.

I'm not sure how calibration would be supported or if it would even be necessary.

This is why I'm thinking that a virtual driver of some kind would be necessary.

I know the electronics behind game ports are very rudimentary - the majority of the time there's a lot of "bit-banging" and "fake" A to D conversions going on instead of a dedicated IC to read the analog values.

Somehow, the usb data would have to be inserted into the buffer where the analog data is usually read and the single bit switches would have to be emulated as well.

If I could run my game in DOSBox and it see my USB joystick as (as windows would virtualize the joystick hardware whether 15-pin or usb) then I'd be good to go...

Maybe this explains better what I'm trying to do?...

Thanks!

Reply 3 of 9, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

Can't DOSBox do this already (at least the Windows version)? I think that any joystick supported by Windows - USB or gameport - should work for DOS games running inside of DOSBox. You might have to play with config/mapping files to get it to behave the way you expect though.

Reply 4 of 9, by mirekluza

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

DOSBOX does not care whether it is a USB or a gameport joystick as long as Windows know it.
However there is a catch here: using non-USB joystick takes a lot of DOSBOX performance, so it is not recommended. The reason is the way in which the state of a gameport joystick is read in Windows (I do not know details...). I have no idea whether this is fixable or not.

Mirek

Reply 5 of 9, by jal

User metadata
Rank Oldbie
Rank
Oldbie
mirekluza wrote:

DOSBOX does not care whether it is a USB or a gameport joystick as long as Windows know it.
However there is a catch here: using non-USB joystick takes a lot of DOSBOX performance, so it is not recommended. The reason is the way in which the state of a gameport joystick is read in Windows (I do not know details...). I have no idea whether this is fixable or not.

It isn't. The problem with non-USB joysticks on PCs is that they are analogue, and use some kind of capacitator to indicate the position of the stick. Reading X/Y values is done by writing to the joystick port, and then start polling the joystick port until a specific bit in the read byte changes. The time it took to change is a measure of the X/Y-value (X and Y have different bits in the register). The big problem with this scheme is of course the polling (not to mention timer resolution). Polling is a Bad Thing (TM). It cannot be fixed, it is inherent of the way stuff works (ok, it could be fixed, but only in hardware, not in software). I never understood why there weren't any COM or LPT port joysticks (LPT with passthrough), that would have been so much easier.

JAL

Reply 6 of 9, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

I always thought that analog gameport joysticks used variable resistors and thus would report analog axes positions by varying the voltage returned to the gameport. In fact, I remember that my brother and I once built a steering wheel for racing games out of a potentiometer and a frisbee when we were kids (yes, it worked surprisingly enough!).

I think the reason things were designed that way was because it made the hardware in the joysticks themselves extremely simple (a couple of variable resistors for the stick and a couple of button switches for the buttons). If they were to have used the COM or LPT ports, it would have been necessary to digitize (and possibly even serialize) the analog data inside of the joystick. What's silly is that when "digital" joysticks and gamepads came along, they used voltage stepping on the gameports instead of using the COM or especially LPT ports so that the data wouldn't have had to be converted to analog and back. Now with everything using USB it doesn't really matter anymore.

Reply 7 of 9, by zorach

User metadata
Rank Newbie
Rank
Newbie
HunterZ wrote:

I always thought that analog gameport joysticks used variable resistors and thus would report analog axes positions by varying the voltage returned to the gameport.

They vary the time it takes for a capacitor to discharge through the resistor. Program charges capacitor, keeps polling until it's discharged. Higher resistance, longer time to discharge.

I think the reason things were designed that way was because it made the hardware in the joysticks themselves extremely simple

It also made the gameport hardware itself very cheap.

What's silly is that when "digital" joysticks and gamepads came along, they used voltage stepping on the gameports instead of using the COM or especially LPT ports so that the data wouldn't have had to be converted to analog and back.

Digital joysticks usually signal via the button lines; there's no conversion to analog. Some controllers (e.g. SpaceOrb) did use the serial port; I imagine this wasn't widespread because people were used to plugging game controllers into the gameport and because often both serial ports would be used up (mouse plus modem).

Reply 8 of 9, by Guest

User metadata

Thanks guys! I guess I should have tried it before asking...

I just enjoyed a session of Privateer which I haven't played in YEARS! My Saitek X52 worked fine - now I have to program up my buttons.

The music for some reason is a little choppy when on the bases but in flight the music is okay.

DOSBox has been a real savior - do I dare pull out my Wing Commander III and IV games (each with 6 CDROMs) - I think I'll stick with Privateer for now...