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
Site News

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


  

Author Topic: Does the Ultrastik 360 work with a Pi?  (Read 913 times)

0 Members and 1 Guest are viewing this topic.

ugleymatt

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 44
  • I want to build my own arcade controls!
Does the Ultrastik 360 work with a Pi?
« 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?

mahuti

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 2433
  • Back from the dead.
Re: Does the Ultrastik 360 work with a Pi?
« Reply #1 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.
Formerly known for the (apparently now defunct) arcadeartlibrary

ugleymatt

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 44
  • I want to build my own arcade controls!
Re: Does the Ultrastik 360 work with a Pi?
« Reply #2 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.

mahuti

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 2433
  • Back from the dead.
Re: Does the Ultrastik 360 work with a Pi?
« Reply #3 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.
Formerly known for the (apparently now defunct) arcadeartlibrary

ugleymatt

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 44
  • I want to build my own arcade controls!
Re: Does the Ultrastik 360 work with a Pi?
« Reply #4 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.

ugleymatt

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 44
  • I want to build my own arcade controls!
Re: Does the Ultrastik 360 work with a Pi?
« Reply #5 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...

mahuti

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 2433
  • Back from the dead.
Re: Does the Ultrastik 360 work with a Pi?
« Reply #6 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/

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
Formerly known for the (apparently now defunct) arcadeartlibrary

ugleymatt

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 44
  • I want to build my own arcade controls!
Re: Does the Ultrastik 360 work with a Pi?
« Reply #7 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/

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.

soonerdoc

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • I want to build my own arcade controls!
Re: Does the Ultrastik 360 work with a Pi?
« Reply #8 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/

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!

mahuti

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 2433
  • Back from the dead.
Re: Does the Ultrastik 360 work with a Pi?
« Reply #9 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.
« Last Edit: April 16, 2017, 03:45:20 am by mahuti »
Formerly known for the (apparently now defunct) arcadeartlibrary

mahuti

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 2433
  • Back from the dead.
Re: Does the Ultrastik 360 work with a Pi?
« Reply #10 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.
Formerly known for the (apparently now defunct) arcadeartlibrary

soonerdoc

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • I want to build my own arcade controls!
Re: Does the Ultrastik 360 work with a Pi?
« Reply #11 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)?

Mike A

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 600
Re: Does the Ultrastik 360 work with a Pi?
« Reply #12 on: April 17, 2017, 04:47:07 am »
Mahuti is a helpful dude.

mahuti

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 2433
  • Back from the dead.
Re: Does the Ultrastik 360 work with a Pi?
« Reply #13 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:
Formerly known for the (apparently now defunct) arcadeartlibrary

  
 

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31