Retropie, EmulationStation and Bash and Ruby scripting issues
-
I'm not sure if this is the right place for getting help with the issue I'm about to describe, but I gotta start somewhere...
I have a home-built arcade cabinet with an Ultimarc ServoStik in it (it's a joystick that has a motor-driven restricter plate, allowing it to be set to either 4-way or 8-way under software control). The cabinet is driven by a Raspberry Pi 3B which is running Retropie (version unknown) and EmulationStation (ES, V2.9.1RP).
I have several scripts on the Pi that are used to automatically switch the ServoStik to either 4-way or 8-way mode, depending on the game being started in ES. It works great, but with one serious caveat: upon initial Pi boot (with ES being auto-started), the scripts do not work, and in order to get them to work, I have to manually exit ES back to the command prompt, and then immediately start it again by typing emulationstation at the prompt. Once ES is restarted, the scripts work perfectly.
Here's what I know about the script failure: When ES starts a game, it runs a Bash script I've provided called 'runcommand-onstart.sh'), and that script in turn calls a Ruby script that determines what mode to set the ServoStik to, given the system and game name being started. On initial system startup, the Bash script complains that the Ruby script does not exist, and thus the Bash script fails. But if I exit ES and immediately restart it, the Bash script calls the Ruby script successfully, and subsequent code is able to set the ServoStik to 4 or 8-way.
I'm hoping someone might be able to shed some light on why I'm having this weird problem, and offer up some suggestions on how to fix it.
Sorry for the long post...
Thanks.
-
Without the scripts it's going to be hard for anyone to advise.
Also please fill out the template from the sticky topics (link in my signature). Where is the image from? And find out what version from RetroPie-Setup you're running.
-
@BuZz Thanks, BuZz. I am using a 3rd party image, so I am exempt from assistance. I'll try elsewhere...
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.