Author Topic: DOS VDM - USB and Game port Gamepad support  (Read 147592 times)

Mark Szkolnicki

  • Sr. Member
  • ****
  • Posts: 433
  • Karma: +18/-0
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #345 on: November 05, 2022, 06:50:26 pm »
Heh Dave!

Haven't had much luck with building a recent SDL_mixer, the configure build seems broken and our cmake is too old. Doing make all dies with no rule to build sh.exe and for the hell of it I added it to the object directory and then the error became,
Code: [Select]
make: *** No rule to make target `--mode=compile', needed by `build/load_aiff.lo'.  Stop.


Don't know whats up there.
Libmodplug did easily build

Could you do an experimental build of SDL2_mixer? (does it have a newer cmake)

Don't know the differences between the two, or how SDL and SDL2 relate, so asking my weekend dumb question.

M
Vincit Que Se Vincit - "He Who Conquers Self Succeeds"

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #346 on: November 06, 2022, 04:24:30 am »
Yes, that was the SDL2mixer I was trying to build. SDL_mixer and SDL2_mixer seem to be in the same git repository with development only happening on SDL2 now.
I can try building an earlier one but it needs different prerequisites which need built. It is one of the reasons that I was hoping to build a recent version. Perhaps tomorrow if they're right about the snow here.
Unluckily Silvan seems busy otherwise i'd ask him about updating cmake, we have version 4.9 and SDL2_mixer requires 5.0+

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #347 on: November 06, 2022, 04:26:11 am »
Hi Mark,

 Jeez... I hope you like snow. Record temps here today.. ~80F.

 I have been playing around with the gamepad and actually got some progress.. if I set it to XInput (it has a switch to change between DirectInput and XInput, whatever they are) and use the Oinput64 (for a Playstation controller I believe) file that Wim posted a while back, I get controller output on the console. Any other Oinput file, or DirectInput, gives me a sys0031: A device attached to the system is not functioning. Not sure what to do with it at this point (since Wim has backed off on this project), but it's a start. I'll fool around with it as time permits. Would be nice to know if this works for Dave too...

Regards,

Hi David, is the red light on or off when you are in Xinput mode?

Sigurd Fastenrath

  • Hero Member
  • *****
  • Posts: 576
  • Karma: +27/-0
  • OS/2 Versus Hardware - Maximum Warp!
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #348 on: November 06, 2022, 09:37:39 am »
Just my 2 Cents here: Have not read through the whole thread but in my opinion one should Focus on Dosbox instead of DOS VDM.

This is because:

- DOSbox has integrated Soundblaster AND Ultrasound Support, preconfigured. Working out of the Box. As long as Arcaos Supports Sound you will allways get Sound with Dosgames

E.G.: try to install Warcraft 2 inside DOS VDM, the setup will not recognize the soundcards. Install it in Dosbox and it will find Soundblaster AND Ultrasound

- DOSBox is able to handle the DOS4GW Extender, that is needed for many later DOS Games. This did never reliable work, if at all, in DOS VDM

Keeping this in mind I would Focus on Gamepad Support in Dosbox rather then invest time in any kind of work (Sound, Extender etc.) in DOS VDM.

DOS VDM is a waste of time as it will never reach the quality of Dosbox, due to technical Limitations.

And best of all: DOSBOX is free of charge and an installable wpi.

Just my two Cents.

All the best!



« Last Edit: November 06, 2022, 12:17:05 pm by Sigurd Fastenrath »

David McKenna

  • Hero Member
  • *****
  • Posts: 742
  • Karma: +24/-0
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #349 on: November 06, 2022, 01:04:10 pm »
Dave,

 No red light on mine, but there is a 'Mode' button on top to the left of the 'Logitech' button with a green light that goes on-and-off when I press 'Mode'. But that doesn't change the Input type - there is a small switch on the bottom of the unit that does that. You can tell which input mode you are in by looking in the Hardware manager - it will show 'Logitech Inc. F310 Gamepad (XInput Mode)' or 'Logitech Inc. F310 Ganepad (DirectInput Mode)' depending on the switch position - or use lsusb.

Regards,
« Last Edit: November 06, 2022, 01:27:54 pm by David McKenna »

David McKenna

  • Hero Member
  • *****
  • Posts: 742
  • Karma: +24/-0
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #350 on: November 06, 2022, 01:17:00 pm »
Mark,

  Not -80! I meant 'approximately 80F' (using the '~' symbol). Ended up at 82F - not quite a record. I'm East Coast US, mid-Atlantic (Delaware). If it ever hits -80 here, I won't be any more...

 I hope to get some time today to play with this and at least get the logs you requested and post them here. I'll attach my oinput.cmd file. Haven't even tried xevents yet...

Regards,
« Last Edit: November 06, 2022, 01:26:20 pm by David McKenna »

Mark Szkolnicki

  • Sr. Member
  • ****
  • Posts: 433
  • Karma: +18/-0
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #351 on: November 06, 2022, 03:07:02 pm »
Heh Sigurd!

Just my 2 Cents here: Have not read through the whole thread but in my opinion one should Focus on Dosbox instead of DOS VDM.

This is because:

- DOSbox has integrated Soundblaster AND Ultrasound Support, preconfigured. Working out of the Box. As long as Arcaos Supports Sound you will allways get Sound with Dosgames

E.G.: try to install Warcraft 2 inside DOS VDM, the setup will not recognize the soundcards. Install it in Dosbox and it will find Soundblaster AND Ultrasound

- DOSBox is able to handle the DOS4GW Extender, that is needed for many later DOS Games. This did never reliable work, if at all, in DOS VDM

Keeping this in mind I would Focus on Gamepad Support in Dosbox rather then invest time in any kind of work (Sound, Extender etc.) in DOS VDM.

DOS VDM is a waste of time as it will never reach the quality of Dosbox, due to technical Limitations.

And best of all: DOSBOX is free of charge and an installable wpi.

Just my two Cents.

All the best!

And a valuable 2 cents, Sir - except here in Canada we have no pennies anymore - got rid of them nearly a decade ago now.   ;D

As the thread is really about getting game controllers (gamepads and joysticks) working on modern computers we've been testing the controllers we've got working on all of the permutations we can on OS/2 derived systems (ie. OS2/eCS/ArcaOS) - this includes Dos VDM, DOSBox, Native OS/2, and now SDL games.

Related to legacy DOS games I agree with you - one of the key games Martin and I started testing with Wim's (Wim Bruls) kind assistance was Wolfenstein 3D - despite fiddling around with settings and SET SOUND options I personally was never able to get sound working correctly there, as a VDM - there was not that problem in any way, setting up in DOSBox, using DOSBox GUI - in fact I have set up and use successfully 5 games in DOSBox for testing, with the current custom drivers Wim created (including Wolfenstein 3D, Star Wars: Dark Forces, Mechwarrior 2, Comanche 2 and Ultimate Doom).

Wim actually felt there was a calibration problem within our version of DOSBox related to game controllers, and posted a suggested change to DOSBox for Jochen to have a look at, in the Spring - don't know if that was ever considered, even as an experimental DOSBox version as it would be interesting to test.

So that's the synopsis in a nutshell, Sigurd - I did create a testing guide with a summary of this information, now at v1.3, back in the Spring, which was posted in this thread - we are currently assessing if we can press forward with this ourselves, as Wim decided to withdraw in the Spring, for health reasons.

But 2 cents is indeed still very valuable here - even more valuable now that a cent produced by the Royal Canadian Mint is now a collectors item in Canada .........  8)

Best!

M
« Last Edit: November 07, 2022, 04:48:58 pm by Mark Szkolnicki »
Vincit Que Se Vincit - "He Who Conquers Self Succeeds"

Mark Szkolnicki

  • Sr. Member
  • ****
  • Posts: 433
  • Karma: +18/-0
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #352 on: November 06, 2022, 03:16:31 pm »
Mark,

  Not -80! I meant 'approximately 80F' (using the '~' symbol). Ended up at 82F - not quite a record. I'm East Coast US, mid-Atlantic (Delaware). If it ever hits -80 here, I won't be any more...

Regards,

Whew, you had me worried, Sir - thought you were in exile in Antarctica, or Siberia with nothing but your computer ........... and a gamepad!  ;D

Take it from me, after a certain minus temperature numbers are irrelevant - cold is just ........... C-O-L-D.     :'(

At least you can pile on extra clothing if needed (and Command Starts were the greatest invention ever - due to the cold, before those came along, we used to leave our vehicles running constantly in the winter, as it would be too cold to get them started otherwise).

When I was in India, consulting for the Gas Authority there, at 42 degrees C, I learned you can only take so much off ............ !  ::)

M
« Last Edit: November 06, 2022, 03:24:40 pm by Mark Szkolnicki »
Vincit Que Se Vincit - "He Who Conquers Self Succeeds"

David McKenna

  • Hero Member
  • *****
  • Posts: 742
  • Karma: +24/-0
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #353 on: November 06, 2022, 05:17:36 pm »
 Hi Mark,

 OK, I got some logs. From looking at oinput.cmd console output, it seems this Logitech F310 gamepad (in XInput mode) has 2 types of controllers: on-off (mostly buttons) and continuous (triggers and joysticks). The on-off buttons display a hexidecimal string (0-9, A-F) 144 digits long when I hit the button, then another one when I let go. The continuous controllers show the same in a stream until I either let go, or hold a position (looks like 4096 values from full off to full on).

 So I started with buttons in this order: LB, RB, Back, Logitech, Start, A, B, X, Y: 'buttons.txt'. These are all on-off. The 'Mode' button does not produce any output so not included.

 Then the 2 front triggers in this order: LT, RT - pulled them all the way on, then all the way off one at a time: 'triggers.txt'. These are continuous.

 Next the thumbpad at top left in this manner: forward, backward, left, right: 'leftpad.txt'. This is a 4-way on-off button.

 Now each joystick separately this way: press all the way forward - let go, then all the way backward-let go, then all the way left-let go, then all the way right- let go: 'rightstick.txt' and 'leftstick.txt'. These are continuous.

 Finally, the joysticks are also on-off buttons when pressed down - did the left then right stick button: 'joybutton.txt'.

 Hope this is useful. What would be the next step?

Regards,
« Last Edit: November 06, 2022, 05:43:59 pm by David McKenna »

Mark Szkolnicki

  • Sr. Member
  • ****
  • Posts: 433
  • Karma: +18/-0
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #354 on: November 06, 2022, 06:16:09 pm »
Heh David!

Hi Mark,

 OK, I got some logs. From looking at oinput.cmd console output, it seems this Logitech F310 gamepad (in XInput mode) has 2 types of controllers: on-off (mostly buttons) and continuous (triggers and joysticks). The on-off buttons display a hexidecimal string (0-9, A-F) 144 digits long when I hit the button, then another one when I let go. The continuous controllers show the same in a stream until I either let go, or hold a position (looks like 4096 values from full off to full on).

 So I started with buttons in this order: LB, RB, Back, Logitech, Start, A, B, X, Y: 'buttons.txt'. These are all on-off. The 'Mode' button does not produce any output so not included.

 Then the 2 front triggers in this order: LT, RT - pulled them all the way on, then all the way off one at a time: 'triggers.txt'. These are continuous.

 Next the thumbpad at top left in this manner: forward, backward, left, right: 'leftpad.txt'. This is a 4-way on-off button.

 Now each joystick separately this way: press all the way forward - let go, then all the way backward-let go, then all the way left-let go, then all the way right- let go: 'rightstick.txt' and 'leftstick.txt'. These are continuous.

 Finally, the joysticks are also on-off buttons when pressed down - did the left then right stick button: 'joybutton.txt'.

 Hope this is useful. What would be the next step?

Regards,

I would expect there to be two types of output - the buttons (or switches) on and off and then the continuous outputs which are used for movement.

The question as I see it is how are those signals mapped so that they can be transferred to controlling the game or other app in question.

In the xevents files (are we really doing a rerun of the X-Files ?!?!?!), again as I see it, it is a matter of trying to adapt the CMD file so that it recognizes the signals coming from your gamepad and passes them through to the app. We have an example to work from, for both gamepads and joysticks - the question is, is it a matter of tweaking the existing lines in the CMD file, or is each piece of equipment somewhat unique?

Wim mentioned when we started this that he did not feel using his Extended Control driver was the appropriate approach, and I see why now - essentially using this approach is creating a custom driver for each piece of equipment - however, I think we need to get more devices in testing at the moment, and more people involved, so we can assess where to go next, hence continuing this way, to start.

I'd like to see what Dave comes up with related to his oinput files and I asked him to run a couple of other tests as well. As I said, I'm just starting this, project management wise, to see if it is beyond me or not - but having data to review is a good first step.

Thanks for this - I'll let you know when I have a plan to proceed and Best!

M

« Last Edit: November 06, 2022, 06:31:12 pm by Mark Szkolnicki »
Vincit Que Se Vincit - "He Who Conquers Self Succeeds"

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #355 on: November 06, 2022, 06:47:11 pm »
Dave,

 No red light on mine, but there is a 'Mode' button on top to the left of the 'Logitech' button with a green light that goes on-and-off when I press 'Mode'. But that doesn't change the Input type - there is a small switch on the bottom of the unit that does that. You can tell which input mode you are in by looking in the Hardware manager - it will show 'Logitech Inc. F310 Gamepad (XInput Mode)' or 'Logitech Inc. F310 Ganepad (DirectInput Mode)' depending on the switch position - or use lsusb.

Regards,

Hmm, I don't have a switch on the bottom and going to the Logitech site, the picture of the joypad is somewhat different. Mine has no colours, with all the buttons etc being black, and the buttons are simply numbered rather then A,B,X,Y and the light on top is red and goes on and off depending on pressing the little mode button.
Also seems stuck in DirectInput Mode,
Code: [Select]
Device 046D:C216  LS Logitech, Inc. F310 Gamepad [DirectInput Mode]
Manual says for modern games, to use XInput mode with DirectInput being an older input standard and better for older games.

David McKenna

  • Hero Member
  • *****
  • Posts: 742
  • Karma: +24/-0
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #356 on: November 06, 2022, 07:25:52 pm »
 Dave,

 Hmmm.. how old is yours? Just got mine a couple months back - maybe you have an older version? The manual mine came with says to use XInput (doesn't need drivers) unless it doesn't work, and that DirectInput needs special software installed (but is programmable). Also, all the 'Mode' button does is switch the function of the left thumbpad and left joystick from one to the other (essentially turns the left joystick to a 4-way button).

Regards,
« Last Edit: November 06, 2022, 07:31:33 pm by David McKenna »

David McKenna

  • Hero Member
  • *****
  • Posts: 742
  • Karma: +24/-0
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #357 on: November 06, 2022, 07:52:48 pm »
 Turns out I was wrong about the thumbpad - it is actually an 8 way switch. Got a new log... leftpad2.txt. Took this starting in the forward direction, then 45deg clockwise, then 90 deg. etc. all the way around.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #358 on: November 06, 2022, 09:46:11 pm »
Dave,
 Hmmm.. how old is yours? Just got mine a couple months back - maybe you have an older version?

I have no idea, I picked it up at the local thrift store last year, so could be pretty old. The P/N is 863247-0010, M/N G-UF13A, PID VV538. No date.

Edit: Actually it seems to be a slightly different model, Dual Action. https://www.ebay.com/itm/333933205627
« Last Edit: November 06, 2022, 10:00:06 pm by Dave Yeo »

Sigurd Fastenrath

  • Hero Member
  • *****
  • Posts: 576
  • Karma: +27/-0
  • OS/2 Versus Hardware - Maximum Warp!
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #359 on: November 06, 2022, 10:21:32 pm »
Heh Sigurd!


Best!

M

Hi Mark,

thank you very much for your kind words and deep explanations!  I really do appreciate the work you and your fellows are doing in this thread, great!

I made a presentation at our (sadly) Last User Meeting in Cologne yesterday with Dosbox and ScummVm as topics. I remember the painfull memory management and config.sys trials and errors to get in 1995 enough free memory on MS DOS 6.22 (needed almost 580/590k of free memory if i remember correctly), for my first (and still for me one of alltime best) DOS Game named BIOFORGE from Origin. So my 486 PC at that time had Dualboot with OS/2 Warp 3 and MS DOS 6.22.

Bioforge never run in DOS VDM, the same goes for Baphomets Fluch II (I think it is named: Broken Sword 2 in English), a wonderfull graphical adventure that forced me to buy Windows 95, as it did not run on DOS nur OS/2 DOS VDM. I did play Broken Sword 1 before, that was available for DOS. But it never run in DOS VDM either.

After several Years Paul Smedley thankfully ported ScummVM to OS/2, wich makes - with a lot of other DOS Games and even Hopkins FBI, - Broken Sword 1+2 playable on OS/2, without any restrictions!

And Jochen Schäfers Port of Dosbox for OS/2 finally lead to a 100% playable BIOFORGE with OS/2!

So, since I do already have an OS/2 Retro Games machine (possible with Warp 4, eComStation or ArcaOS) using these two Emulators wich opened the Door (not window ;-) ) for almost each and any DOS Game for OS/2.

All the best and good luck!!

Sigurd
« Last Edit: November 07, 2022, 02:36:21 pm by Sigurd Fastenrath »