The NEW Build Your Own Arcade Controls

Main => Raspberry Pi & Dev Board => Topic started by: ugleymatt on January 17, 2017, 08:54:19 pm

Title: Does the Ultrastik 360 work with a Pi?
Post by: ugleymatt on January 17, 2017, 08:54:19 pm
Hiya,

Newbie alert.

I'm in the planning stages of a Pi Powered 2 player bartop and looking at control options. I want to use leaf controls to keep the noise to a minimum and like the idea of the ultrastik 360 for the auto switching. Question is though, does this work correctly with Retropie?
Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: mahuti on January 18, 2017, 02:49:29 am
It works great out of the box, and the button harness works great too. HOWEVER, it's a bit of a pain to set up auto-switching. There is some software out there that will do it on linux, but I've yet to get it to work automatically when running  out of attract mode. Though it works in a straight up command-line operation, when run from a front end, I'm having no luck yet. I believe the software is called ultrastikcmd. If you have any problem getting it, or getting it installed, I can give you links. When using the info I have saved, it's pretty simple to install via command-line on the pi. 

That said, I'm personally working on auto-switching from time to time. It's a key component of my future plans, so sooner or later it will be done. If I have to, I'll write my own utility in python. It would probably end up being easier than messing around with ultrastikcmd... sigh.

In the short run though, I think your success with the auto-switching will be hit or miss.
Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: ugleymatt on January 18, 2017, 07:07:40 am
Hmmm thats annoying as the auto switching is a main draw.

So in terms of wiring up buttons etc, do you just do it to the sticks and bypass using the GPIO connectors?

If so then i guess that is a good reason to still consider them.
Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: mahuti on January 18, 2017, 11:50:19 am
I'm not a huge fan of the GPIO when a joystick or keyboard encoder works so well, and the joystick encoders are really cheap these days ($11 or so) And the Ultrastik comes with enough to wire up like... 8 buttons I think. Something like that. More than enough for my simple setups.

But yeah, the dynamic thing is a bit annoying. But I'll get it figured out yet. The hardest part is that I can't find a good way to get an error log related to failures with the process so that's made it difficult to sort out the problems. I think I'm almost there. It's getting more traction with other devs now too, so I'm optimistic.
Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: ugleymatt on January 19, 2017, 07:06:59 am
Well as long as its activitly being worked on thats great. Hopefully if i do go down that route i can contribute in some way.
Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: ugleymatt on March 23, 2017, 07:19:40 pm
I'm not a huge fan of the GPIO when a joystick or keyboard encoder works so well, and the joystick encoders are really cheap these days ($11 or so) And the Ultrastik comes with enough to wire up like... 8 buttons I think. Something like that. More than enough for my simple setups.

But yeah, the dynamic thing is a bit annoying. But I'll get it figured out yet. The hardest part is that I can't find a good way to get an error log related to failures with the process so that's made it difficult to sort out the problems. I think I'm almost there. It's getting more traction with other devs now too, so I'm optimistic.

Has there been any progress on this? About to pull the trigger on getting the u360 sticks...
Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: mahuti on March 24, 2017, 12:56:11 am
Why YES there has!  Gijsbrecht added the feature to RGBcommander .4. I did lots of testing and it works great!

Download it here: http://users.telenet.be/rgbcommander/ (http://users.telenet.be/rgbcommander/)

Basically that software will try to auto switch between 8 and 4 way. But you can change the joystick mode on a per-rom basis. So I have qbert and Congo bong and zaxxon sinistar... all set up to use diagonals or full analog or whatever. Works awesome
Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: ugleymatt on March 24, 2017, 05:09:01 am
Why YES there has!  Gijsbrecht added the feature to RGBcommander .4. I did lots of testing and it works great!

Download it here: http://users.telenet.be/rgbcommander/ (http://users.telenet.be/rgbcommander/)

Basically that software will try to auto switch between 8 and 4 way. But you can change the joystick mode on a per-rom basis. So I have qbert and Congo bong and zaxxon sinistar... all set up to use diagonals or full analog or whatever. Works awesome

Awesome news!!!

Off to ultimarc i go to place my order for sticks, buttons and work out what else i need to buy to connect it all together.
Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: soonerdoc on April 15, 2017, 12:48:28 pm
Why YES there has!  Gijsbrecht added the feature to RGBcommander .4. I did lots of testing and it works great!

Download it here: http://users.telenet.be/rgbcommander/ (http://users.telenet.be/rgbcommander/)

Basically that software will try to auto switch between 8 and 4 way. But you can change the joystick mode on a per-rom basis. So I have qbert and Congo bong and zaxxon sinistar... all set up to use diagonals or full analog or whatever. Works awesome

I am not great with linux.  I reviewed the RGB Commander website and think I can get the program installed.  Is there a step by step guide anywhere on how to do this and most importantly how to change the joystick mode on a per-rom basis?  So I can just use the 4 way diagonals for qbert, congo bongo, etc.

thank you so much!
Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: mahuti on April 16, 2017, 03:28:15 am
The RGBCommander site has installation instructions, which I'll post here (maybe a little more clearly)

First you have to download the installer and extract it, and then get the installer folder on the PI. If you have trouble with that, let me know. So... assuming the installer is on the pi, you have to use a terminal to navigate to the installer and execute some terminal commands. You can do this directly on the pi in the console, or you can login remotely. I usually login via terminal and execute commands that way. If any of that makes no sense, let me know.

So.... navigate to the installer... wherever you put it. For argument's sake, lets assume it's here in the /home/pi/RGBcommander_0401_beta1_Setup folder

Code: [Select]
cd /home/pi/RGBcommander_0401_beta1_Setup(cd is change directory)

make the installer executable:

Code: [Select]
sudo chmod +x ./setup.sh(sudo sets you temporarily to the root/master user that has all the power over your whole system. chmod changes the permissions on files and folders... in this case making the script executable)

run the installer:

Code: [Select]
sudo ./setup.sh install
So... then it's installed, and you have to edit the configuration file to make it work with your setup. To edit that file:

Code: [Select]
sudo pico /usr/sbin/rgbcommander/rgbcmdd.xml(pico is one of the simplest text editors in linux... others use Nano or Vi. Most retropie docs reference pico or nano. I've never seen much difference for my purposes between the two)



To page down use ctrl+v, to navigate up, ctrl+y. To save, hit ctrl+x and follow the prompts. You can use ctrl+w (where command) to search for something... which is handy to skip to a specific rom. For instance: ctrl+w then type sinistar and hit return. Or ctrl+w then qbert... it'll find the first instance... so you have to hit ctrl+w again a few times to find the rom.

That file has its own docs for configuration. The important parts for starters are probably:

Code: [Select]
<option
portnumber="2724"
led0="P1_START"
led1="P2_START"
led2="P1_BUTTON1"
retroarchbinary="retroarch"
rgbadefault="RANDOM"
activedefault="Orange"
inactivedefault="Black"
frontendbinary="attract"
waydefault="4"
/>

That is the option set for attract mode

And the joystick configuration:

Code: [Select]
<joystick name="U360_1" on="1" hwthrottle="100"/>

On needs to be set to "1"

Then, you'll notice thousands of lines of mame roms. To set the configuration override on a specific rom:

Code: [Select]
<rom id="qbert" way="12">
The options are:

Code: [Select]
   4 4-Way
   8 8-Way
   10 2-Way, Left & Right
   11 2-Way, Up & Down
   12 4-Way, Diagonals Only
   13 4-Way, No Sticky (UD Bias)
   20 8-Way Easy Diagonals
   21 Analog
   22 Mouse Pointer

For the most part I use 12 and 21. 8 way and 4 way are pretty much automatic. Once you've made your changes, you need to restart rgbcommander. You can either reboot the pi, or restart rgbcommander.

Code: [Select]
sudo /etc/init.d/rgbcmdd restart

That's the easy part...

The tricky part is configuring qbert, congo bongo, etc. Even if you have your stick set to 4-way diagonal, Mame isn't expecting it. Originally, the stick was a 4 way stick, rotated... so the directions are up,down,left,right... pressing those directions  on the keyboard and watching qbert go the wrong way made my head spin. So, you have to go into the tab menu. It was a bit annoying to figure out what direction should map to the diagonals... so what I did was:

I mapped up,down,left,right to  A,S,D,F on the keyboard. Then, I pressed A; watched the direction qbert went, and went back in and mapped the A direction to my joystick when I pushed in the diagonal direction that corresponded. Then I did the same with all the other letters. My advmame config file has this:

Code: [Select]
qbert/input_map[p1_left] joystick_digital[0,0,0,1] joystick_digital[0,0,1,1]
qbert/input_map[p1_right] joystick_digital[0,0,0,0] joystick_digital[0,0,1,0]
qbert/input_map[p1_down] joystick_digital[0,0,0,1] joystick_digital[0,0,1,0]
qbert/input_map[p1_up] joystick_digital[0,0,0,0] joystick_digital[0,0,1,1]

You CAN edit that file directly if you want. It's found here:

Code: [Select]
/opt/retropie/configs/mame-advmame/advmame-0.94.0.rc
The rgbcommander configuration is pretty simple for the basics. Configuring Mame for the diagonal games is a little annoying. For the games like sinistar or pigskin, you can probably just set the way=21 and call it a day. Some games may have configurations to change between analog / 8-way controls.

If you're not that great with linux, the above can be a little overwhelming. If you have any problems, please post and I'll do what I can to help you out. I worked with Gijsbrecht on the xml file's documentation, so I've got a pretty good handle on that stuff.

By the way, I attached my rgbcmdd.xml file for reference. It's not a lot different from the default, but it might help if you get stuck. I haven't yet configured more than a few games... qbert, congo bongo, sinister and zaxxon I think.
Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: mahuti on April 16, 2017, 03:57:51 am
By the way, I thought I should mention, if you feel you need to test your stick, here's a good way to go about it:

First, connect to the pi via SSH from another computer. Open up two windows... (two SSH logins) In the first window, you'll use the rgbcommanders test utility, in the second, you'll use linux's joystick tester to see the results of your changes. 

Open up rgbcmdcon in one window... this is a testing app that comes with rgbcommander

Code: [Select]
/usr/sbin/rgbcommander/rgbcmdcon
once that's open, type the ? and you'll get a list of commands.

to set the joystick to a certain mode, type

Code: [Select]
set,stick,21
which sets it to analog.

In the other terminal window

Code: [Select]
jstest /dev/input/js0
then move the joystick around. You'll see the values that are being output. They'll change based on the mode. 4-way only sets values one at a time... analog will change multiple axes values at the same time. You can change the mode in one window, then use  the other window to see what the stick is doing. This isn't something that's needed often, but it can help troubleshoot when nothing seems to be working correctly.  If you are using multiple joysticks, you might have to test js0 or js1 or js2  (example: jstest /dev/input/js1). If you're just using the one joystick it will be js0.
Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: soonerdoc on April 17, 2017, 12:23:59 am
That is amazing. Can't tell you how much appreciate the time it took you to post all that. Thank you.

Seems a little daunting but the way you explained it is pretty clear. Gonna order the stick and give it a try.

Browsing the ultra stick 360 website the windows software seems pretty easy with the GUI. Is the Linux software as easy (for actually mapping the joystick)?
Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: Mike A on April 17, 2017, 04:47:07 am
Mahuti is a helpful dude.
Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: mahuti on April 17, 2017, 09:53:40 am
Code: [Select]
Is the Linux software as easy (for actually mapping the joystick)?
If I recall,  there is no GUI on the linux side. The software was for changing maps and setting modes. But there's no GUI as far as I recall. If you wanna make maps, you have to edit them by hand, or use a Mac or PC. Linux is definitely limited in what It can do with retro emulation compared to the PC

I would be interested to see some of the real world joystick maps that people have created besides the included ones. I'm not saying that there's not another map that could be created, but after having messed with the mapping tool, I haven't bothered to use it again. It would be great to see some other real world uses of that tool.

Code: [Select]
Mahuti is a helpful dude.
I do what I can.  :cheers:
Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: soonerdoc on April 30, 2017, 11:50:10 am
OK.  Another question. 

Got RGB Commander installed.  Seems to be working correctly.  U360 just came back in stock and is on its way.  Looks like all of the maps I would need are preinstalled, so that is good.  Won't have to worry about creating new maps.  Two questions. 

1.  Because I have an 11 button setup, if I use the INPUT mode with the buttons, I would have to sacrifice 3 buttons in my setup.  Can I use my current 2 player Xin-Mo controller with this?  I would want to use the current button connectors on the xin-mo and then connect the U360 to 4 direction connecters to the xin-mo using the optional harness.  I would connect the USB also.  Would this give me the ability to have all 11 buttons AND still use the USB for mapping the joystick (for qbert)?  Or am I going to need to forget about the xin-mo and just use the U360 and its 8 buttons?

2.  I am planning on starting with a single U360 to test it out. Because of the way my control panel is laid out, I am probably going to want the U360 joystick to be on the player TWO control (because it is more centered in relation to the screen for single joystick games like qbert).  So I will keep the xin-mo and its buttons for player one and use the U360 for player two using whatever method works best from my first question.  If this is doable, what changes need to be made in RGBCommander so that it is configured properly and sees that the U360 is player two controller so that it auto switches to the correct maps on a per rom basis?

Hope this made sense.
Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: mahuti on April 30, 2017, 01:10:57 pm
Quote
Can I use my current 2 player Xin-Mo controller with this?

Yes.

Quote
then connect the U360 to 4 direction connecters to the xin-mo using the optional harness.

This is "output" mode. If you want to be able to use the maps, then you have to have both the Ultrastik and the Xin-Mo connected via USB. The only advantage of using it this way is that you only have to configure one controller in EmulationStation. The disadvantage to using them separately is that you'd have to configure both in EmulationStation, and you'd have to configure Mame to map to joystick0 and joystick1, which is a bit more setup.

Quote
Or am I going to need to forget about the xin-mo and just use the U360 and its 8 buttons?

You could combine them, or use them separately. You'd have to have USB hooked up to both though to make the Ultrastik programmable.

Quote
what changes need to be made in RGBCommander so that it is configured properly and sees that the U360 is player two controller so that it auto switches to the correct maps on a per rom basis?

None. It sees the sticks, not the player number. Changing the "way" on a rom, would change it for ALL connected Ultrastiks, not a specific player's mapping.

In my case, I set up each encoder (Ultrastik and Xin-Mo) as separate gamepads in EmulationStation, then I set up the configuration as I want in Mame. The Mame configuration is a bit more time consuming in having to map an additional controller (and if you use AttractMode, you have to configure it how you want too), but overall I like the flexibility of having two discrete controllers for other emulators (like NES). I don't really like EmulationStation's mapping for "alike" controllers (those that have 2 players in one board, or for multiples of the same encoder). I find it limiting. 
Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: soonerdoc on May 04, 2017, 01:46:14 am
I am utterly confused. 

Stick came in today.  Hooked it up onto the player two side of the xinmo control board.  Connected the pins from the u360 to the pins on the xinmo for up, right, down and left.  Only connected those 4 pins and the ground. Connected the USB from the 360 to the pi. 

Turned everything on.  Went to configure in emulation station and it saw 3 gamepads (I assume the 2 player xinmo and the U360).  Said to hold button to configure controller.  Held up on the U360 joystick and it went to the page to assign buttons.  Assigned up, right, down and left using the 360 and for the buttons used the already connected buttons on the xinmo for player 2.  Shutdown the pi and restarted. 

Worked perfectly....for about 5 minutes.  Qbert worked awesome.  Used your method of assigning to keyboard keys and then using that to figure out the direction for the joystick.  Literally worked perfectly. 

Disconnected everything before disassembling my cabinet for the permanent installation.  Connected the U360 to my windows pc and downloaded the software for the pc just to check it out.  Confirmed U360 is assigned to ID number one. 

Disconnected and connected back to the pi.  Nothing.  When going to configure controller in emulation station it still says sees 3 game controllers, however the U360 doesn't do anything in the pi.  No matter what. 

Tried different USB ports on the pi.  Nothing.  Connected using the pins to the xinmo board for both player one and player two. Nothing.  Connected via USB only without using any of the input/output pins.  Nothing.  LED is flashing when joystick is moved but nothing happens on the pi. 

Connected back to windows pc using the USB port and windows sees the controller using the ultramap software and in devices and controller moves the cursor as expected.  Back to pi and again emulation station sees it as a third controller, but moving the joystick does nothing on the pi.  Also did a fresh install of retropie from a backup I made last night prior to messing with anything.  This is the same image of retropie that was used during the original installation of the U360.  Still doesn't work.

Any ideas?  Did connecting it to the pc somehow mess it up so the pi can't see it?  I feel like that has to be the case, because a fresh install of retropie from the previously working backup no longer works.  Something has to have changed in the stick.  Very frustrated, especially after it was working perfectly 10 minutes after hooking it up.
Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: mahuti on May 04, 2017, 02:28:28 am
Sigh... it's always something isn't it? The best advice my dad ever gave me was "son, don't dig too deep". Which.... I've ignored countless times to my constant peril.

Anyway, off the top of my head, I can't think of anything.

That said... do you have any buttons hooked up to the Xin-mo? If I recall, in the past without a button hooked up, I've had trouble configuring gamepads.

The Pi, has a utility (I think it's pre-installed) call jstest.

Look at the list of controllers first. In a console window type:
Code: [Select]
ls /dev/input
The ultrastik may be js0 or js1 or js2 depending on what the Pi sees. There's a method (which I don't remember off the top of my head) that can spit out all the info about configured controls... but the test is fast enough without it to worry about finding the specific designation. You can just test any of the joysticks the Pi sees.

Run a test:
Code: [Select]
jstest /dev/input/js0
Then move the stick around. If you see a bunch of values changing on the Pi, then it sees it. If you don't see any values, you can check the other joysticks listed in the first step (js1, js2, etc). To exit the test, just type ctrl+c which will cancel out of the test. Then you can run it on a different one. Start with that. I'll ponder on anything else I can think of. It's probably something simple. Check the ultimarc installation instructions too.. there might be something in there.

Also, were it me, I'd reduce all the variables to the minimum. I'd hook up the Ultrastik by itself using its own USB connection, and hook up one button to it. That will allow you to check and see that it CAN be configured standalone in EmulationStation.
Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: soonerdoc on May 04, 2017, 11:19:47 am
Thanks.

Got to be too late last night to troubleshoot it anymore last night.  Will work on it after work today. 

Did have the buttons hooked to the xinmo.  Did try the ultrastick by itself without the xinmo. 

When I get home I am going to try the jstest and see what happens.  I think I will also pull the xinmo out of the cab and connect it all to windows to make sure the u360 is working when connected to the xinmo on my PC (I think this will help eliminate any cabling issues that could be causing a problem).




Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: soonerdoc on May 04, 2017, 07:46:41 pm
Definitely something wrong with the controller.  I think there is a short or something in the input/output port.  Nothing using the I/O port works in either mode with buttons or directly connected to a controller board on the pi or on windows pc.

USB mode only works on windows (moving the stick registers a movement).  When connected to the pi using only the USB port, when using the jstest command the x and y axis values are stuck at 32000 something (forgot the exact number) and don't move with any joystick movement.  When testing the jtest command with my xinmo original controllers those values are 0 and change to the 32000 number with joystick movement. Also the LED on the joystick doesn't light at all in the leftward direction. 

Think I am gonna have to RMA the controller.
Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: mahuti on May 04, 2017, 11:22:27 pm
I'd definitely get in touch with Andy at Ultimarc. He might be able to provide some insight.
Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: soonerdoc on May 22, 2017, 09:02:41 pm
Well, after troubleshooting the stick for two weeks Andy finally sent me a new controller board and what do you know. Stick works!  The I/O port on the first stick was bad.

Next question. Everything is working well, but I am not in love with how much throw there is on the stick. Are you using a restrictor plate?  I have an extra Santa 8 way restriictor lying around. I also ordered the "stiffer" spring from ultimarc.

If you do use a restrictor do you have to hook up stick to PC and set the setting on PC to tell the stick you are using the restrictor plate?  If so, do you just connect back to the Raspberry Pi and the stick knows the restrictor is attached?
Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: ZoOl007 on May 23, 2017, 03:22:21 am
No, the maps I use have their restrictor off and there is no option to switch them on. I could add that in the next incremental update.
Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: soonerdoc on May 23, 2017, 07:06:01 pm
No, the maps I use have their restrictor off and there is no option to switch them on. I could add that in the next incremental update.

Thanks for prompt reply!
Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: ZoOl007 on May 26, 2017, 07:08:48 am
Hi,

I uploaded 0.4.0.3 beta1. It contains restrictor support for U360's.
The documentation is in the xml file. Be sure to read the change log. It contains important information concerning the process monitoring that could impact pre 0.4.0.3 beta1 users.
No big deal, just important.

kind regards.
Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: soonerdoc on May 28, 2017, 09:25:56 pm
Hi,

I uploaded 0.4.0.3 beta1. It contains restrictor support for U360's.
The documentation is in the xml file. Be sure to read the change log. It contains important information concerning the process monitoring that could impact pre 0.4.0.3 beta1 users.
No big deal, just important.

kind regards.

You all are amazing.  Uninstalled 0.4.0.1 that I had on there and installed 0.4.0.3.  Qbert still seems to be working well.  Getting a second stick and restrictor plates on tuesday and will get them installed.

Was a little confused about the process monitoring regarding emulation station.  Everything seems to be working correctly.  Is there anything I am supposed to be doing extra with 0.4.0.3 regarding the discussion in the .xml file about it recognizing emulationstation vs. emulationstatio ?

Thanks again for all your help.
Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: ZoOl007 on May 29, 2017, 03:20:02 am
 Is there anything I am supposed to be doing extra with 0.4.0.3 regarding the discussion in the .xml file about it recognizing emulationstation vs. emulationstatio

-> No. I adapted the xml accordingly in advance. I just wrote that to emphasize the fact that the process monitoring sees (a minority of) processes differently than before and 'emulationstation' just happens to be one of those processes.
Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: soonerdoc on June 04, 2017, 11:51:00 pm
Still getting this tweaked, but have a question.  Everytime I am finished and go to shutdown system option, when system shuts down a message pops up that says:

"A stop job is running for RGBcommander arcade led and joystick daemon" with a 1min 30s timer.

Do I need to wait the minute and a half when shutting down everytime?  Don't want to corrupt the memory card or something.

Thanks
Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: ZoOl007 on June 05, 2017, 08:31:07 am
No you don't have to wait. I am not sure what happens. I had the same from time to time when I used the init.d system. that's why 0.4.0.3 beta1 doesn't use that any more so it should not happen I guess.
Maybe something has been left over from the 0.4.0.1 beta1 you were using...

open a root prompt and type 'update-rc.d rgbcmdd remove' - that should get rid of the old system should it still be in place... you always have to deinstall - you shouldn't just install a new release over an existing one atm (should you have done that)

it is also safe to remove the automatically generated rgbcmdd.service file should it still exist (systemd acts as a wrapper around old init.d scripts and created the rgbcmdd.service file without the user knowing).
You can search for it by 'find / -name rgbcmdd.service'

0.4.0.3 beta1 uses systemd now so the following commands should give you some insight and they should respond correctly :
systemctl -l status rgbcommander.service
systemctl -l start rgbcommander.service
systemctl -l stop rgbcommander.service

see if this helps you any furhter
Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: brett4got on August 08, 2017, 11:06:21 pm
Hoping someone can help me identify what I am doing wrong. I have 2 U360's plugged in to a Pi3 running RetroPi 4.2, when EmulationStation launches it sees 2 gamepads and when I hold a button down it recognizes the controller as an UltraStik 360. The problem is it then tries to configure the controller by having me map the d-pad, and buttons but no matter what I do by moving the joystick OR hitting any of the buttons, the setup screen does not respond and I ultimately have to hit F4 to exit ES to the command prompt.

I have RGBCommander and when I run jstest on the controllers it sees the button presses and joystick directions perfectly.

So what can I do to get ES to configure the U360's? Ideally I want to be able to use the controller to navigate the menus inside EmulationStation as well.

Thanks for any insight.
Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: dbinott on September 03, 2017, 01:15:32 pm
I was all excited for this until I saw that it doesn't support first gen 360's.  :cry:
Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: bballhootie on January 31, 2018, 09:20:56 am
I’m wiring up my control panel now. I have a two-player setup with two U360s and the Ultimarc Ultimate I/O and RetroPie.  My question is, do I connect both U360s AND the Ultimate I/O to the Raspberry Pi via USB? If so, does Tetroarch see this as three separate controllers that I have to each separately configure? And do I wire the U360s to the Ultimate keyboard encoder as well? I’ve searched the forum and can’t find anything about this particular setup. Any help would be greatly appreciated.
Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: barrymossel on February 01, 2018, 08:52:02 am
I’m wiring up my control panel now. I have a two-player setup with two U360s and the Ultimarc Ultimate I/O and RetroPie.  My question is, do I connect both U360s AND the Ultimate I/O to the Raspberry Pi via USB? If so, does Tetroarch see this as three separate controllers that I have to each separately configure? And do I wire the U360s to the Ultimate keyboard encoder as well? I’ve searched the forum and can’t find anything about this particular setup. Any help would be greatly appreciated.
What do use the I-Pac Ultimate I/O for? How many buttons will you be using? If you use only 6+2 buttons (+2 are start/select-coin) per player you won't need the I-PAC as far as I know. So, wire the buttons to the U360's and plug the USB from the U360's into the RPi.
EmulationStation and/or RetroArch will see that as two controllers.
Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: bballhootie on February 08, 2018, 05:58:56 pm
Thanks for the response, Barry. I actually have more than six buttons per player (7+coin+player) otherwise I would wire everything through the U360s. I have things working now by wiring the U360 I/O port in output mode that feeds into the iPac up/down/left/right pins while keeping the USB connected. Everything seems to be working but when I launch a game, I get the yellow RetroArch text in the lower left corners stating that the U360s are not configured but the games seem to play fine.

I also found that the default cfg file that RA creates on first run assigns keys such as “r” and “f” to certain functions (i.e. “f” is assigned to fast forward). I had to set those functions to “nul” since standard MAME is expecting “f” and “r” as something else and it conflicts with RA (I also could have mapped the RA functions to other keystrokes but I didn’t since I would likely never have use for those functions).

If anyone knows how to get rid of the “Ultrastick not configured” warnings please let me know. I’m guessing what’s happening is that it’s working because it’s seeing commands via the IPAC but when it looks through the USB it’s not seeing it configured correctly. It may just have to be that way
Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: dbinott on February 20, 2018, 04:31:55 pm
So, I just upgraded my v1 u360 boards for the current gen boards.

I have set up the RGBC XML file. When I go to rgbcmdcon I get no activity. I also get no activity in jstest. But ES does see it as a gamepad.
ultrastikcmd is able to flash to it.
The stick is very erratic in the ES menu as well. down will go left, up will just keep going up till I stop it.

I emailed Andy, but I know he is busy and may take some time to reply so I thought I would try here.

I have this warning in the log. Not sure if significant.

Code: [Select]
20/02/18 16:43:44 [INFO] [startListening] selectserver: listening on IP 0.0.0.0, socket 15
20/02/18 16:43:44 [WARNING] [startListening] selectserver: bind failed, error: 98
Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: dbinott on February 20, 2018, 05:50:29 pm
ok, I think I got it worked out.

Change hardware throttle to 0. This seemed to take care of the erratic behaviour.
Found out that the bind failed is nothing. just means it couldn't bind to an ipv6 ip.

Still nothing showing rgbcmdcon or jstest (identifies correctly) maybe cause it shows as keyboard?
Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: dbinott on February 20, 2018, 07:35:53 pm
meh, happening again.  :banghead:
Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: ZoOl007 on February 21, 2018, 09:31:48 am
And what exactly is the problem? You are trying to use one U360 with ES and it doesn't work correctly?
You shouldn't put the hw throttle to 0 for an U360 - use the default or up it. Hwthrottle is needed to pause the communication in between byte sequences. One needs to write several to put a map in the stick and if it goes too fast you can have issues.
You wrote you can use ultrastickcmd to flash the stick? That's a windows program? What I would do is flash it to 8-way for example, see if it works in windows(just in the control panel applet), edit rgbcmdd.xml and disable all 4 U360' in the joystick section. Restart the daemon (or the pi) and see if the stick works in ES. Of course the daemon won't do anything with the stick but you'll at least know if it works on your pi or not. Like so you'll have a 'normal' 8 way joystick. If it works be sure it always works eg try multiple times to see if it keeps working.
Work from there. If you have multiple sticks start with one. Success? Try to add another one in 8-way. Success? Activate ONE stick in the daemon cfg. Success? Active the 2nd.
Work by eliminating as many unknowns as you can. Step by step. If it behaves erratically after switching the stick on in the rgbcmdd.xml double the hwthrottle for starters.
(EDIT: and start lowering it afterwards - I know u360's are being used with success and it has been really extensively tested at the time)
Mahuti and I lost a significant amount of time during dev/testing with the LEDWiz for example and all the issues came from the fact that I wrote too fast to the board. It drove me nuts...
Now, we haven't had a similar issue with the u360 but yeah... who knows... I don't have u360's myself.

rgds
Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: javeryh on May 14, 2019, 09:53:32 pm
Anyone know if this will work on a really old U360?  I bought mine in 2010-11 or so...
Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: camebackhaunted on October 04, 2021, 08:45:49 am
Bringing this super helpful topic back from the dead in the hope of getting a little help!  I've got through the process to install RGB Commander  0.4.0.5 in RetroPie is v4.7.1 (I believe) with ADVMame 0.94.  From the terminal I can see that it's working and I can test switch maps using  set,stick,21 as well when manually switching with ultrastikcmd .  However, I'm still not able to auto switch and i'm pretty sure I'm making some kind of dumb mistake in rgbcmdd.xml. 

I've attached rgbcmdd.xml and my latest log file so would it be possible for someone who knows more about this to have a look please?  I think this is really close but there's something stupid I'm not doing to make it switch maps!

Cheers  ;)

rgbcmdd.log - https://drive.google.com/file/d/1WgQnnYxvIXZ9D_k-ntnmD2ImcLYRwr4O/view?usp=sharing (https://drive.google.com/file/d/1WgQnnYxvIXZ9D_k-ntnmD2ImcLYRwr4O/view?usp=sharing)
rgbcmdd.xml- https://drive.google.com/file/d/1gvM29APmI3zVzsVcOJ8E0OOvRAy_kXVq/view?usp=sharing (https://drive.google.com/file/d/1gvM29APmI3zVzsVcOJ8E0OOvRAy_kXVq/view?usp=sharing)


Title: Re: Does the Ultrastik 360 work with a Pi?
Post by: jonathangeibel on October 05, 2021, 01:48:04 am
It's been a little while since I've messed with rgbcommander so someone else may have better ideas.

Just looking at the documentation, though, it seems like you need to add retropiebinary="advmame" to your emulator line at a minimum