It’s 2022, What’s the Current State of Joystick Support?

Kuro Houou
Posts: 30
Joined: Sun Oct 17, 2021 11:28 am
Been thanked: 19 times

It’s 2022, What’s the Current State of Joystick Support?

Unread post by Kuro Houou »

I am curious where the AO486 core is in terms of Joystick support and what others might be using? At a minimum it would be great to have at least 2axis support with 4 buttons but would be even better if a full Sidewinder 3D pro could be used! Really want to fire up some old sims and space shooters, like decent,swing,mech warrior if possible...

What are people using if anything? Curious what works well or.wjat I would need to get a joystick going... I have used my gamepad with the core. But it's not been the greatest and usually get settled drift as well :(. Would love to hear more about other people's setups.
thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: It’s 2022, What’s the Current State of Joystick Support?

Unread post by thorr »

This week, it's California. (Sorry for the bad joke.) Joysticks are configurable in the core menu and work in many/most but not all games. Keep in mind that the original games needed to support the joysticks and originally two-axis, two buttons was the most common. The joystick connector would support two joysticks with two buttons each, or a flight stick with four buttons and a hat, if I recall correctly.
Kuro Houou
Posts: 30
Joined: Sun Oct 17, 2021 11:28 am
Been thanked: 19 times

Re: It’s 2022, What’s the Current State of Joystick Support?

Unread post by Kuro Houou »

I ordered a CH Flightstick Pro (will have to use a gameport to usb adapter), hoping that will help as my "new" joysticks don't work. Thrustmaster T.16000. Understand I would never get all the buttons or axis.. but was hoping at least X/Y and 4 buttons would work :( I have been trying to play Decent so that's my test game... But seeing as the CH Flightstick Pro was built for DOS gaming my fingers are crossed that it will work. Also I am not sure if I should be using 2 sticks or 2 joysticks in the Mister core config.. I have tried both but no success..
thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: It’s 2022, What’s the Current State of Joystick Support?

Unread post by thorr »

Kuro Houou wrote: Tue Jan 04, 2022 1:22 am I ordered a CH Flightstick Pro (will have to use a gameport to usb adapter), hoping that will help as my "new" joysticks don't work. Thrustmaster T.16000. Understand I would never get all the buttons or axis.. but was hoping at least X/Y and 4 buttons would work :( I have been trying to play Decent so that's my test game... But seeing as the CH Flightstick Pro was built for DOS gaming my fingers are crossed that it will work. Also I am not sure if I should be using 2 sticks or 2 joysticks in the Mister core config.. I have tried both but no success..
Try different games. Each game has its own way of configuring the joystick and you have to figure out what that is. I have successfully used my Thrustmaster T. Flight Hotas 4 with Wing Commander, and I think I have to hit Ctrl-J at the first screen where it says Start a Campaign, Continue a Campaign, etc. to get it to use the joystick. I also used the MiSTer keyboard to button mapping feature to use all of the other many buttons on the Thrustmaster. When I press the buttons, it sends keystrokes to the game.

I also have a CH Products Mach III that I removed the 15-pin cable from and replaced with an Arduino Micro that I programmed to be a 3-button joystick (since the Mach III has three physical buttons). I have a Rockfire 15-pin gameport to USB adapter, but it doesn't work that well (it doesn't use the whole range of the joystick properly), and the Arduino works perfectly.

Also, be sure to use the MiSTer menu to configure the joystick before using it in the core, and use the input tester utility to test it out. Also, you will probably need to use the Core menu to configure the joystick as well. After this is done, it should work with ao486. You should not need an older joystick.
Kuro Houou
Posts: 30
Joined: Sun Oct 17, 2021 11:28 am
Been thanked: 19 times

Re: It’s 2022, What’s the Current State of Joystick Support?

Unread post by Kuro Houou »

I'll have to give Wing Commander a try. One weird thing I noticed in Decent was when in tried to use a gamepad, only X would work, but in the configuration section of the game I could press up (for Y) on the gamepad and it registered. However I couldn't actually move up and down when in game... But if I opened the mister menu moving up and down then inputed up and down and my ship moved in the Y axis.. it was so weird...

Also when setting up a Joystick in the initial Mister configuration, do you assign the X/Y axis to the digital up/down/left/right buttons? Or do you asking it to the left and right stick? Or at the very end I think it asks for the X axis... Want to make sure I'm setting it up right.

Last the keyboard remapper is great like you said to use more buttons on the joystick! I was able to use that. Just need to get these axis working...

Also any luck with throttle? Or is that just something that won't work in DOS.. I remember using it in Mech Warrior 2 back in the day on the original Sidewinder joystick.
thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: It’s 2022, What’s the Current State of Joystick Support?

Unread post by thorr »

I didn't get the throttle or rudders to work. Everything else worked. I played with configuring a bunch of times and if memory serves, I did the following:
At the very beginning, when it asks to move, I use the analog stick. I hit spacebar for the second joystick question (from what I recall).
Once it starts asking for gamepad directions, I used the hat on the joystick.
Eventually it asks for Analog X and Y and I used the analog stick for that.

Test everything with the Input Tester utility. You can get to the analog testing screen by holding down select or menu or something, (can't remember, but it tells you on the screen).

I haven't tried Descent in awhile, but I think there may be a Calibrate Joystick option in the menu somewhere.

Also, sometimes it seems that the joystick is intermittently detected (or not). Pressing a button on the joystick while in DOS might help before starting the game. Not really sure.
Kuro Houou
Posts: 30
Joined: Sun Oct 17, 2021 11:28 am
Been thanked: 19 times

Re: It’s 2022, What’s the Current State of Joystick Support?

Unread post by Kuro Houou »

So I tried to calibrate my TM T16000 stick and the new CH Flight Stick Pro (with a gamepad to usb adapter). Neither ended up working out, I couldn't get them setup in the Mister joystick setup. The TM could never map the Y axis it seems, and X was never quite right, the buttons mapped ok though. The CH Flight Stick was even worse, I couldn't map any axis and the buttons couldn't map either, however it was weird as I could push a button and it would cause and up/down movement on the screen so it clearly was sending a signal. Also the hat could map, but was mapped oddly as multiple direction inputs vs just up/down/left/right. So it seems like until I can at least find a joystick that works with the Mister I won't have any luck in the actual games either...

I guess it goes back to my original question.. what joysticks work best with the Mister? What have people had good success with out of the box? It seems like support for Joysticks is still lacking :(
thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: It’s 2022, What’s the Current State of Joystick Support?

Unread post by thorr »

My Thrustmaster has a couple of different Axis modes that can be configured in Windows. If you have this, you might try a different mode. I am not surprised the CH Flight Stick Pro with USB adapter is giving you problems. The problem there is the USB adapter most likely. You should be able to get the Thrustmaster to work. You could try a gamepad or Xbox/PS controller as well to see if you can get anything to work.
Kuro Houou
Posts: 30
Joined: Sun Oct 17, 2021 11:28 am
Been thanked: 19 times

Re: It’s 2022, What’s the Current State of Joystick Support?

Unread post by Kuro Houou »

For the Thrustmaster, when you configure that in Windows does it save it to the device? Just wondering how that translates to the Mister as its obviously linux not windows.. But if you have it set to a specific setting let me know and ill see if I can try the same. I may try a gamepad and try assigning their analog sticks to the joystick axis. obviously not the same as a joystick but better then nothing as I try to find a joystick that works out of the box ;) maybe I should look for joysticks with good linux support first...
thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: It’s 2022, What’s the Current State of Joystick Support?

Unread post by thorr »

I don't know if it saves it to the device, but I am guessing that it does. At least it remembers it in Windows. I don't recall which mode I am using, but I would try them both, and definitely try using another device like a gamepad.
Beeble
Posts: 99
Joined: Sun May 24, 2020 9:04 pm
Has thanked: 17 times
Been thanked: 12 times

Re: It’s 2022, What’s the Current State of Joystick Support?

Unread post by Beeble »

Wing Commander III Joystick Support seems still broken
bbond007
Top Contributor
Posts: 531
Joined: Tue May 26, 2020 5:06 am
Has thanked: 87 times
Been thanked: 211 times

Re: It’s 2022, What’s the Current State of Joystick Support?

Unread post by bbond007 »

There is a bug (or quirk?) in the core in that If you don't move the joystick after boot, joystick detection routines will time out...

Example joystick code (Borland Turbo Pascal):

Code: Select all

function JoystickPosition(axisnum : byte) : word;
var count : word;
begin
  asm
    mov word ptr count, 0
    cli          { Disable interrupts so they don't interfere with timing }
    mov dx, JOYSTICKPORT   { Write dummy byte to joystick port }
    out dx, al
    @joystickloop:
    inc count              { Add one to count }
    cmp count, $FFFF       { Check for time out }
    je @done
    in al, dx              { Get joystick port value }
    and al, axisnum        { Test the appropriate bit }
    jne @joystickloop
    @done:
    sti                    { Enable interrupts again }
  end;
  JoystickPosition := count;
end;
On MiSTer ao486 core, this routine returns 0xFFFF if the joystick has never been moved after cold boot and some programs will assume no joystick is connected or the X & Y axis's are in there maximum position in this situation.

AFIK this is the only way to determine a joystick is present on PC.

The original PC joystick interface is an abomination, designed with absolute minimum cost in mind - not performance as the CPU is busy looping waiting for a capacitor to discharge. This is why pressing the old "Turbo" button royally screwed up the joystick calibration.
hainer92
Posts: 10
Joined: Wed Jun 01, 2022 8:03 pm
Has thanked: 4 times
Been thanked: 1 time

Re: It’s 2022, What’s the Current State of Joystick Support?

Unread post by hainer92 »

So what are we saying in conclusion, is picking up a Thrustmaster specifically for this worthwhile?
akeley
Top Contributor
Posts: 1441
Joined: Mon May 25, 2020 7:54 pm
Has thanked: 497 times
Been thanked: 467 times

Re: It’s 2022, What’s the Current State of Joystick Support?

Unread post by akeley »

bbond007 wrote: Wed Jan 12, 2022 1:22 am There is a bug (or quirk?) in the core in that If you don't move the joystick after boot, joystick detection routines will time out...
Wait...I missed that trick. Do you mean move the joystick (in my case analog stick on Dusalshock) after the core reset, or MiSTer cold boot in general?

I really would love to be able to use it in more PC games, but so far it's really hit and miss, with more of the latter. Been pondering it in Wing Commander yesterday, for example, the mice works (sort of, it's kinda floaty) but the joystick doesn't. Will try this method right now...

CRT SCR$ Project - building a collection of high-quality photos of CRT displays
CRT ART Books - retro-gaming books with authentic CRT photos

bbond007
Top Contributor
Posts: 531
Joined: Tue May 26, 2020 5:06 am
Has thanked: 87 times
Been thanked: 211 times

Re: It’s 2022, What’s the Current State of Joystick Support?

Unread post by bbond007 »

akeley wrote: Tue Jun 21, 2022 7:54 pm
bbond007 wrote: Wed Jan 12, 2022 1:22 am There is a bug (or quirk?) in the core in that If you don't move the joystick after boot, joystick detection routines will time out...
Wait...I missed that trick. Do you mean move the joystick (in my case analog stick on Dusalshock) after the core reset, or MiSTer cold boot in general?

I really would love to be able to use it in more PC games, but so far it's really hit and miss, with more of the latter. Been pondering it in Wing Commander yesterday, for example, the mice works (sort of, it's kinda floaty) but the joystick doesn't. Will try this method right now...
I discussed this behavior with Kitrinx quite a while ago, and she quickly pointed me at the right bits of code to make the joystick always appear.

I think the original intent of the code perhaps was to prevent users with no joystick present from getting stuck because the game demands that they use (or perhaps just calibrate) the controller.

For the past few months I have been testing test builds of ao486 with this behavior disabled. In in addition to myself, Flynnsbit (and perhaps others) have been testing these builds.

I think we both concur that so far this change is only beneficial. Still, the DOS library is huge ( + joystick hardware implementation on the PC is terrible), and If it eventually it is found to break something, then an OSD option will be needed to truly disable the joystick.

Anyway, here are the fix details for the curious --> https://github.com/MiSTer-devel/ao486_M ... c5d185af30

.rbf --> https://github.com/MiSTer-unstable-nigh ... 177a73.rbf
thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: It’s 2022, What’s the Current State of Joystick Support?

Unread post by thorr »

akeley wrote: Tue Jun 21, 2022 7:54 pm
bbond007 wrote: Wed Jan 12, 2022 1:22 am There is a bug (or quirk?) in the core in that If you don't move the joystick after boot, joystick detection routines will time out...
Wait...I missed that trick. Do you mean move the joystick (in my case analog stick on Dusalshock) after the core reset, or MiSTer cold boot in general?

I really would love to be able to use it in more PC games, but so far it's really hit and miss, with more of the latter. Been pondering it in Wing Commander yesterday, for example, the mice works (sort of, it's kinda floaty) but the joystick doesn't. Will try this method right now...
To get Wing Commander working:
Hit Ctrl-J at the first screen where it says Start a Campaign, Continue a Campaign, etc. to get it to use the joystick.

With any game using the old way with ao486, you need to use the joystick in DOS before launching the game and it should work. I am looking forward to trying the new way!
akeley
Top Contributor
Posts: 1441
Joined: Mon May 25, 2020 7:54 pm
Has thanked: 497 times
Been thanked: 467 times

Re: It’s 2022, What’s the Current State of Joystick Support?

Unread post by akeley »

The links work, I've just downloaded that .rbf

Been trying it out and it does seem to make a difference in some cases, but I also had a lot of hard time trying to get it to work properly in general - but it's hard to say why, seeing as there are so many factors involved. I've just seen there was a "Add option to disable joysticks" change made to the core yesterday, so hopefully a new official release will appear soon. Will put the testing on hold till then.

CRT SCR$ Project - building a collection of high-quality photos of CRT displays
CRT ART Books - retro-gaming books with authentic CRT photos

anderse77
Posts: 58
Joined: Thu Jul 14, 2022 2:20 pm

Re: It’s 2022, What’s the Current State of Joystick Support?

Unread post by anderse77 »

I try to understand this thread. Does the thrustmaster t.16000 wotk or not on ao486? Is the flight hotas 4 a better choice? I want to play wing commander and x-wing (Maybe finally finishing this challenging and IMAO great game)
thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: It’s 2022, What’s the Current State of Joystick Support?

Unread post by thorr »

anderse77 wrote: Mon Sep 12, 2022 11:37 am I try to understand this thread. Does the thrustmaster t.16000 wotk or not on ao486? Is the flight hotas 4 a better choice? I want to play wing commander and x-wing (Maybe finally finishing this challenging and IMAO great game)
Try it and see. See my post above about how to get it to work with Wing Commander. I would say, "yeah, it should work" but it may not due to not being recognized at the driver level on the Linux side. This was the case with my Logitech G25 wheel until it was added to the Linux Kernel.
akeley
Top Contributor
Posts: 1441
Joined: Mon May 25, 2020 7:54 pm
Has thanked: 497 times
Been thanked: 467 times

Re: It’s 2022, What’s the Current State of Joystick Support?

Unread post by akeley »

There was an update to ao yesterday, with "disable the joystick" option added, amongst other things. Wonder if that bug/quirk where you have to move the joystick for it to be detected after boot is still there? I'm away from my MiSTer setup for the time being so can't check it myself.

CRT SCR$ Project - building a collection of high-quality photos of CRT displays
CRT ART Books - retro-gaming books with authentic CRT photos

thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: It’s 2022, What’s the Current State of Joystick Support?

Unread post by thorr »

Just a note to self for future reference and to anyone with a Playstation PS3/PS4 Thrustmaster Hotas 4 joystick, in order to get the throttle and other extra axes to work, hold down the PS, Share and Options button when plugging in the USB cable. The light will be green instead of red. Now I can play all my favorite games and the throttle will work. :-) Edit: Just spent some time with it, and this joystick is absolutely brilliant for the Playstation Core, and most likely AO486 which I haven't tested yet. I played Wing Commander IV and it was made for this game. Also, I can finally play Moto Racer and control it much more precisely and not end up in last place all the time when racing. I just wish all the Playstation games worked in analog mode. Many that should don't, such as Star Wars Rebel Assault I and II, but I can play those in AO486.

Post Reply