Main > Raspberry Pi & Dev Board

Does the Ultrastik 360 work with a Pi?

<< < (2/9) > >>

ugleymatt:

--- Quote from: 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.

--- End quote ---

Has there been any progress on this? About to pull the trigger on getting the u360 sticks...

mahuti:
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

ugleymatt:

--- Quote from: 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/

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

--- End quote ---

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:

--- Quote from: 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/

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

--- End quote ---

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:
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: ---cd /home/pi/RGBcommander_0401_beta1_Setup
--- End code ---
(cd is change directory)

make the installer executable:


--- Code: ---sudo chmod +x ./setup.sh
--- End code ---
(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: --- sudo ./setup.sh install
--- End code ---

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: ---sudo pico /usr/sbin/rgbcommander/rgbcmdd.xml
--- End code ---
(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: --- <option
portnumber="2724"
led0="P1_START"
led1="P2_START"
led2="P1_BUTTON1"
retroarchbinary="retroarch"
rgbadefault="RANDOM"
activedefault="Orange"
inactivedefault="Black"
frontendbinary="attract"
waydefault="4"
/>
--- End code ---

That is the option set for attract mode

And the joystick configuration:


--- Code: ---<joystick name="U360_1" on="1" hwthrottle="100"/>

--- End code ---

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: ---<rom id="qbert" way="12">
--- End code ---

The options are:


--- Code: ---    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
--- End code ---

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: --- sudo /etc/init.d/rgbcmdd restart
--- End code ---


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: ---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]

--- End code ---

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


--- Code: ---/opt/retropie/configs/mame-advmame/advmame-0.94.0.rc
--- End code ---

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.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version