VOGONS


First post, by Joakim

User metadata
Rank Oldbie
Rank
Oldbie

So I bought a Gravis Xterminator but for some reason I did not consider the fact that this is a digital joypad and I would like to run in it DOS. But then only a few games in DOS will run.

So I was thinking of a method to convert the signal into analog. For most use cases I'm very happy to only x y and two push buttons as most of these games are quite simple. I guess it would be more complicated to run a game like tomb raider or something.

As I understand it "digital" really means that the joystick uses a sequence of the channels rather than just one channel per axis or button. I'm really a beginner when it comes to these things but I guess it would be possible just to hook up the joystick and capture the sequences for the buttons and then with some method convert the sequence to analog. I guess it should be quite easy with a gamepad as I need only 6 buttons and no analog axii?

My problem is the method of actually converting it, but I think it would be an interesting beginners project. Any hints on this? Other thoughts?

//Joakim

Reply 1 of 34, by Benedikt

User metadata
Rank Oldbie
Rank
Oldbie

In this context, "digital" means, that you have functionality roughly equivalent to arrow keys, whereas an analog joystick allows you to express nuances, i.e. how quickly you want to turn right in a racing game.
You can build an adapter, but gameplay will not be any more fun than with keyboard controls.

Reply 2 of 34, by Shreddoc

User metadata
Rank Oldbie
Rank
Oldbie

Bret Johnson's USB drivers (specifically USBJSTIK.COM, with USBUHCI(L).COM preloaded) would be one of your best /existing/ options, to hack the Gravis Xterminator into working under DOS. To test that option, you'd need the gameport-to-USB adapter which originally retailed with the Xterminator.

I did test all the above myself some months back, but since I also tested a number of other devices around the same time, I don't now recall exactly how (or even if) the Xterminator performed.

There are a lot of caveats with this route - do you have the adapter? does USBUHCI(L).COM support your motherboard's USB ports? does the Xterminator send data that USBJSTIK.COM picks up? does <insert Game X here> ultimately recognise the non-standard setup, for whatever niche reason?? - but if it works it works, with no cost other than time, reading, and testing.

If you need further help with it, let me know and I'll dust the old pad off and check again...

Reply 3 of 34, by aha2940

User metadata
Rank Member
Rank
Member

A couple points to enhance previous reply:

1. There are two flavors of the Gravis Xterminator Digital Gamepad (which seems to be what you have). One comes with an adapter from DB-15 to USB, the other (older) one does not. While the gamepads do look identical except for a logo on the lower part, the adapter will not work on a gamepad that did not come originally with it.
2. There are DB-15 to usb converters out there, but those are meant only for analog joysticks, they do not work at all for the Gravis Xterminator.

Reply 4 of 34, by Benedikt

User metadata
Rank Oldbie
Rank
Oldbie
Benedikt wrote on 2021-08-19, 09:35:

In this context, "digital" means, that you have functionality roughly equivalent to arrow keys, whereas an analog joystick allows you to express nuances, i.e. how quickly you want to turn right in a racing game.
You can build an adapter, but gameplay will not be any more fun than with keyboard controls.

Ok. I slightly misunderstood the context here. What you have is a gamepad with analog joysticks that is connected to the PC digitally via USB.
If you desperately need something that works on an analog gameport, you could bypass the USB circuitry.
A traditional gameport joystick contains no circuitry beyond potentiometers and button switches.

Reply 5 of 34, by Joakim

User metadata
Rank Oldbie
Rank
Oldbie

No I do not own a converter if one even existed for the device.

I guess I could open it up and find out what kind it is if anyone knows how to recognize the circuit board.

IMG_20210819_211856.jpg
Filename
IMG_20210819_211856.jpg
File size
1.28 MiB
Views
1764 views
File license
Public domain

Reply 6 of 34, by BitWrangler

User metadata
Rank l33t++
Rank
l33t++

Huh, I had a stick similar to that and DOS read the analog stick and A/B buttons as if it was a normal joystick and ignored the rest. Well some buttons did weird crap if 2nd joystick enabled.

Unicorn herding operations are proceeding, but all the totes of hens teeth and barrels of rocking horse poop give them plenty of hiding spots.

Reply 8 of 34, by Shreddoc

User metadata
Rank Oldbie
Rank
Oldbie
Joakim wrote on 2021-08-19, 19:22:

No I do not own a converter if one even existed for the device.

I guess I could open it up and find out what kind it is if anyone knows how to recognize the circuit board.

IMG_20210819_211856.jpg

Oh the converter definitely exists. I have one, here is a picture of it:

xtermintor2_xtensionday.jpg
Filename
xtermintor2_xtensionday.jpg
File size
174.84 KiB
Views
1725 views
File license
Public domain

But, as helpfully noted by aha2940 below, there are two revisions of the Xterminator, and we will now assume that you have the non-USB-adapter version. Therefore the earlier method I posted, involving DOS USB drivers, will probably not be suitable for your situation.

It would still be very interesting to come up with a solution if possible. After all, at heart we are only talking about a simple reading and translation of inputs. Easier said-than-done but still, it seems hardly "brain surgery", within the realms of computer science!

aha2940 wrote on 2021-08-19, 12:59:

A couple points to enhance previous reply:

1. There are two flavors of the Gravis Xterminator Digital Gamepad (which seems to be what you have). One comes with an adapter from DB-15 to USB, the other (older) one does not. While the gamepads do look identical except for a logo on the lower part, the adapter will not work on a gamepad that did not come originally with it.
2. There are DB-15 to usb converters out there, but those are meant only for analog joysticks, they do not work at all for the Gravis Xterminator.

Reply 9 of 34, by aha2940

User metadata
Rank Member
Rank
Member
Shreddoc wrote on 2021-08-19, 21:06:

It would still be very interesting to come up with a solution if possible. After all, at heart we are only talking about a simple reading and translation of inputs. Easier said-than-done but still, it seems hardly "brain surgery", within the realms of computer science!

It's not really that simple the signal conversion. Analog joysticks are simple, however AFAIK, these digital gamepads do not use simple signals, but a complete communications protocol that would require at least an FPGA (or something similar) to decode and translate into analog signals. The best I can think of to understand them is the Linux joystick library, which s opensource and supports this gamepad perfectly well.

Also for reference, here's a pic of both Gravis Xterminator Digital gamepads. The one up is not compatible with the DB15-USB adapter, the one down is compatible and it came with the adapter. Notice that their only external difference is the logo on the lower part (and their color: the older one is black, the newer one is dark purple, not black but that's really hard to notice on a photo). The adapter is shown on the left part of the picture, attached to the gamepad's cable.

Attachments

  • thumbnail_IMG_9437.jpg
    Filename
    thumbnail_IMG_9437.jpg
    File size
    128.54 KiB
    Views
    1704 views
    File comment
    Gravis Xterminator Digital gamepad - both versions
    File license
    CC-BY-4.0

Reply 10 of 34, by Joakim

User metadata
Rank Oldbie
Rank
Oldbie

Sigh I will end up planning yet an other raspberry pi project and never finish it. I have so much other cool stuff to do! 😁

I might just get an other joypad I guess hah. Sadly I could only find the box for my old gravis (the one that kind looks like a PS controller) pro maybe.

Reply 11 of 34, by aha2940

User metadata
Rank Member
Rank
Member
Joakim wrote on 2021-08-19, 21:54:

Sigh I will end up planning yet an other raspberry pi project and never finish it. I have so much other cool stuff to do! 😁

I might just get an other joypad I guess hah. Sadly I could only find the box for my old gravis (the one that kind looks like a PS controller) pro maybe.

A Raspberry pi seems like a good option for converting this Gravis Xterminator gamepad to analog, since the default kernel on raspbian already manages the gamepad perfectly, it would be "just" a matter of configuring the appropriate GPIO pins to output the analog signals for the DB-15 port, I guess.

Edit: a bit more of information: https://www.kernel.org/doc/html/v5.0/input/jo … v/joystick.html

Reply 12 of 34, by Shreddoc

User metadata
Rank Oldbie
Rank
Oldbie
aha2940 wrote on 2021-08-19, 21:41:
Shreddoc wrote on 2021-08-19, 21:06:

It would still be very interesting to come up with a solution if possible. After all, at heart we are only talking about a simple reading and translation of inputs. Easier said-than-done but still, it seems hardly "brain surgery", within the realms of computer science!

It's not really that simple the signal conversion. Analog joysticks are simple, however AFAIK, these digital gamepads do not use simple signals, but a complete communications protocol that would require at least an FPGA (or something similar) to decode and translate into analog signals. The best I can think of to understand them is the Linux joystick library, which s opensource and supports this gamepad perfectly well.

I doubt that a dedicated hardware device is necessary, at least for rudimentary operation. With my USB-adaptered revision of the Xterminator pad, I can (with Bret Johnson's software) literally already do what the OP wants to do - natively, in DOS*.

I suspect B.J.'s DOS software (source available) already does much of the heavy lifting vis-a-vis translation of the digital protocols to analog which you speak of. In large part, that is exactly what USBJSTIK.COM exists to do: read the digital inputs from post-analog sticks, and map them to analog joystick functions, natively in DOS.

grav_xt_dosusb_1.jpg
Filename
grav_xt_dosusb_1.jpg
File size
167.21 KiB
Views
1669 views
File license
Public domain
grav_xt_dosusb_2.jpg
Filename
grav_xt_dosusb_2.jpg
File size
168.05 KiB
Views
1669 views
File license
Public domain
grav_xt_dosusb_3.jpg
Filename
grav_xt_dosusb_3.jpg
File size
196.8 KiB
Views
1669 views
File license
Public domain

As per the above ph0tos which I just took for our purposes here, I can confirm that the USB revision of the pad does respond to the software, so chunks of Bret's code are likely going to be highly valid. We "merely" need to be reading our Inputs from the gameport, rather than USB (a change which itself ?may? introduce new limitations - idk).

But the Translate and Output modules literally already exist as DOS TSR source code, and it's conceptually fairly simple to bolt on a Get_Inputs_From_Gameport module.

*The other potential variable is the protocol difference, if any, between the two revisions of Xterminator - which perhaps we can test, given that I seem to have the New revision here, and the OP may have the Old revision...

Reply 13 of 34, by aha2940

User metadata
Rank Member
Rank
Member
Shreddoc wrote on 2021-08-20, 02:26:
I doubt that a dedicated hardware device is necessary, at least for rudimentary operation. With my USB-adaptered revision of the […]
Show full quote
aha2940 wrote on 2021-08-19, 21:41:
Shreddoc wrote on 2021-08-19, 21:06:

It would still be very interesting to come up with a solution if possible. After all, at heart we are only talking about a simple reading and translation of inputs. Easier said-than-done but still, it seems hardly "brain surgery", within the realms of computer science!

It's not really that simple the signal conversion. Analog joysticks are simple, however AFAIK, these digital gamepads do not use simple signals, but a complete communications protocol that would require at least an FPGA (or something similar) to decode and translate into analog signals. The best I can think of to understand them is the Linux joystick library, which s opensource and supports this gamepad perfectly well.

I doubt that a dedicated hardware device is necessary, at least for rudimentary operation. With my USB-adaptered revision of the Xterminator pad, I can (with Bret Johnson's software) literally already do what the OP wants to do - natively, in DOS*.

I suspect B.J.'s DOS software (source available) already does much of the heavy lifting vis-a-vis translation of the digital protocols to analog which you speak of. In large part, that is exactly what USBJSTIK.COM exists to do: read the digital inputs from post-analog sticks, and map them to analog joystick functions, natively in DOS.

grav_xt_dosusb_1.jpg
grav_xt_dosusb_2.jpg
grav_xt_dosusb_3.jpg

As per the above ph0tos which I just took for our purposes here, I can confirm that the USB revision of the pad does respond to the software, so chunks of Bret's code are likely going to be highly valid. We "merely" need to be reading our Inputs from the gameport, rather than USB (a change which itself ?may? introduce new limitations - idk).

But the Translate and Output modules literally already exist as DOS TSR source code, and it's conceptually fairly simple to bolt on a Get_Inputs_From_Gameport module.

*The other potential variable is the protocol difference, if any, between the two revisions of Xterminator - which perhaps we can test, given that I seem to have the New revision here, and the OP may have the Old revision...

Good to know that the USB version of the pad works, at least partially, using existing software under DOS. It would be great to have a DOS driver for full functionality of it, but translating the buttons into key presses, to maximize compatibility with DOS games. I seem to recall the protocol used was named GRiP, or something like that. No idea how hard it is to do that, or even if it's possible. BTW: The pic I posted of both pad versions is mine, I have both of them in hand so if you decide to get deeper into this, I can help with testing.

Reply 14 of 34, by dr_st

User metadata
Rank l33t
Rank
l33t

So how exactly do this "proportional" D-pad and "proportional" flippers on the Xterminator work? They do not send a proper analog signal, I guess, otherwise they would just call them "analog". Do they have a few fixed levels? How does the Windows Game Controllers applet (joy.cpl) see them?

https://cloakedthargoid.wordpress.com/ - Random content on hardware, software, games and toys

Reply 15 of 34, by Joakim

User metadata
Rank Oldbie
Rank
Oldbie

Interesting about the Bret Johnsson application. I think I've heard of it before. Kind of does not not help me I guess though as I have the wrong version. 😀

But I think the amount of DOS games that need a controller is also limited. I was going to try it in Death Rally, but I guess I could run it in windows as well.

Reply 16 of 34, by aha2940

User metadata
Rank Member
Rank
Member
dr_st wrote on 2021-08-20, 06:10:

So how exactly do this "proportional" D-pad and "proportional" flippers on the Xterminator work? They do not send a proper analog signal, I guess, otherwise they would just call them "analog". Do they have a few fixed levels? How does the Windows Game Controllers applet (joy.cpl) see them?

They are analog. When used on linux, their values change from -32768 to 32767 depending on how much you press them. Same for the X and Y axis of the analog joystick. On windows they work the same.

Joakim wrote on 2021-08-20, 14:43:

Interesting about the Bret Johnsson application. I think I've heard of it before. Kind of does not not help me I guess though as I have the wrong version. 😀

But I think the amount of DOS games that need a controller is also limited. I was going to try it in Death Rally, but I guess I could run it in windows as well.

I use my Xterminators only on Windows and Linux, for DOS (Duke nukem 1 and 2 for me require gamepad) I will be getting one of these: Volo's Gamepad to PS/2 Adapter. Device discussion (official thread) SOLD OUT (06.02.2023) or just use sneskey with the parallel port adapter for an SNES gamepad.

Reply 17 of 34, by Shreddoc

User metadata
Rank Oldbie
Rank
Oldbie

Interesting stuff.

IIRC (or: I can't be arsed setting up the applicable PC again just to check), the flippers may function as two individual halves of the same single axis? Vague memories from Win9x.

Anyway I had a look at the Bret Johnson source code, and it's well beyond anything I could take on personally. 50+ pages of somebody else's assembly, albeit highly structured and commented, is still a massive undertaking to comprehend in depth.

But during my review it seemed that much of the code was intrinsically linked to the USB and HID standards, unsurprisingly (since that's what the program was made to work with), but slightly disappointingly (in the sense that I'd hoped for something a bit more object or even procedure oriented, which could then be more easily bolted-onto).

Overall, the proof-of-concept is there that realtime joystick translation /could/ be done as a convenient DOS TSR (in an ideal world, in which we are all butt-kicking DOS Assembly wizards!), but the easier real-world option for us today is probably an aforementioned purpose built SoC-based mini-appliance.

aha2940 wrote on 2021-08-20, 15:50:

I use my Xterminators only on Windows and Linux, for DOS (Duke nukem 1 and 2 for me require gamepad) I will be getting one of these: Volo's Gamepad to PS/2 Adapter. Device discussion (official thread) SOLD OUT (06.02.2023) or just use sneskey with the parallel port adapter for an SNES gamepad.

Tempting!

Reply 18 of 34, by dr_st

User metadata
Rank l33t
Rank
l33t
aha2940 wrote on 2021-08-20, 15:50:
dr_st wrote on 2021-08-20, 06:10:

So how exactly do this "proportional" D-pad and "proportional" flippers on the Xterminator work? They do not send a proper analog signal, I guess, otherwise they would just call them "analog". Do they have a few fixed levels? How does the Windows Game Controllers applet (joy.cpl) see them?

They are analog. When used on linux, their values change from -32768 to 32767 depending on how much you press them. Same for the X and Y axis of the analog joystick. On windows they work the same.

So I assume the issue in this thread is not converting digital to analog, but merely converting USB to Gameport?

https://cloakedthargoid.wordpress.com/ - Random content on hardware, software, games and toys

Reply 19 of 34, by Benedikt

User metadata
Rank Oldbie
Rank
Oldbie

And in that case, you basically have two options:

  1. Add hardware, i.e. use an active USB-to-Gameport adapter
  2. Remove hardware, i.e. disconnect everything USB-related and connect a Gameport cable directly to the potentiometers and switches