Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Getting Ultimarc Ultrastik 360 Joysticks to work on RetroPie 4.5.1  (Read 10944 times)

0 Members and 1 Guest are viewing this topic.

cg_tophat

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 4
  • Last login:May 26, 2020, 12:23:43 pm
  • I want to build my own arcade controls!
First time poster and first time cab builder, so apologies if I'm asking a stupid new question. I've done a bunch of pre-research (that I'm linking below) before posting here. I'm also going to try to give more details so if some other poor fool with the same problem comes looking hopefully this thread is a collection of research/answers. I'm running:

RPI3B+
Official RetroPie 4.5.1 image
Ultimarc IPAC Ultimate I/O Board
4x Ultimarc Ultrastik 360
Current layout is 4 player, 6 buttons playable, 1 start, 1 coin (total 8 x 4, all ultimarc RGB goldleaf)

I bought the above under the impression that the Ultimarc inputs all worked fine in Linux (which they technically do - and they are so far great products), but I'm hitting the problem a lot of people in this, and other subs, seem to hit which is that EmulationStation requires that the input device (the joystick) have a button to be detected. I've considered just rigging a button to the Joystick, but then I would lose the nerd cred of having it light up through the Ultimate I/O board which my vanity will not allow me to forgo at this point.

In tackling the issue I needed to establish a few things: 1) Does the Joystick work? 2) Does the RPI3B+ detect the Joystick at all? 3) Can I remap EmulationStation key mappings outside EmulationStation and then log back in with the working setup? 4) Am I thinking about the problem incorrectly? 5) Should I just pursue a windows box?

1) Does the Joystick work?
Yes. I plugged it in to a windows machine which detected it happily.

2) Does the RPI3B+ detect the Joystick at all?
Yes (short answer).
I found this post from the group:

https://www.reddit.com/r/RetroPie/comments/7g4g9o/ultrastik_360_config_for_emulation_station/?utm_source=amp&utm_medium=&utm_content=post_body
This link notes the same set of issues and asks if the Joystick is detect. jstest will detect joysticks. Tested via jstest. Shows up with the name "Ultimarc Ultra Stik Ultimarc Ultra-Stik Player 1".

Embedded in the comments is a note about potentially being able to alter the es_config file to point to the JoystickAlso - followed the link in the post to find the GUID and installed jstest-sld (which allows you to get the GUID for the joystick):

https://retropie.org.uk/forum/topic/14661/beboncool-controller-bluetooth-issues/5

I got my GUID and the name.



3) Can I remap EmulationStation key mappings outside EmulationStation and then log back in with the working setup?

So in the same reddit thread above the following note is made:

columboscoat3 points·2 years ago·edited 2 years ago
Yeah easy enough to do. The only thing you will struggle to get is the GUIDfor the joystick. Install this little script that u/mitu has linked and it will give you all the info you need. https://retropie.org.uk/forum/topic/14661/beboncool-controller-bluetooth-issues/5
So your entry will look something like this.<inputConfig type="joystick" deviceName="NAME EXACTLY AS IT APPEARS" deviceGUID="YOUR DEVICE GUID"><input name="up" type="hat" id="0" value="1"/><input name="down" type="hat" id="0" value="4"/><input name="left" type="hat" id="0" value="8"/><input name="right" type="hat" id="0" value="2"/></inputConfig>

So, this is the real crux of my issue - can I have multiple inputConfigs in the es_input.cfg?
Something like (pseudocode since I'm kind of making this up as I go):
<inputConfig type="keyboard" deviceName="keyboard" deviceGUID="-1">
<input name="button1" type="key" id="0" value="0"/>
<input name="button2" type="key" id="0" value="0"/>
<input name="button3" type="key" id="0" value="0"/>
<input name="button4" type="key" id="0" value="0"/>
<inputConfig type="joystick" deviceName="NAME EXACTLY AS IT APPEARS" deviceGUID="YOUR DEVICE GUID">
<input name="up" type="hat" id="0" value="1"/>
<input name="down" type="hat" id="0" value="4"/>
<input name="left" type="hat" id="0" value="8"/>
<input name="right" type="hat" id="0" value="2"/>
</inputConfig>

And if I do have multiple inputConfigs can I - load up RetroPie, bind to a normal keyboard, then go to the command line and hand edit the cfg to recognize the Joystick and the Ultimarc (as I'm writing this I just realized that I don't know anything about the Ultimarc's GUID or input information)? Does that work?

4) Am I thinking about the problem incorrectly?
More of a philosophical question, but am I overthinking this?

5) Should I just pursue a Windows box?
Sigh.

Thank you everyone that takes a look at this thread. I've really tried to do my diligence on it and have spent the last two days digging through old forum posts from the past 4 years. This is the best line that I currently have on it. Any advice would be very well appreciated. Thank you in advance!!!

J_K_M_A_N

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 983
  • Last login:Yesterday at 09:42:09 pm
Re: Getting Ultimarc Ultrastik 360 Joysticks to work on RetroPie 4.5.1
« Reply #1 on: April 21, 2020, 05:28:11 pm »
It has been a while since I messed with mine but if I am remembering correctly, I set up a "joystick" using the keyboard on first start up. I like to always be able to control emulationstation with the keyboard if needed. Then I think you can hook one button up to the U360 and get it set up (mostly just the directions). Then add another joystick using the IPAC and just set up the buttons without any directions set up. Then you should be able to use the U360 to navigate and the buttons to select a game or go back or whatever.

Again, it has been a while but I *think* that would work as I am pretty sure you can have multiple controllers control emulationstation.

J_K_M_A_N

cg_tophat

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 4
  • Last login:May 26, 2020, 12:23:43 pm
  • I want to build my own arcade controls!
Re: Getting Ultimarc Ultrastik 360 Joysticks to work on RetroPie 4.5.1
« Reply #2 on: April 21, 2020, 05:28:49 pm »
Part of me is wondering if I just need to set the Ultrastik to Output mode, with the USB in?

cg_tophat

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 4
  • Last login:May 26, 2020, 12:23:43 pm
  • I want to build my own arcade controls!
Re: Getting Ultimarc Ultrastik 360 Joysticks to work on RetroPie 4.5.1
« Reply #3 on: April 21, 2020, 05:30:34 pm »
It has been a while since I messed with mine but if I am remembering correctly, I set up a "joystick" using the keyboard on first start up. I like to always be able to control emulationstation with the keyboard if needed. Then I think you can hook one button up to the U360 and get it set up (mostly just the directions). Then add another joystick using the IPAC and just set up the buttons without any directions set up. Then you should be able to use the U360 to navigate and the buttons to select a game or go back or whatever.

Again, it has been a while but I *think* that would work as I am pretty sure you can have multiple controllers control emulationstation.

J_K_M_A_N

I've got the RGB buttons. Does that not mess up the LED controls on the IPAC Ultimate (sorry for my lack of knowledge here)

J_K_M_A_N

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 983
  • Last login:Yesterday at 09:42:09 pm
Re: Getting Ultimarc Ultrastik 360 Joysticks to work on RetroPie 4.5.1
« Reply #4 on: April 21, 2020, 05:36:39 pm »
Sorry. I forgot, I used the USB connection in Input mode so it is its own joystick. I forget that it can connect to an ipac in output mode. :( USB was easier for me. I also used the buttons in input mode since mine was just a bartop with not a lot of buttons needed. I also don't have RGB buttons so I am not sure how it might affect those.

J_K_M_A_N

cg_tophat

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 4
  • Last login:May 26, 2020, 12:23:43 pm
  • I want to build my own arcade controls!
Re: Getting Ultimarc Ultrastik 360 Joysticks to work on RetroPie 4.5.1
« Reply #5 on: April 21, 2020, 05:49:20 pm »
Sorry. I forgot, I used the USB connection in Input mode so it is its own joystick. I forget that it can connect to an ipac in output mode. :( USB was easier for me. I also used the buttons in input mode since mine was just a bartop with not a lot of buttons needed. I also don't have RGB buttons so I am not sure how it might affect those.

J_K_M_A_N

Thanks. Yeah - it looks like I'm going to go input mode on this bad boy. It stinks to do the work - but glad there's a solution?

DJO_Maverick

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 58
  • Last login:October 04, 2023, 07:39:02 pm
  • Chrono Crosser
Re: Getting Ultimarc Ultrastik 360 Joysticks to work on RetroPie 4.5.1
« Reply #6 on: May 07, 2020, 10:52:10 pm »
This gave me fits when I was getting set up, I had to piece the info together from multiple places as well.  You should definitely use the 360 in input mode, connected by USB, so you can take advantage of the buttons and remapping feature.  Also, this is easier if you have the Pi set up to just samba into with Notepad+ from a PC.  Also, this is assuming you're wanting to use buttons hooked up through the IPAC; last step might be slightly different if chained through the U360 itself.

First, I'd advise plugging in a real gamepad initially just as a crutch to get past the initial setup screens and to navigate the UI.  This will also ensure there's a populated es_input.cfg you can follow (and yes, you can have multiple inputs in that).  THEN you can pursue the real fix, which is obscure, but not hard.  Getting the GUID was the hard part.  At one point in your post it said you had your GUID, then another it said you didn't know the GUID of the U360; if you don't, I can probably help you there too.

First: If you didn't already, if you have multiple U360s, make sure you plug them into a Windows box with that software to change their internal IDs to different numbers.  Make sure the one you want to primarily use is set to Stick 1 ID.

Second: Go to retropie\configs\all\retroarch-joypads

If it does not exist yet, create a file called "Ultimarc UltraStik Ultimarc Ultra-Stik Player 1.cfg"
Contents will be:
input_device = "Ultimarc UltraStik Ultimarc Ultra-Stik Player 1"
input_driver = "udev"
input_up_axis = "-1"
input_down_axis = "+1"
input_right_axis = "+0"
input_left_axis = "-0"

Rinse and repeat for any additional 360s, changing the player number to match their IDs.

Third: Open retropie\configs\all\emulationstation\es_input.cfg

Add:
  <inputConfig type="joystick" deviceName="Ultimarc UltraStik Ultimarc Ultra-Stik Player 1" deviceGUID="YOURGUID">
    <input name="up" type="axis" id="1" value="-1"/>
    <input name="down" type="axis" id="1" value="1"/>
    <input name="left" type="axis" id="0" value="-1"/>
    <input name="right" type="axis" id="0" value="1"/>
  </inputConfig>

With YOURGUID replaced as appropriate; again, rinse and repeat for any other U360s.  Based on what I've seen, the P1 stick is very likely 0300000009d200001105000011010000.  Then ALSO add:

  <inputConfig type="keyboard" deviceName="Keyboard">
    <input name="a" type="key" id="13" value="1"/>
    <input name="b" type="key" id="27" value="1"/>
    <input name="y" type="key" id="54" value="1"/>
    <input name="x" type="key" id="50" value="1"/>
    <input name="start" type="key" id="9" value="1"/>
    <input name="select" type="key" id="112" value="1"/>
  </inputConfig>

Doing this will map A to Enter, B to Escape, Y to 6, X to 2, Start to Tab, and Select to F1.  I did it this way to match the system buttons on my CP ('Launch' to Enter, 'Exit' to Escape, 'Menu' to Tab, etc), but you can assign those buttons to any keyboard keys you want.  You can look up key IDs at https://www.cambiaresearch.com/articles/15/javascript-char-codes-key-codes

Finally, you can delete the block that has to do with the gamepad from the file before you save it, then unplug it and restart.  You should then be able to navigate ES with the 360 and use your CP buttons.

My build uses similar parts and is also on a 3B+, and it will work great when you're done with it; this was definitely one of the more obnoxious parts of setup.

Owillingham

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
  • Last login:July 06, 2021, 09:59:29 am
  • I want to build my own arcade controls!
Re: Getting Ultimarc Ultrastik 360 Joysticks to work on RetroPie 4.5.1
« Reply #7 on: July 06, 2021, 09:52:27 am »
This gave me fits when I was getting set up, I had to piece the info together from multiple places as well.  You should definitely use the 360 in input mode, connected by USB, so you can take advantage of the buttons and remapping feature.  Also, this is easier if you have the Pi set up to just samba into with Notepad+ from a PC.  Also, this is assuming you're wanting to use buttons hooked up through the IPAC; last step might be slightly different if chained through the U360 itself.

First, I'd advise plugging in a real gamepad initially just as a crutch to get past the initial setup screens and to navigate the UI.  This will also ensure there's a populated es_input.cfg you can follow (and yes, you can have multiple inputs in that).  THEN you can pursue the real fix, which is obscure, but not hard.  Getting the GUID was the hard part.  At one point in your post it said you had your GUID, then another it said you didn't know the GUID of the U360; if you don't, I can probably help you there too.

First: If you didn't already, if you have multiple U360s, make sure you plug them into a Windows box with that software to change their internal IDs to different numbers.  Make sure the one you want to primarily use is set to Stick 1 ID.

Second: Go to retropie\configs\all\retroarch-joypads

If it does not exist yet, create a file called "Ultimarc UltraStik Ultimarc Ultra-Stik Player 1.cfg"
Contents will be:
input_device = "Ultimarc UltraStik Ultimarc Ultra-Stik Player 1"
input_driver = "udev"
input_up_axis = "-1"
input_down_axis = "+1"
input_right_axis = "+0"
input_left_axis = "-0"

Rinse and repeat for any additional 360s, changing the player number to match their IDs.

Third: Open retropie\configs\all\emulationstation\es_input.cfg

Add:
  <inputConfig type="joystick" deviceName="Ultimarc UltraStik Ultimarc Ultra-Stik Player 1" deviceGUID="YOURGUID">
    <input name="up" type="axis" id="1" value="-1"/>
    <input name="down" type="axis" id="1" value="1"/>
    <input name="left" type="axis" id="0" value="-1"/>
    <input name="right" type="axis" id="0" value="1"/>
  </inputConfig>

With YOURGUID replaced as appropriate; again, rinse and repeat for any other U360s.  Based on what I've seen, the P1 stick is very likely 0300000009d200001105000011010000.  Then ALSO add:

  <inputConfig type="keyboard" deviceName="Keyboard">
    <input name="a" type="key" id="13" value="1"/>
    <input name="b" type="key" id="27" value="1"/>
    <input name="y" type="key" id="54" value="1"/>
    <input name="x" type="key" id="50" value="1"/>
    <input name="start" type="key" id="9" value="1"/>
    <input name="select" type="key" id="112" value="1"/>
  </inputConfig>

Doing this will map A to Enter, B to Escape, Y to 6, X to 2, Start to Tab, and Select to F1.  I did it this way to match the system buttons on my CP ('Launch' to Enter, 'Exit' to Escape, 'Menu' to Tab, etc), but you can assign those buttons to any keyboard keys you want.  You can look up key IDs at https://www.cambiaresearch.com/articles/15/javascript-char-codes-key-codes

Finally, you can delete the block that has to do with the gamepad from the file before you save it, then unplug it and restart.  You should then be able to navigate ES with the 360 and use your CP buttons.

My build uses similar parts and is also on a 3B+, and it will work great when you're done with it; this was definitely one of the more obnoxious parts of setup.


I'm looking to buy an ultrastik for player 1 so that it can be configured for both 4way and 8way games, but also on a 45 degree slant for games like q-bert and congo-bongo.  Before I buy one, can you explain how to set the rpi to autmatically change the joystik mappings for whicher game type needed (eg to automatically switch from 8way after playing street fighter to 4way 45degree slant when launching q-bert) as I can't find this info anywhere for rpi and its a lot of money to spend on something I can't configure correctly.  Thanks