RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    1. Home
    2. Tags
    3. shell script
    Log in to post
    • All categories
    • K

      runcommand.sh Improvement on Launch Images

      Watching Ignoring Scheduled Pinned Locked Moved Ideas and Development shell script improvement runcommand.sh launch images
      1
      0 Votes
      1 Posts
      289 Views
      No one has replied
    • Fiddla01F

      Opening StartX with a script, and then running a program

      Watching Ignoring Scheduled Pinned Locked Moved Help and Support startx shell script
      4
      0 Votes
      4 Posts
      779 Views
      Fiddla01F

      @SuperFromND Thanks!!! Your guidance led me to a solution.

      Xinit was indeed the solution to my problems, and it actually ended up being very simple. I'll try to spell out everything that was done so anyone finding this thread can follow along the best they can.

      OutFox/Stepmania works either from the startx or the xinit environments, but the following code is what allowed me to start the game from the emulationstation menu automatically. This is the contents of ~/RetroPie/roms/ports/OutFox.sh

      #!/bin/bash xinit /opt/OutFox/OutFox -- vt1 -keeptty -nocursor

      The second argument is the location of the executable for outfox (if you have stepmania it will be the path to the stepmania execuatable). The last arguments keep a no-permission error from occuring.

      Once this file is in that location, there should be an OutFox option to choose on the ports screen, and it should load OutFox properly. Surprisingly I didn't have to change any configs anywhere else, it just seemed to work like this for me.

      Here's a post that I mostly used to get OutFox setup (there are plenty of other good tutorials for this too): https://www.reddit.com/r/Stepmania/comments/psd1hm/raspberry_pi_4_stepmania_outfox_53_guide/

      I'm obviously a novice when it comes to this so I'm sure there's better ways of doing this, but this works for me so I'm happy.

    • L

      Daphne - Removing Fullscreen Parameters to Avoid Errors

      Watching Ignoring Scheduled Pinned Locked Moved Ideas and Development daphne daphne config daphne games shell script shell
      5
      0 Votes
      5 Posts
      1k Views
      DirtBagXonD

      @ln_rc said in Daphne - Removing Fullscreen Parameters to Avoid Errors:

      @DirtBagXon @johnodon Thank you for the information! I added back the full screen, it definity the $params and not the -fullscreen. This is the commands file that I used based on a tutorial on this webpage:

      -nocrc -noissues -noserversend -latency 950 -x 640 -y 480 -bank 1 00110111 -bank 0 10011000

      Is there a better version of a general .commands file to use?

      I'll take a look at the hypseus emulator as well. The Daphne emulator has been working pretty well for me, but it doesn't hurt to see all the options.

      There isn't really a one size fits all .commands file, as these files are game specific. i.e. each game has a different version in its own folder:

      https://retropie.org.uk/docs/Daphne/#command-parametres

      Alter arguments and get it to do what you want it to do. If you are including -bank switches then you need to start reading, and understanding, the arcade dip switch setting configurations. These are at the more complex end of config.

      Dip switches are documented on the excellent DLP site: http://www.dragons-lair-project.com/tech/
      General options for Daphne are documented here: http://www.daphne-emu.com/mediawiki/index.php/CmdLine
      Hypseus has a few more: https://github.com/DirtBagXon/hypseus-singe#extended-arguments-and-keys

      Feeling overwhelmed :) Daphne is notoriously tricky to configure, so just spend some time with it.

      Remember, you don't have to include any options. Defaults (empty .commands file) work fine most of the time.

      If you did remove $params as the last argument from the daphne.sh script, you should add it back and fix the commands files. This option allows you to customise all games individually.

      Note: These same arguments in $params (i.e. <game>.commands files) are also used by the hypseus.sh script, so any issues you address in Daphne will be ported to Hypseus Singe automatically.

      There are some options that are now deprecated in Hypseus, -nohwaccel being one. These don't work well in the port to SDL2, especially on the Pi.

       

    • P

      ServoStik setting using runcommand-onstart.sh

      Watching Ignoring Scheduled Pinned Locked Moved Help and Support servostik runcommand shell script
      8
      0 Votes
      8 Posts
      1k Views
      stoney66S

      @paul_uk Awesome thanks for this. I was using something from Katie Snow long ago but this seems a bit easier.

    • T

      Scripts as Roms "not found"

      Watching Ignoring Scheduled Pinned Locked Moved Help and Support shell script system rom not loadin cartridge
      3
      0 Votes
      3 Posts
      502 Views
      T

      @mitu THIS WORKED!! THANKS!!!

    • Y

      How to prevent "+Start ScummVM.sh" from showing in game list ?

      Watching Ignoring Scheduled Pinned Locked Moved Help and Support gamelist hide retropie 4.6 scummvm shell script
      5
      0 Votes
      5 Posts
      623 Views
      mituM

      @Yobiwan Deleting the file from roms/scummvm works. Did you enable the 'Parse gamelists only' option in EmulationStation by any chance ?

    • C

      Load NON-PC rom with a script?

      Watching Ignoring Scheduled Pinned Locked Moved Help and Support script request shell script loading games snes
      24
      0 Votes
      24 Posts
      2k Views
      J

      @clockwork42 I know this thread is a few months old but figured out how to do exactly what I believe you are trying to do and I wanted to post it in case you or anyone else is still looking like I was up until recently.

      I separated MSU-1 into a distinct system from the rest of SNES called "snesmsu1". Here is what my "/roms/snesmsu1" folder looks like:

      alt text

      For this setup you would also need to make a folder called "snesmsu1" at "/opt/retropie/configs/snesmsu1". You could copy the "snes" folder from "configs" as a starting point. I removed all emulators from "emulators.cfg" except for lr-snes9x and replaced the reference to "snes" with "snesmsu1" so that it looks like this:

      lr-snes9x = "/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-snes9x/snes9x_libretro.so --config /opt/retropie/configs/snesmsu1/retroarch.cfg %ROM%" default = "lr-snes9x"

      I also edit "retroarch.cfg" replacing the reference to "snes" with "snesmsu1" so that it looks like this:

      # Settings made here will only override settings in the global retroarch.cfg if placed above the #include line input_remapping_directory = "/opt/retropie/configs/snesmsu1/" #include "/opt/retropie/configs/all/retroarch.cfg"

      The crucial part that will make runcommand execute your 'rom.sh' files as scripts instead of trying to open them with the default emulator is the command node in your "es_systems.cfg" file. Here is what my system node for "snesmsu1" looks like, including the command:

      <system> <name>snesmsu1</name> <fullname>Super Nintendo MSU1</fullname> <path>/home/pi/RetroPie/roms/snesmsu1</path> <extension>.sh .SH</extension> <command>bash %ROM%</command> <platform>snes</platform> <theme>snesmsu1</theme> </system>

      With the above in your "es_systems.cfg" and a folder named snesmsu1 in your "roms" folder, you will have a separate section in EmulationStation for SNES MSU-1. You will also have to use a theme that has an "snesmsu1" section. Otherwise, you will have a blank, unthemed section for "snesmsu1".

      Only '.sh' files in your "snesmsu1" folder will be displayed in this section in EmulationStation. Notice in my screenshot that the names of all the folders that contain the actual game files begin with a dot which makes them hidden in Linux so they aren't displayed in EmulationStaion. Your "gamelist.xml" file points to one of the '.sh' files in the "path" node for each game and then you can have all your metadata and media set up as well and everything will look pretty in EmulationStation.

      Other than that, here is an example of what my 'Chrono Trigger (MSU-1).sh' looks like for launching the game:

      #!/bin/bash "/opt/retropie/supplementary/runcommand/runcommand.sh" 0 _SYS_ "snesmsu1" "/home/pi/RetroPie/roms/snesmsu1/.Chrono Trigger (MSU-1)/Chrono Trigger (MSU-1).sfc"

      Because of the different commands in "es_systems.cfg" for launching regular SNES ROMs vs. running shell scripts, you really do need to separate MSU-1 into a different system from regular SNES. Actually, you could combine them, but if you want to keep things organized as described then you would have to create a similar shell script for each regular SNES ROM as well. I prefer to have them separated for aesthetics, organization and ease of use.

      With everything configured as I described, EmulationStation looks nice and tidy and so does my "/roms/snesmsu1" folder. I hope this helps.

    • M

      Creating Shell Script for installing everything

      Watching Ignoring Scheduled Pinned Locked Moved Help and Support setup script configure shell script
      1
      0 Votes
      1 Posts
      368 Views
      No one has replied
    • W

      Universal emulator kill switch/exit button

      Watching Ignoring Scheduled Pinned Locked Moved Ideas and Development shell script emukill joystick
      10
      0 Votes
      10 Posts
      865 Views
      mituM

      @werpu said in Universal emulator kill switch/exit button:

      If I had known that upfront this would have saved me an hour or two :-)

      It's always fun to do things yourself and tinker - this way you learned more systemd trickery :).

    • MileSaculM

      Use of __user variable

      Watching Ignoring Scheduled Pinned Locked Moved Ideas and Development retropie-setup shell script
      3
      0 Votes
      3 Posts
      615 Views
      BuZzB

      We don't - lots of hurdles to support multiple users. I don't want to add additional script parameters btw so no need to do a pr at this time. Thanks.

      You can set vars with sudo __blah= ./retropie_packages.sh

    • B

      Redirecting Runcommand

      Watching Ignoring Scheduled Pinned Locked Moved Help and Support runcommand onstart snes shell script
      8
      0 Votes
      8 Posts
      1k Views
      mituM

      I'd probably rewrite it like

      #!/usr/bin/env bash ROMDIR=/home/pi/RetroPie/roms/snes MSUROMDIR=/home/pi/RetroPie/roms/msu rom=$1 if [[ $rom == *"act2_msu1.sfc" ]]; then rom="${MSUROMDIR}/Act Raiser 2 MSU v1 Kurrono, Conn 2018-03-25/act2_msu1.sfc" fi if [[ $rom =~ *"actraiser_msu1.sfc" ]]; then rom="${MSUROMDIR}/Actraiser - Abyss Rebirth OST, MSU v1 Darkshock/actraiser_msu1.sfc" fi # and all other roms... /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ snes "$rom"
    • stooS

      Feature Request: RetroPie-Setup - Update All with exclusions

      Watching Ignoring Scheduled Pinned Locked Moved Ideas and Development retropie-setup shell script feature request updating
      6
      0 Votes
      6 Posts
      1k Views
      DarksaviorD

      I would love this since I use mame2003-plus and there's no binary for that, so updating everything will take quite a bit of time.

    • hiulitH

      [SCRIPT] RetroPie Limit Last Played Games

      Watching Ignoring Scheduled Pinned Locked Moved Projects and Themes shell script last played games limit
      57
      5 Votes
      57 Posts
      6k Views
      cyperghostC

      @hiulit

      honor to whom honor is due
      Goethe (1749-1832)

    • A

      Automatic game collection shell script

      Watching Ignoring Scheduled Pinned Locked Moved Ideas and Development shell script game collection collections folders automated
      6
      3 Votes
      6 Posts
      2k Views
      cyperghostC

      @arambecker No my approach would be a bit more.
      A tool to find duplicates.
      As I said in my first post. If you have selections of several regions.

      Maybe 1000 roms it would be usefull to search for a gametitle and to select duplicates.

      Game 1 (J) Game 1 (U) Game 2 (JUE) Game 3 (J) Game 3 (E)

      You already programmed delimiter so there needs "just" to generate an automatic search term.
      That's not the way your script is intended to work and I think it will need a heavy rework. But this would be usecase, too

      ROM Names > Automatic generated search term Game 1 (J) > Game 1 ( Game 1 (U) > Game 1 ( Game 2 (JUE) > Game 2 ( Game 3 (J) > Game 3 ( Game 3 (E) > Game 3 (

      Maybe @meleu can say more to this?

      Welcome on board :)

    • R

      PI2SCART problem with shell script for CRT TV

      Watching Ignoring Scheduled Pinned Locked Moved Help and Support crt putty shell script problem pi2scart
      7
      0 Votes
      7 Posts
      1k Views
      R

      @RetroCrtGames Can you help me how to enable these commands? Sudo chmod + x set_video.sh
      Sudo bash ./set_video.sh I am reaching the / root / video folder and I can't turn them on 😠😠

    • madmodder123M

      Unable to control shell script with controller if the script is in "Ports"

      Watching Ignoring Scheduled Pinned Locked Moved Help and Support shell script controller dialog keyboard mapping
      7
      0 Votes
      7 Posts
      1k Views
      madmodder123M

      @psyke83 You are awesome, thanks a lot :)

    • hiulitH

      Extras for RetroPie themes (icons, splashscreens and launching images) | es_theme_extras shell script

      Watching Ignoring Scheduled Pinned Locked Moved Ideas and Development themes shell script splashscreens icons launching image
      5
      3 Votes
      5 Posts
      2k Views
      hiulitH

      @meleu said in Extras for RetroPie themes (icons, splashscreens and launching images) | es_theme_extras shell script:

      The first thing I would change is that backtitle saying "Backtitle", lol

      Hahaha, you're right! xD

      But I was waiting because I wanted to know how can I implement RetroPie's variables, for example: $__backtitle or functions, like gitPullOrClone. Do I need to reference other files?

      See https://github.com/RetroPie/RetroPie-Setup/blob/master/scriptmodules/supplementary/esthemes.sh

    • madmodder123M

      Assigning jstest output to a variable from a shell script

      Watching Ignoring Scheduled Pinned Locked Moved Help and Support jstest shell script joystick presses buttons
      1
      0 Votes
      1 Posts
      810 Views
      No one has replied
    • meleuM

      shell scripting topic

      Watching Ignoring Scheduled Pinned Locked Moved Ideas and Development shell shell script programming
      191
      3 Votes
      191 Posts
      76k Views
      hiulitH

      Well, here it is! A new version of RetroPie Shell Script Boilerplate.

      This is a template for building shell scripts for RetroPie.

      I've added examples of the following dialog boxes:

      --infobox --yesno --msgbox --menu

      All the dialogs can be found at utils/dialogs.sh

      I've also moved some functions to utils/base.sh.

    • S

      Script to supply Support Details

      Watching Ignoring Scheduled Pinned Locked Moved Ideas and Development support script shell script automation
      1
      1 Votes
      1 Posts
      567 Views
      No one has replied