RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Runcommand launch images automatically chosen for ROM-specific emulatorchoices

    Scheduled Pinned Locked Moved Help and Support
    arcade foldermamefbaromsruncommand
    55 Posts 6 Posters 8.9k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • meleuM
      meleu @AndersHP
      last edited by

      @andershp I'll be able to code and test my code on a real RetroPie system in a couple of days. I hope I find a definitive solution for this.

      Wait a little.

      • Useful topics
      • joystick-selection tool
      • rpie-art tool
      • achievements I made
      1 Reply Last reply Reply Quote 1
      • meleuM
        meleu @AndersHP
        last edited by

        @andershp hey bro! I fixed the script and tested. Seems to be working fine now.

        Could you test it again?

        By the way, the problem was just that I missed the -launching on the filenames. 😅

        • Useful topics
        • joystick-selection tool
        • rpie-art tool
        • achievements I made
        1 Reply Last reply Reply Quote 1
        • AndersHPA
          AndersHP
          last edited by

          Sweet! I will test it tonight. Thanks! :)

          My "Bubble Bobble" Themed Bartop Arcade
          My Gameboy

          1 Reply Last reply Reply Quote 0
          • AndersHPA
            AndersHP
            last edited by

            Sorry, man. It's not working for me.. I'm starting to feel like something's wrong with me..

            The new runcommand-onstart looks like this, correct?

            I'm still not understanding that some of the lines contain "mame" - shouldn't it be either mame-advmame or mame-libretro? (see here)

            So, just to be sure my setup is not wrong; my 3 launching images are placed here:
            /opt/retropie/configs/mame-libretro/launching.png
            /opt/retropie/configs/mame-advmame/launching.png
            /opt/retropie/configs/fba/launching.png

            My "Bubble Bobble" Themed Bartop Arcade
            My Gameboy

            meleuM 1 Reply Last reply Reply Quote 0
            • meleuM
              meleu @AndersHP
              last edited by

              @andershp said

              The new runcommand-onstart looks like this, correct?

              Nop. You're using the previous version. Delete the file and perform those commands again.

              • Useful topics
              • joystick-selection tool
              • rpie-art tool
              • achievements I made
              AndersHPA 1 Reply Last reply Reply Quote 0
              • AndersHPA
                AndersHP @meleu
                last edited by

                @meleu that's what I did.. Strange. Will do it again, but how can it wget an old version?

                My "Bubble Bobble" Themed Bartop Arcade
                My Gameboy

                meleuM 1 Reply Last reply Reply Quote 0
                • meleuM
                  meleu @AndersHP
                  last edited by

                  @andershp said in Runcommand launch images automatically chosen for ROM-specific emulatorchoices:

                  how can it wget an old version?

                  Another possible problem can be related to that cat command.

                  Well, if you can understand a github diff, look here the only line I changed to fix the code:
                  https://github.com/meleu/share/commit/c31f3f47ad2f790c2c5f7acb66b7db9100bd892e

                  And if you're still having problems to get the current version, maybe you can edit the file yourself.

                  • Useful topics
                  • joystick-selection tool
                  • rpie-art tool
                  • achievements I made
                  AndersHPA 1 Reply Last reply Reply Quote 0
                  • AndersHPA
                    AndersHP @meleu
                    last edited by AndersHP

                    @meleu Allright, I get the diff principle, so I'll alter it manually.
                    But again.... I still don't understand how the script gets to mame-libretro or mame-advmame. Looks like it only distinguishes between fba and mame..?

                    My "Bubble Bobble" Themed Bartop Arcade
                    My Gameboy

                    meleuM 1 Reply Last reply Reply Quote 0
                    • meleuM
                      meleu @AndersHP
                      last edited by

                      @andershp said in Runcommand launch images automatically chosen for ROM-specific emulatorchoices:

                      I still don't understand how the script gets to mame-libretro or mame-advmame. Looks like it only distinguishes between fba and mame..?

                      I've just noticed you're still using the very first version of my script. I already fixed the mame names. Look the diff:

                      https://github.com/meleu/share/commit/bf5f6d6c090dc63cfcfd8e4ed90a927e14b2062d#diff-8aa1e6dea1743cf6d899871b9e804436

                      I think I know what's happening. When you use wget and there's a file with the same name of the one you're trying to download, wget creates the newer with a trailing .1. Then when you use the cat trick you're not "installing" the new script.

                      My suggestion:

                      rm system_specific_arcade_launching_images*
                      
                      sudo mv /opt/retropie/configs/all/runcommand-onstart.sh /opt/retropie/configs/all/runcommand-onstart.sh.bak
                      
                      wget https://raw.githubusercontent.com/meleu/share/master/system_specific_arcade_launching_images.sh
                      
                      cat system_specific_arcade_launching_images.sh >> /opt/retropie/configs/all/runcommand-onstart.sh
                      
                      • Useful topics
                      • joystick-selection tool
                      • rpie-art tool
                      • achievements I made
                      AndersHPA cyperghostC 2 Replies Last reply Reply Quote 1
                      • AndersHPA
                        AndersHP @meleu
                        last edited by

                        @meleu said in Runcommand launch images automatically chosen for ROM-specific emulatorchoices:

                        When you use wget and there's a file with the same name of the one you're trying to download, wget creates the newer with a trailing .1. Then when you use the cat trick you're not "installing" the new script.

                        Jesus! That's obvious! I feel like a complete tool! :-D

                        Well, impressive that you managed to improve the script several times with me just saying "first version didn't work" :-)

                        I will test properly again, tonight. Got a good feeling about it this time, hehe !

                        My "Bubble Bobble" Themed Bartop Arcade
                        My Gameboy

                        1 Reply Last reply Reply Quote 0
                        • cyperghostC
                          cyperghost @meleu
                          last edited by cyperghost

                          @meleu Just a suggestion.
                          I think it would be better to use runcommand-onxxxx.sh just as entrypoints for calling scripts. Therefore I would modify your installer to .... ;)

                          rm system_specific_arcade_launching_images*
                          
                          sudo mv /opt/retropie/configs/all/runcommand-onstart.sh /opt/retropie/configs/all/runcommand-onstart.sh.bak
                          
                          wget https://raw.githubusercontent.com/meleu/share/master/system_specific_arcade_launching_images.sh
                          
                          mkdir /home/pi/RetroPie/scripts
                          
                          mv system_specific_arcade_launching_images.sh /home/pi/RetroPie/scripts
                          
                          chmod +x /home/pi/RetroPie/scripts/system_specific_arcade_launching_images.sh
                          
                          echo '/home/pi/RetroPie/scripts/system_specific_arcade_launching_images.sh $1 $2 "$3"' >> /opt/retropie/configs/all/runcommand-onstart.sh
                          

                          PS: I think it will also help lots of people if there would be a small "instruction" inside both runcommand-onxxxx.sh files!

                          # Example runcommand-onstart.sh
                          # --- BASENAMES ---
                          rom="$3"
                          es_system="$1"
                          emulator_used="$2"
                          
                          # --- ROMname Manipulation ---
                          #rom_name="$(basename "$rom")"
                          #rom_path="$(dirname "$rom")"
                          #rom_no_ext="${rom_name%.*}"
                          
                          # --- Configfile Playground ---
                          #config_dir="/opt/retropie/configs/$es_system"
                          #config_dir="/opt/retropie/configs/all"
                          #config_file="$config_dir/retroarch.cfg"
                          
                          # --- YOUR SCRIPTS HERE ---
                          /home/pi/RetroPie/scripts/system_specific_arcade_launching_images.sh "$es_system" "$emulator_used" "$rom"
                          
                          1 Reply Last reply Reply Quote 0
                          • AndersHPA
                            AndersHP
                            last edited by

                            So, with this new runcommand-onstart file, I'm afraid, still no launch images shows :(

                            What can I do to help? Could it be because my games are run off USB?

                            My "Bubble Bobble" Themed Bartop Arcade
                            My Gameboy

                            meleuM 1 Reply Last reply Reply Quote 0
                            • meleuM
                              meleu @AndersHP
                              last edited by meleu

                              @andershp said in Runcommand launch images automatically chosen for ROM-specific emulatorchoices:

                              Could it be because my games are run off USB?

                              Ouch!!! You can't create symbolic links on FAT partitions!

                              EDIT: yes. That's the cause.
                              Can you please launch an arcade game and then check what's in the /dev/shm/runcommand.log (post it on pastebin)?

                              • Useful topics
                              • joystick-selection tool
                              • rpie-art tool
                              • achievements I made
                              1 Reply Last reply Reply Quote 0
                              • AndersHPA
                                AndersHP
                                last edited by

                                Absolutely, good sir. Here's one for fba and one for mame2003:

                                fba 1942
                                mame-libretro 005

                                Should I also mention that I moved my artwork from roms/arcade/images to the default emulationstation/downloaded_images? Don't know if that's relevant.

                                My "Bubble Bobble" Themed Bartop Arcade
                                My Gameboy

                                cyperghostC meleuM 2 Replies Last reply Reply Quote 0
                                • cyperghostC
                                  cyperghost @AndersHP
                                  last edited by cyperghost

                                  @andershp That's relevant!
                                  If this fileformat is ext3/4 then this script should work!
                                  Change path in line 9 and test it!

                                  @meleu I think define a new parameter with path were the images are stored!
                                  [ -z "$4" ] && local arcade_imgs_dir="$HOME/RetroPie/roms/arcade/images" || local arcade_imgs_dir="$4"

                                  I assume that the script should work even with changed pathes ;)

                                  1 Reply Last reply Reply Quote 0
                                  • meleuM
                                    meleu
                                    last edited by

                                    I feel like in a RPG. Each step taken results in a new little bit of information. :D

                                    I'm currently enjoying the brazilian carnival. Will be able to take a look at it next week. ;)

                                    • Useful topics
                                    • joystick-selection tool
                                    • rpie-art tool
                                    • achievements I made
                                    1 Reply Last reply Reply Quote 0
                                    • AndersHPA
                                      AndersHP
                                      last edited by AndersHP

                                      Sorry man, I wasn't planning the move of files until lately, but the USB thing I did actually mention earlier...

                                      Enjoy yourself, sounds awesome!

                                      My "Bubble Bobble" Themed Bartop Arcade
                                      My Gameboy

                                      1 Reply Last reply Reply Quote 0
                                      • AndersHPA
                                        AndersHP
                                        last edited by

                                        Hey @meleu hope you had a blast in Brazil?

                                        Just wanted to check up on the status of this little script? I'm still really interested in getting it up and running, especially since I have the feeling that you've almost got it?

                                        My "Bubble Bobble" Themed Bartop Arcade
                                        My Gameboy

                                        1 Reply Last reply Reply Quote 0
                                        • meleuM
                                          meleu @AndersHP
                                          last edited by

                                          @andershp said in Runcommand launch images automatically chosen for ROM-specific emulatorchoices:

                                          Should I also mention that I moved my artwork from roms/arcade/images to the default emulationstation/downloaded_images? Don't know if that's relevant.

                                          Tell me the full path of that "default emulationstation/downloaded_images".

                                          • Useful topics
                                          • joystick-selection tool
                                          • rpie-art tool
                                          • achievements I made
                                          AndersHPA 1 Reply Last reply Reply Quote 0
                                          • AndersHPA
                                            AndersHP @meleu
                                            last edited by AndersHP

                                            @meleu the full paths to the three system-launch images is listed here, and the full path to the artwork for the games I will give you tonight.

                                            Though I don't understand why this is important. This folder only contains video previews, logos (wheelart) and boxart. Not launching images. If I remember correctly.

                                            My "Bubble Bobble" Themed Bartop Arcade
                                            My Gameboy

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            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.