VOGONS


First post, by ih8registrations

User metadata
Rank Oldbie
Rank
Oldbie

http://sourceforge.net/tracker/index.php?func … 551&atid=467234

The patch/changed files I sent is attached to this post.

Enjoy.

Attachments

  • Filename
    joystickdiffs.zip
    File size
    47.15 KiB
    Downloads
    207 downloads
    File license
    Fair use/fair dealing exception

Reply 1 of 7, by voyageur

User metadata
Rank Newbie
Rank
Newbie

Looks like promising! Recompilation is on the way, I hope soon my good old Sidewinder will be more than a 2-buttons stick in Dosbox 😁

Here's the patch I generated from your tree (the original one had .orig extensions in orig folder, and I think was reversed 😉 ). I removed all .orig extensions and did a 'diff -Naur orig new'.

It applies to current CVS too (even if with some offsets).

Attachments

  • Filename
    joypatch.diff
    File size
    8.92 KiB
    Downloads
    210 downloads
    File comment
    Working patch
    File license
    Fair use/fair dealing exception

Voyageur

Reply 3 of 7, by voyageur

User metadata
Rank Newbie
Rank
Newbie

It's a patch against dosbox sources
On unixes it can be applied with "patch -p1 < wherethefileis/joypatch.diff" in the dosbox source directory; don't know how you do it on windows though (does visual studio like unix diff files?)

Voyageur

Reply 4 of 7, by bai

User metadata
Rank Newbie
Rank
Newbie

This patch doesn't merge with the latest CVS code, so I went through and started applying it manually. While I was doing so, I noticed a lot of problems with the code - you removed all of the bounds checking (ie, all the "if (which < 2)" in the JOYSTICK_* functions), without actually changing the number of elements in the joystick array. Similar problem with the extra button support you added - struct Joystick still only has bools for 2 buttons. Pressing any other button during operation has the potential for disasterous results. Might want to fix those up before applying the patch to the source tree.

As a side note, does anyone remember if Privateer supported multiple axes (ie, throttle and/or roll)? I seem to remember it supporting at least throttle, but it doesn't understand the way it was implemented in this patch. Anyone have any relevant information on how multiple axes on a single joystick worked in DOS? I wouldn't mind adding support for them myself.

Reply 6 of 7, by bai

User metadata
Rank Newbie
Rank
Newbie

Ah, right - I didn't look as closely at that file because the changes merged fine. It was just hardware/joystick.cpp that had problems, so that's where I spent most of my time looking. Now the question is, did privateer just plain not support > 2 axes, 2 buttons, or does it expect them to be implemented differently? What games did you use to test with?

Reply 7 of 7, by ih8registrations

User metadata
Rank Oldbie
Rank
Oldbie

The code was tested with these:

ftp://ftp.chproducts.com/pub/Jcenter.exe http://ftp.gravis.com/Public/pcstick/grvutl4.zip

which fully excercise the joystick port. If it works here & not in Privateer, it's a game issue.