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

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4714
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: DOS VDM - USB and Game port Gamepad support
« Reply #330 on: November 03, 2022, 03:00:31 am »
Thanks Mark for the testing and the remarks.

So I guess we are all experiencieng the "Up arrow drift" of the character with the gamepad.

Maybe it can be interesting to test a second SDL game port that uses a gamepad/joystick and see if the behaves the same way. If so I guess we can blame SDL, right?

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Mark Szkolnicki

  • Sr. Member
  • ****
  • Posts: 433
  • Karma: +18/-0
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #331 on: November 03, 2022, 03:43:23 am »
Heh Martin!

Thanks Mark for the testing and the remarks.

So I guess we are all experiencieng the "Up arrow drift" of the character with the gamepad.

Maybe it can be interesting to test a second SDL game port that uses a gamepad/joystick and see if the behaves the same way. If so I guess we can blame SDL, right?

Regards

I guess the question is - is there a second game we can test? Anybody have any other game controller related SDL suggestions?

It could be SDL, SDL/2 or something in ArcaOS which is not meshing correctly - as libs are usually most likely, it is probably a problem with a port, or some lib missing, perhaps in compiling Dave's builds .

Have been trolling around forums discussing Rock N Diamonds and ran into one when Holger, the developer was discussing game controllers, in this case related to Android devices - there seems to be many problems related to the endless demands users have to make every device work on every incarnation of OS and platform ..........

Like with UniAud32, I've learned one size does not fit all - I have not run across reference to this "bug" yet - but if we asked about OS/2 / eCS / ArcaOS in a forum, I suspect we would get ......... WHAT?????

Have some fun in Orlando, Sir! I know where you live is a lot warmer and more similar to Florida, and in both there is a definite lack of the overabundance of white stuff and cold we are experiencing here in Alberta at the moment .......... !

Best, after shoveling about a ton of heavy, wet snow!

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

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4788
  • Karma: +99/-1
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #332 on: November 03, 2022, 04:04:29 am »
Holger has been pretty helpful and at one time OS/2 was officially supported and he even fixed a bug for us a while back that made building more pain free. I did run across the up arrow bug in a previous version I built, it was on of the reasons I never released it.
While playing with your Win32 version, perhaps test the network code

Mark Szkolnicki

  • Sr. Member
  • ****
  • Posts: 433
  • Karma: +18/-0
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #333 on: November 03, 2022, 01:52:48 pm »
Heh Dave!

Holger has been pretty helpful and at one time OS/2 was officially supported and he even fixed a bug for us a while back that made building more pain free. I did run across the up arrow bug in a previous version I built, it was on of the reasons I never released it.
While playing with your Win32 version, perhaps test the network code

Were you ever able to ask him about this up arrow drift - the posts I was reading are about 5 years old (2017).

https://www.artsoft.org/forum/viewtopic.php?t=2312

Can you recall what you included in the previous build, and was it also SDL related, or DOS (or OS/2 native for that matter)? (if it is long ago and far far away, scratch that question). Did you ever produce a build that did not have the drift?

@Edit1 - I found a bug tracker page for RnD but haven't found how to actually search any archives, if any it may have:

https://bugs.artsoft.org/

It seems that major game controller support, trying to encompass all game controllers started with v4.0.1.0 as per the Artsoft announcement page:

https://www.artsoft.org/rocksndiamonds/news/page9/

Do you know, Dave, if Holger has a source file archive page,. archiving previous versions? Do you also know what version you were building where you noted the arrow drift problem? Perhaps we can try, if your willing, building a more historic build to see if this problem existed in earlier 4.x.x.x builds?

@Edit2 - seems I answered my own question:

https://www.artsoft.org/2014/09/17/rocksndiamonds-development-source-code-available-now/

@

http://git.artsoft.org/rocksndiamonds.git

M
« Last Edit: November 03, 2022, 02:20:54 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 #334 on: November 03, 2022, 09:34:42 pm »
Heh Dave!

Also sdl2_mixer doesn't have mod support so some warnings from that and no music. Needs sdl2_net as well. Only lightly tested

Didn't find anything on the up arrow problem, but found an interesting thread on no sound:

https://www.artsoft.org/forum/viewtopic.php?t=2222

It makes reference to "building SDL_mixer with external SMPEG library support (for MP3 support)" being a problem with SDL2_mixer as well.

So it may also be a problem with the SDL2_mixer for ArcaOS as well as the MOD problem you described.

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

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4788
  • Karma: +99/-1
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #335 on: November 03, 2022, 10:26:43 pm »
Heh Dave!

Holger has been pretty helpful and at one time OS/2 was officially supported and he even fixed a bug for us a while back that made building more pain free. I did run across the up arrow bug in a previous version I built, it was on of the reasons I never released it.
While playing with your Win32 version, perhaps test the network code

Were you ever able to ask him about this up arrow drift - the posts I was reading are about 5 years old (2017).

https://www.artsoft.org/forum/viewtopic.php?t=2312

No, I have a message there waiting for moderation, once it clears, I'll ask him

Quote
Can you recall what you included in the previous build, and was it also SDL related, or DOS (or OS/2 native for that matter)? (if it is long ago and far far away, scratch that question). Did you ever produce a build that did not have the drift?

I've built a couple of versions and IIRC, someone else did as well. First one was OS/2 Xfree86 native. I think joystick support worked then but I might be mis-remembering, it was 25 odd years back. I know sound didn't work and I played it with a joypad plugged into my sound card (PAS16), but it might have been on Linux.
Newer builds never had joystick support until last year when I tried it. That version had the up arrow problem.

Quote
@Edit1 - I found a bug tracker page for RnD but haven't found how to actually search any archives, if any it may have:

https://bugs.artsoft.org/

It seems that major game controller support, trying to encompass all game controllers started with v4.0.1.0 as per the Artsoft announcement page:

https://www.artsoft.org/rocksndiamonds/news/page9/

Do you know, Dave, if Holger has a source file archive page,. archiving previous versions? Do you also know what version you were building where you noted the arrow drift problem? Perhaps we can try, if your willing, building a more historic build to see if this problem existed in earlier 4.x.x.x builds?

@Edit2 - seems I answered my own question:

https://www.artsoft.org/2014/09/17/rocksndiamonds-development-source-code-available-now/

@

http://git.artsoft.org/rocksndiamonds.git

M

Yes I have the git tree here and it is easy enough to check out older versions and test except the graphics and sound was only recently added to the repo so while now, it is playable after building, earlier versions meant downloading the Windows or whatever build and replacing the executable.
If I get bored tomorrow, I might try building a SDL version if I can figure out the right version to build and see if that has the same problem.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4788
  • Karma: +99/-1
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #336 on: November 03, 2022, 10:34:12 pm »
Heh Dave!

Also sdl2_mixer doesn't have mod support so some warnings from that and no music. Needs sdl2_net as well. Only lightly tested

Didn't find anything on the up arrow problem, but found an interesting thread on no sound:

https://www.artsoft.org/forum/viewtopic.php?t=2222

It makes reference to "building SDL_mixer with external SMPEG library support (for MP3 support)" being a problem with SDL2_mixer as well.

So it may also be a problem with the SDL2_mixer for ArcaOS as well as the MOD problem you described.

M

I'll try building the latest SDL_mixer, I see now it uses libmpg123, which is currently in netlabs-exp under mpg123, at that we have most of the external libs except tremor (related to OGG Vorbis), which I see has both a makefile.os2 and a makefile.emx.
Whether to compile in midi support is questionable, cpu intensive and means setting up Timidity or fluidsynth. Quickly looking, I don't see what they're now using for MOD support.

Mark Szkolnicki

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

Quickly looking, I don't see what they're now using for MOD support.

I did a quick troll around this morning.

It seems that modplug is what is being used for MOD files.

Looking in the cmake directory on github for SDL_Mixer:

https://github.com/libsdl-org/SDL_mixer
https://github.com/libsdl-org/SDL_mixer/tree/main/cmake

read that in findmodplug,cmake

There is such a thing as libmodplug but not that I could see in the repositories in ANPM. Found references and links to it on sourceforge:

https://modplug-xmms.sourceforge.net/#whatis

libmodplug v0.8.8.5 is the last build listed on that page, dated March 2014 - references a Linux file.which can still be downloaded.

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

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4788
  • Karma: +99/-1
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #338 on: November 04, 2022, 07:30:40 pm »
Looking at SDL_mixer configure --help, there's lots of choices,
Code: [Select]
  --enable-music-cmd      support an external music player [default=yes]
  --enable-music-wave     enable streaming WAVE music [default=yes]
  --enable-music-mod      enable MOD music [default=yes]
  --enable-music-mod-modplug
                          enable MOD music via modplug [default=no]
  --enable-music-mod-modplug-shared
                          dynamically load modplug library [default=yes]
  --enable-music-mod-xmp  enable MOD music via libxmp [default=yes]
  --enable-music-mod-xmp-lite
                          use libxmp-lite instead of libxmp [default=no]
  --enable-music-mod-xmp-shared
                          dynamically load xmp library [default=yes]
  --enable-music-midi     enable MIDI music [default=yes]
  --enable-music-midi-timidity
                          enable timidity MIDI output [default=yes]
  --enable-music-midi-native
                          enable native MIDI music output [default=yes]
  --enable-music-midi-fluidsynth
                          enable FluidSynth MIDI output [default=yes]
  --enable-music-midi-fluidsynth-shared
                          dynamically load FluidSynth library [default=yes]
  --enable-music-ogg      enable Ogg Vorbis music [default=yes]
  --enable-music-ogg-stb  enable OGG Vorbis music via stb_vorbis [default=yes]
  --enable-music-ogg-vorbis
                          enable OGG Vorbis music via libvorbis [default=no]
  --enable-music-ogg-vorbis-shared
                          dynamically load libvorbis library [default=yes]
  --enable-music-ogg-tremor
                          enable OGG Vorbis music via Tremor [default=no]
  --enable-music-ogg-tremor-shared
                          dynamically load Tremor library [default=yes]
  --enable-music-flac     enable FLAC music [default=yes]
  --enable-music-flac-drflac
                          enable FLAC music via dr_flac [default=yes]
  --enable-music-flac-libflac
                          enable FLAC music via libFLAC [default=no]
  --enable-music-flac-libflac-shared
                          dynamically load FLAC library [default=yes]
  --enable-music-mp3      enable MP3 music [default=yes]
  --enable-music-mp3-drmp3
                          enable MP3 music via dr_mp3 [default=yes]
  --enable-music-mp3-mpg123
                          enable MP3 music via mpg123 [default=no]
  --enable-music-mp3-mpg123-shared
                          dynamically load mpg123 library [default=yes]
  --enable-music-opus     enable Opus music [default=yes]
   --enable-music-opus-shared
                         dynamically load opusfile library [default=yes]

Note that dynamic loading using the GNU toolchain doesn't really work.

I played last night trying to get xmp to compile as xmp has OS/2 support.
It has been split into the library and the cli client and the OS/2 support is with Open Watcom.
Building with Open Watcom mostly works, needed to link to tcpip32 for gettimeofday(). Plays music but freezes with the example mod that comes with it. A few CTRL-C's closes it and the VIO window it was playing with.
Unluckily the library uses some unsupported by our GCC stuff to make a shared library. I can force the Open Watcom library to use the right calling convention so it works with GCC, but the cli client didn't produce sound.
I'll look at ModPlug.
Here's the Open Watcom compiled xmp.exe along with the example mod. Other mods here play well.

David McKenna

  • Hero Member
  • *****
  • Posts: 743
  • Karma: +24/-0
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #339 on: November 05, 2022, 01:47:07 pm »
Dave,

  I have the exact same gamepad here, but have never been able to get it to work. Would you mind sharing your oinput.cmd and xevents.cmd files for your Logitech F310 gamepad?

Regards,

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4788
  • Karma: +99/-1
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #340 on: November 05, 2022, 03:41:37 pm »
Hi David, it currently doesn't work at all here. Mark was talking about putting in some time to try to get it working in which case I'll share.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4788
  • Karma: +99/-1
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #341 on: November 05, 2022, 03:45:43 pm »
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

Mark Szkolnicki

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

Under more snow and blowing snow today - 30 cm since Nov. 2 - so staying inside for the day.

Dave,

  I have the exact same gamepad here, but have never been able to get it to work. Would you mind sharing your oinput.cmd and xevents.cmd files for your Logitech F310 gamepad?

Regards,

As  Dave mentioned he doesn't have a working xevents.cmd for his gamepad. Martin and I have been testing his versions of SDL Rocks N Diamonds

I started a private conversation with Dave to see where he stands at the moment in trying to implement Wims drivers if at all. As mentioned previously, I wanted to get back on this project as a winter hobby - my conversation with Dave is intended to see if we could get his gamepad running, with modifications to Martin's xevents - I was hoping if we can expand the base of working equipment, it might give us a clue as to the path forward for this.

Having reviewed the xevents.cmd files, both mine and Martins, the REXX files are about 70-75% common in nature, related to programming - the differences are in the custom programming related to the various control signals being passed to the game controller drivers, through Wims Extended Control driver

I do have the gamepad xevents that Martin is using successfully for his SNES gsmerpad, which I have posted below, if you want to have a look. I was hoping to use that as a template, to modify, if we can get some oinput data.

As Martin is at Warpstock this weekend, he's probably unavailable, but perhaps when he gets back you can ask him for the button.log and stick.log file he generated with his version of oinput. If you can generate similar oinput logs for your gamepad, or Dave can, that should give us something to compare to.

As mentioned numerous times I'm not a programmer, but age takes on things youth will not do because it takes too long - I'm hoping to pick up some REXX programming in all of this and as the Beatles song goes "get by with a little help from my friends". If you do indeed have the same game controller as Dave, perhaps the three of us can puzzle it out together, but I'd like to try this out privately first, if your willing to do that.

Best!

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

David McKenna

  • Hero Member
  • *****
  • Posts: 743
  • Karma: +24/-0
    • View Profile
Re: DOS VDM - USB and Game port Gamepad support
« Reply #343 on: November 05, 2022, 06:30:13 pm »
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,

Mark Szkolnicki

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

Hi Mark,

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


I'm a child of the Great White North, Sir. Obviously, your a child of the Ever Melting South, or very lucky at the moment  :P

@Edit1 - Wait a minute ............. did you say -80 F ?!?!?!  ???
Used to work up in Norman Wells, Northwest Territories with Enbridge, about 200 km south of the Arctic Circle - didn't get to -80 ........... but many days in the winter at -60 C

Where the "h" are you?

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,

That's interesting information - and obviously you have a little experience at least with REXX.

I'd be interested in seeing your modified xevents file and your oinput Buttons and Stick logs, as per Wims instructions, when we started all this. Your equipment ID as well, if you'd like to post them here or send all those privately (you should have a private message from me, sent just a few minutes ago).

You've already advanced the process I was hoping to just start and Best!

M

@Edit2 - BTW - I still keep in touch with Wim, to check in and see how things are going - health issues are involved. As with my wife, this aging thing is not for the faint of heart.   M Too
« Last Edit: November 05, 2022, 07:03:09 pm by Mark Szkolnicki »
Vincit Que Se Vincit - "He Who Conquers Self Succeeds"