• 0 Votes
    49 Posts
    9k Views
    meleuM

    @flashpc yeah, it's great. I took advantage of this feature in my rpie-art tool (link on my signature).

    Cheers!

  • 0 Votes
    4 Posts
    2k Views
    coderkevinC

    Okay folks, I've written up a script to handle this exactly the way I described before.

    It runs from the autostart.sh and watches /dev/shm/screen_manager.cfg for updates.
    That way any other system process can create/modify that file and this script will respond by either starting the rom, or starting the dashboard.

    Cheers!

    https://github.com/coderkevin/mini-nes/tree/master/screen

  • 6 Votes
    75 Posts
    29k Views
    TMNTturtlguyT

    @meleu you are the best! I will test when I return from my trip!

  • 0 Votes
    4 Posts
    2k Views
    BuZzB

    @waltisfrozen This was already changed - if you update to the latest retropie-setup it no longer uses md5 hashes by default, but just includes system and rom name minus extension /path (excluding all characters except a-z A-Z 0-9 _ - in the format system_romname

    for per emulator settings, the format is emulator_romname

  • Convert batch file to a linux script

    Moved Help and Support
    3
    0 Votes
    3 Posts
    1k Views
    iCLintI

    Answering my own question. I will start a new thread with full usage

    #!/bin/bash # Script use $ sudo ./makexml.sh [RomDirectoryName] [-n optional] # -n does not right name to <name> tag useful for MAME roms as ES will autofill correct name # Store arguments arg1=$1 arg2=$2 output="gamelist.xml" # Change deliminator for $IFS # Allows script to work with names with white space SAVEIFS=$IFS IFS=$(echo -en "\n\b") # print scripts current status printf "Scanning dir: "$arg1"...\n" # Creates output XML file (gamelist.xml) printf "<?xml version=\"1.0\"?>\n\n" > ./$arg1/$output printf "<gameList>\n" >> ./$arg1/$output # Scans directory given by first argument for file in ./$arg1/* do # Just some manipulatiuon of data returned by $file filename=$(echo $file | cut -f 3 -d '/') name=$(echo $filename | cut -f 1 -d '.') # Checking for existance of correctly named image in ./images dir. [[ -f ./$arg1/images/$name.png ]] && theImage=./images/$name.png || theImage="" # Start writing to gamelist.xml printf "\n" >> ./$arg1/$output printf "\t<game>\n" >> ./$arg1/$output printf "\t\t<path>./"$filename"</path>\n" >> ./$arg1/$output # Checking whether the -n argument was used if [ $arg2 = "-n" ]; then name="" fi # Continuing writing to gamelist.xml printf "\t\t<name>"$name"</name>\n" >> ./$arg1/$output printf "\t\t<desc></desc>\n" >> ./$arg1/$output printf "\t\t<image>"$theImage"</image>\n" >> ./$arg1/$output printf "\t\t<rating></rating>\n" >> ./$arg1/$output printf "\t\t<releasedate></releasedate>\n" >> ./$arg1/$output printf "\t\t<developer></developer>\n" >> ./$arg1/$output printf "\t\t<publisher></publisher>\n" >> ./$arg1/$output printf "\t\t<genre></genre>\n" >> ./$arg1/$output printf "\t\t<players></players>\n" >> ./$arg1/$output printf "\t</game>\n" >> ./$arg1/$output # Print scripts current status printf $filename clear printf "Scanning dir: "$arg1"...\n" done # Closing gamelist.xml file printf "</gameList>" >> ./$arg1/$output # print scripts current status clear printf "Finished\n"
  • 0 Votes
    3 Posts
    1k Views
    A

    Thanks herb!

    Just read also in another thread about calling retropie_packages.sh with no options for a list of scripts/commands, very useful

  • 0 Votes
    25 Posts
    14k Views
    F

    This is a very old topic, but I wanted to throw my script in so you can edit it to your liking. I don't have an Adafruit display, so I had to do some tinkering but you've all done the heavy lifting. Here are the minor edits for using a 3.5" display with fbi. Make sure you have the system.jpg images in the correct system rom folders.:

    # /opt/retropie/configs/all/runcommand-onstart.sh # get the full path filename of the ROM rom=$3 # rom_bn receives $rom excluding everything from the first char to the last slash '/' rom_bn="${rom##*/}" # rom_bn receives $rom_bn excluding everything from the last char to the first dot '.' rom_bn="${rom_bn%.*}" # get the system name system=$1 # set the image file to the first result matching the ROM name - accounts for various possible file extensions img="$(find "/opt/retropie/configs/all/emulationstation/downloaded_images/${system}" -type f -name "${rom_bn}-image.*" | head -1)" # check to see if there was a file found (length of the file name not zero), if not, use an image based on system if [[ -z "${img}" ]]; then img="/opt/retropie/configs/all/emulationstation/downloaded_images/$system/$system.jpg" fi # run the python script to display the image sudo fbi -T 2 -d /dev/fb1 -noverbose -a "$img"