Build Your Own Arcade Controls Forum

Main => Software Forum => Topic started by: Mamezilla on March 06, 2015, 07:39:44 am

Title: Servo-Stik & Linux
Post by: Mamezilla on March 06, 2015, 07:39:44 am
Hello everyone,
Does anybody know if there any software solution in linux that can drive the motor on the Servo-Stik ?
I'm considering using a distro which includes Wahcade.  I'm testing the setup and it fits my needs, but I'm wondering if I can use something that would automatically switch the stick between 4 & 8 ways in Mame, like some are doing in Mala or Hyperspin.
Thanks
Title: Re: Servo-Stik & Linux
Post by: bernieke on December 18, 2015, 05:05:13 am
Did you ever get this working?

I'm planning to build a cabinet with groovyarcade and servostiks myself.
Title: Re: Servo-Stik & Linux
Post by: ZoOl007 on December 23, 2015, 08:18:04 am
Yes I do - my daemon does that - I'm working on v0.2 - it's almost finished right now
have a look at the site RGBcommander site (still v0.1)
I advise you to wait for v2 as it advanced a lot...
Title: Re: Servo-Stik & Linux
Post by: bernieke on December 23, 2015, 09:00:51 am
I see you use libusb. Is there documentation available somewhere describing the protocol to talk with the servostiks?

And how does the automatic switching happen? Do you need to tell mame somehow to run the client program with some arguments when it launches a rom?

Since all I really need is the ability to have mame switch the restrictors, I was thinking I could just write a small python script (with pyusb, which uses libusb as well) to do this for me, but I can't seem to find any information concerning the protocol, or how I would get the script called when needed...
Title: Re: Servo-Stik & Linux
Post by: ZoOl007 on December 23, 2015, 09:44:01 am
there's actually quite a lot to the automatic switching thing - you can't tell mame to launch something else but mame can tell you  :)
RGBcommander 0.2 is fully automated eg you don't need to send it any commands to do it's work. It's completely frontend/emulator agnostic once set-up.
There's even no need to configure RGBcommander 0.2 with regards to the ServoStik - it'll just work after installation and deduct the best option for your current running rom.
scripting is and stays ducktape and it's sloooooooooooow - my code is blistering fast even if I say so myself
what distro are you using and 32 or 64bit? Do you have the servostik's already? You can be my alpha tester  :applaud:

Title: Re: Servo-Stik & Linux
Post by: bernieke on December 23, 2015, 12:24:44 pm
I was planning on using 64bit groovyarcade. (So Arch Linux.)

I should have the sticks tomorrow, but won't have time to start messing around with it until Monday or Tuesday.
Title: Re: Servo-Stik & Linux
Post by: ZoOl007 on December 23, 2015, 01:07:52 pm
Good news - my development machine is a 64bit debian - I'll create the installer if I find the time. Get back to me once you've got mame up and running. I've got sdlmame 0.154 on my devbox so it'll be wise to install that one for starters.
Title: Re: Servo-Stik & Linux
Post by: ZoOl007 on December 29, 2015, 08:06:34 am
Hi,

I adapted the site,  docu and uploaded v0.2 - give it a go if you feel like it.

regards
Title: Re: Servo-Stik & Linux
Post by: ZoOl007 on January 06, 2016, 03:53:48 pm
Hi,

I had someone asking for the 0.2 ARM build,  compiled it yesterday and it runs stable on my pi2 with a raspbian distro . I just uploaded it on my site.
On my PI2 i had to set the autodetach to 0 in the rgbcmdd.xml or the daemon does not start - that's by design and distro specific . I'll automate that in 0.3.
I also got it running on a from source compiled Arch from a die hard Arch user ;D /friend of mine - wow - that thing is blistering fast.

something else maybe - to function correctly the daemon needs to know where mame is - that can be specified in the xml but in the next version I'll automate that by symlinking.
The xml option is not really tested but if you've got sdlmame as binary somewhere for example, for this version you can create a symlink to it in /usr/games/mame too

regards
Title: Re: Servo-Stik & Linux
Post by: brandonx76 on April 22, 2017, 08:05:34 pm
Hi - just thought I'd revive since I'm looking for a solution - does anyone happen to have linux software to trigger the servo sticks?

Any info appreciated.  thanks
Title: Re: Servo-Stik & Linux
Post by: ZoOl007 on April 23, 2017, 07:21:45 am
Yes, RGBcommander 0.4 has ServoStik support and runs on linux. Have a look at the site.
Title: Re: Servo-Stik & Linux
Post by: PhoneGuy on May 13, 2017, 01:07:27 pm
I am attempting to try using RGBcommander to control my servostiks in the latest version Groovyarcade which uses Arch Linux.  I get errors when running setup.sh. There is no init.d directory in /etc.  There is an init.d file.

Code: [Select]
RGBcommander installing
0.4.0.2 beta1
-------------------------------------------
rgbcommander->/usr/sbin OK
minimame.bin->/usr/sbin/rgbcommander OK
rgbcmdd->/usr/sbin/rgbcommander OK
rgbcmdcon->/usr/sbin/rgbcommander OK
libstdc++.so.6->/usr/sbin/rgbcommander OK
21-rgbcmdd.rules->/etc/udev/rules.d OK
rgbcmdd->/etc/init.d ERROR
chmod: cannot access '/etc/init.d/rgbcmdd': Not a directory
ln: failed to create symbolic link '/usr/sbin/rgbcmdd': File exists
ln: failed to create symbolic link '/usr/bin/rgbcmdcon': File exists

chmod: cannot access '/etc/init.d/rgbcmdd': Not a directory
./setup.sh: line 64: update-rc.d: command not found
./setup.sh: line 67: /etc/init.d/rgbcmdd: Not a directory









Title: Re: Servo-Stik & Linux
Post by: ZoOl007 on May 13, 2017, 03:17:56 pm
yes that is correct. Arch has a different init system. I once ran it on a colleague's from source compiled arch and it did function as designed.
The init system is only used to start and stop the daemon - it has nothing to do with its functional behaviour.
If you adapt the installer to cope with Arch I'll be happy to include it.
If I find the time I'll look at it myself.

ps: I recently installed GroovyArcade myself so at a given moment it'll likely happen but I just don't have the spare time right now but anyone with some bash scripting knowledge will be able to do it.
Title: Re: Servo-Stik & Linux
Post by: PhoneGuy on May 15, 2017, 01:23:44 pm
I can look at the install but first I want see if I can make use of this for my ServoStiks.  Based on your website it looks like my options are limited since I'm running groovymame .184 for linux.  It sounds like the set,rom feature would be my only option.  I would have to send a rom name to rgbcmdd rather than just passing the setting I want for the ServoStiks?  On my windows XP setup I could have Mamewah pass the rom info to a batch file that based on the joystick type from the rom info would run the ServoStick app with the 4 or 8 way setting needed.  For Qbert and Congo Bongo I would specifically run the ServoStick app with 8-way rather than 4-way as specified by the rom since in those games, 8-way works better when the sticks are not mounted rotated 45 degrees. Could I have have something like a dummy 8way rom  and 4way rom I use with the frontend?
Title: Re: Servo-Stik & Linux
Post by: ZoOl007 on May 15, 2017, 02:34:23 pm
yes, the set,rom feature is your only option atm - it is a pity the mame devs dropped the linux integration...
(but that makes it just as (in)efficient as your xp implementation as you need to tell that one what to do too)
yes, you tell rgbcmdd the rom name before the process appears because it can't detect it itself on 0.184
based on the name it'll switch to 4 or 8 way
Qbert and Congo Bongo - you can configure overrides but if I am not mistaking Qbert is 8way in the xml
frontend -> default is 8 but can be overriden

you can try if it works on GroovyArcade(it has never been tried) before investing time in the installer - it is installed so normally you open a shell
su
cd /usr/sbin/rgbcommander
./rgbcmdd

at this point the daemon runs and you can ./rgbcdmcon and type ? to see the commands.
You can try the set,stick,4 and set stick,8 commands to test them
You can stop the daemon by ./rgbcmdcon stop daemon

you'll have to switch the servostiks on in the rgbcmdd.xml - it contains cfg docu

do note that the binaries have been linked to use the supplied libstdc++ lib so they have to be in the same dir.

if you decide to invest time in it I'm willing to do the same from my side - it would be good to have it running on GroovyArcade next to debian and pi2/3
we'll need to convert(?) my init.d script to an rc.d script it seems and have the installer detect it is running arch and copy the files to the correct locations but for starters just try to switch your sticks as described above.

If you'd like to give it a go contact me by mail otherwise we'll pollute this site with  :blah: nobody cares about.


 
Title: Re: Servo-Stik & Linux
Post by: ZoOl007 on May 26, 2017, 07:23:13 am
RGBcommander 0.4.0.3 beta1 now installs fine on GroovyArcade 2017. It has been confirmed working as designed.
Title: Re: Servo-Stik & Linux
Post by: Sledge on January 20, 2025, 07:12:24 pm
RGBcommander 0.4.0.3 beta1 now installs fine on GroovyArcade 2017. It has been confirmed working as designed.
Is this still available?
Trying to get servostiks to work on latest groovyarcade...

TIA
Title: Re: Servo-Stik & Linux
Post by: PL1 on January 20, 2025, 08:31:46 pm
Is this still available?
Trying to get servostiks to work on latest groovyarcade...
You can download a copy from a 2022 backup on archive.org.
https://web.archive.org/web/20220831223146/http://users.telenet.be/rgbcommander/downloads/SetServoStik.tar.gz (https://web.archive.org/web/20220831223146/http://users.telenet.be/rgbcommander/downloads/SetServoStik.tar.gz)


Scott
Title: Re: Servo-Stik & Linux
Post by: Sledge on January 21, 2025, 02:54:21 am
Cheers :)

Now to work out how to use it...
Title: Re: Servo-Stik & Linux
Post by: Sledge on January 21, 2025, 04:23:40 am
Nope i'm confused.....
Can anyone tell me exactly what i need to do JUST to get ServoStiks working in GroovyArcade/arch/Attractmode please :)

installed SetServoStik standalone and all it seems to do is move the stiks to 8way
Can't workout how to get it back to 4 way...
and no idea how to get RGBCommander to do it automatically... :(