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: Servo-Stik & Linux  (Read 4195 times)

0 Members and 1 Guest are viewing this topic.

Mamezilla

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 202
  • Last login:April 19, 2024, 09:19:21 am
Servo-Stik & Linux
« 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
Don't throw rocks to a man with a machine gun
-- Rowdy Roddy Piper --

bernieke

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:February 06, 2016, 03:59:36 am
  • I want to build my own arcade controls!
Re: Servo-Stik & Linux
« Reply #1 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.

ZoOl007

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 161
  • Last login:August 02, 2020, 12:03:38 pm
    • RGBcommander
Re: Servo-Stik & Linux
« Reply #2 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...
« Last Edit: December 23, 2015, 08:48:09 am by ZoOl007 »

bernieke

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:February 06, 2016, 03:59:36 am
  • I want to build my own arcade controls!
Re: Servo-Stik & Linux
« Reply #3 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...

ZoOl007

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 161
  • Last login:August 02, 2020, 12:03:38 pm
    • RGBcommander
Re: Servo-Stik & Linux
« Reply #4 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:


bernieke

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:February 06, 2016, 03:59:36 am
  • I want to build my own arcade controls!
Re: Servo-Stik & Linux
« Reply #5 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.

ZoOl007

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 161
  • Last login:August 02, 2020, 12:03:38 pm
    • RGBcommander
Re: Servo-Stik & Linux
« Reply #6 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.

ZoOl007

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 161
  • Last login:August 02, 2020, 12:03:38 pm
    • RGBcommander
Re: Servo-Stik & Linux
« Reply #7 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

ZoOl007

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 161
  • Last login:August 02, 2020, 12:03:38 pm
    • RGBcommander
Re: Servo-Stik & Linux
« Reply #8 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
« Last Edit: January 06, 2016, 04:07:20 pm by ZoOl007 »

brandonx76

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 4
  • Last login:December 11, 2018, 03:52:50 pm
  • I want to build my own arcade controls!
Re: Servo-Stik & Linux
« Reply #9 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

ZoOl007

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 161
  • Last login:August 02, 2020, 12:03:38 pm
    • RGBcommander
Re: Servo-Stik & Linux
« Reply #10 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.

PhoneGuy

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 53
  • Last login:June 02, 2020, 01:34:56 pm
  • Crazy
Re: Servo-Stik & Linux
« Reply #11 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









« Last Edit: May 13, 2017, 01:09:56 pm by PhoneGuy »

ZoOl007

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 161
  • Last login:August 02, 2020, 12:03:38 pm
    • RGBcommander
Re: Servo-Stik & Linux
« Reply #12 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.
« Last Edit: May 15, 2017, 03:11:34 pm by ZoOl007 »

PhoneGuy

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 53
  • Last login:June 02, 2020, 01:34:56 pm
  • Crazy
Re: Servo-Stik & Linux
« Reply #13 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?

ZoOl007

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 161
  • Last login:August 02, 2020, 12:03:38 pm
    • RGBcommander
Re: Servo-Stik & Linux
« Reply #14 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.


 
« Last Edit: May 15, 2017, 03:36:36 pm by ZoOl007 »

ZoOl007

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 161
  • Last login:August 02, 2020, 12:03:38 pm
    • RGBcommander
Re: Servo-Stik & Linux
« Reply #15 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.
« Last Edit: May 28, 2017, 08:27:16 am by ZoOl007 »