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

    Launch custom images on boot of games

    Scheduled Pinned Locked Moved Help and Support
    imagevieweronstartruncommand
    26 Posts 5 Posters 2.0k 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.
    • IanDaemonI
      IanDaemon @Krakatoa
      last edited by IanDaemon

      @Krakatoa I actually use different images for the "launching images" than the ones scraped for ES selection. If you want the scraped images to be the same as the launching images that should be even easier. I think there is a setting in RetroPie menu under Runcommand settings to do that.

      • 5 Favorite Arcade Games in MAME
      • Cocktail Cabinet Games
      • Check out the MAME RoW
      KrakatoaK 1 Reply Last reply Reply Quote 0
      • KrakatoaK
        Krakatoa @IanDaemon
        last edited by

        @IanDaemon I tried that setting in the runcommand for doing that and it fails, I think its because of the way ARRM names the files, but I am not entirely sure. That why I went this route.

        To be honest I am good with whatever way is the easiest, as long as it works.

        johnodonJ 1 Reply Last reply Reply Quote 0
        • johnodonJ
          johnodon @Krakatoa
          last edited by

          @Krakatoa said in Launch custom images on boot of games:

          @johnodon yes the files are named like that. Its how the ARRM scraper names the files automatically.

          I figured changing the code would work, my question though is where do I make the change?

          If you are following my process, it would be in /opt/retropie/configs/all/runcommand-onstart.sh

          KrakatoaK 1 Reply Last reply Reply Quote 0
          • johnodonJ
            johnodon @Krakatoa
            last edited by

            @Krakatoa said in Launch custom images on boot of games:

            @IanDaemon I tried that setting in the runcommand for doing that and it fails, I think its because of the way ARRM names the files, but I am not entirely sure. That why I went this route.

            To be honest I am good with whatever way is the easiest, as long as it works.

            The problem with doing it in runcommand.sh is if that script is updated, you will lose your changes.

            KrakatoaK 1 Reply Last reply Reply Quote 0
            • KrakatoaK
              Krakatoa @johnodon
              last edited by

              @johnodon Doesn't your script call variables from the runcommand.sh?

              ROM_BN="**${ROM_BN_EXT%.*}**"
              LAUNCHIMAGE="/home/pi/RetroPie/roms/$1/images/launching/$ROM_BN-launching.png"
              

              The bolded is what I'm assuming needs to change. I don't really want to mess wit the runcommand though because it changes with updates. So that's where I'm stumped.

              johnodonJ 1 Reply Last reply Reply Quote 0
              • KrakatoaK
                Krakatoa @johnodon
                last edited by

                @johnodon I agree I don't want to change to touch he runcommand.sh. Maybe I can copy the variable from the script, rename it and add it to the runcommand-onstart.sh.

                1 Reply Last reply Reply Quote 0
                • johnodonJ
                  johnodon @Krakatoa
                  last edited by

                  @Krakatoa said in Launch custom images on boot of games:

                  @johnodon Doesn't your script call variables from the runcommand.sh?

                  Yes...my runcommand-onstart.sh captures the values for the runcommand.sh variables so they can be used for my purposes:

                  #! /bin/bash
                  ARCH=$(uname -m)
                  SYSTEM="$1"
                  RACORE="$2"
                  ROMPATH="$3"
                  ROM_BN_EXT="${ROMPATH##*/}"
                  ROM_BN="${ROM_BN_EXT%.*}"
                  LAUNCHIMAGE="/home/pi/RetroPie/roms/$1/images/launching/$ROM_BN-launching.png"
                  case $ARCH in
                    armv7l)
                      fbi -1 -t 0 -noverbose -a "$LAUNCHIMAGE" </dev/tty &>/dev/null &
                      IMAGEVIEWER="fbi"
                      ;;
                    i386 | i686 | x86_64)
                      feh -F -N -Z -Y -q "$LAUNCHIMAGE" & &>/dev/null &
                      IMAGEVIEWER="feh"
                      ;;
                    *)
                      ;;
                  esac
                  export RACORE
                  export IMAGEVIEWER
                  ( /opt/retropie/configs/all/pause.sh ) &
                  

                  These two lines get the romname.extension and trims off the extension (i.e. zaxxon.zip --> zaxxon) and writes it to a local variable (ROM_BN)

                  ROM_BN_EXT="${ROMPATH##*/}"
                  ROM_BN="${ROM_BN_EXT%.*}"
                  

                  The LAUNCHIMAGE variable is then constructed by concatenating the full path to the romfile (/home/pi/RetroPie/roms/$1/images/launching/ <-- where $1 = the system name) + $ROM_BN (zaxxon) + -launching.png

                  This translates into /home/pi/RetroPie/roms/arcade/images/launching/zaxxon-launching.png

                  I don't see why this wouldn't work...

                  LAUNCHIMAGE="/home/pi/RetroPie/roms/$1/downloaded_images/$ROM_BN_screenscraper_boxart_arrm.png"

                  ...again, unless the _ after the variable is screwing it up. Launch a games and then look at the runcommand.log by doing cat /dev/shm/runcommand.log. Sometimes you will catch the error in there.

                  KrakatoaK 1 Reply Last reply Reply Quote 0
                  • KrakatoaK
                    Krakatoa @johnodon
                    last edited by Krakatoa

                    @johnodon Thanks for the detailed info. I will do some debugging when I get home from work tonight.

                    Actually the more I think about it, that's the issue. If I place the variable in braces it should work. Basically escaping it.

                    LAUNCHIMAGE="/home/pi/RetroPie/roms/$1/downloaded_images/${ROM_BN}_screenscraper_boxart_arrm.png"
                    
                    ClydeC 1 Reply Last reply Reply Quote 0
                    • ClydeC
                      Clyde @Krakatoa
                      last edited by

                      @Krakatoa Just to throw another possible solution on the table, I recently wrote a little script to link Skyscraper's cover artwork to the corresponding launching images. Maybe with a little rewrite, you could use that for your undertaking.

                      See https://retropie.org.uk/forum/post/223113 for the script.

                      KrakatoaK 1 Reply Last reply Reply Quote 0
                      • KrakatoaK
                        Krakatoa @Clyde
                        last edited by

                        @Clyde Thanks, I'll take look.

                        1 Reply Last reply Reply Quote 0
                        • KrakatoaK
                          Krakatoa
                          last edited by

                          Ok, Adding the curly braces works, but its very buggy. It loads the screens when exiting games, also loads it when going into config menus. So it must be caching it somewhere.

                          Does anyone know the directories/files it looks for when setting this up from the run command?

                          IanDaemonI 1 Reply Last reply Reply Quote 0
                          • IanDaemonI
                            IanDaemon @Krakatoa
                            last edited by

                            @Krakatoa Can't you use -onstart.sh and -onend.sh?

                            • 5 Favorite Arcade Games in MAME
                            • Cocktail Cabinet Games
                            • Check out the MAME RoW
                            KrakatoaK 1 Reply Last reply Reply Quote 0
                            • KrakatoaK
                              Krakatoa @IanDaemon
                              last edited by

                              @IanDaemon Maybe. though that's probably beyond my skills. Does anyone know what folders the runcommand looks for when it runs lunch menu art?

                              "Launch Menu Art: If enabled, any scraped box art you have for a game will show up as a splashscreen while your game loads up."

                              IanDaemonI 1 Reply Last reply Reply Quote 0
                              • IanDaemonI
                                IanDaemon @Krakatoa
                                last edited by

                                @Krakatoa Depending on where you have the system save it could be \\THINCOCKTAIL\roms\arcade\media\screenshots where the machine is named "THINCOCKTAIL" and the system is "arcade".

                                • 5 Favorite Arcade Games in MAME
                                • Cocktail Cabinet Games
                                • Check out the MAME RoW
                                KrakatoaK 1 Reply Last reply Reply Quote 0
                                • KrakatoaK
                                  Krakatoa @IanDaemon
                                  last edited by Krakatoa

                                  @IanDaemon Is that path hardcoded? My path to the images are

                                  \\retropie\roms\atomiswave\media\images\game.png

                                  IanDaemonI 1 Reply Last reply Reply Quote 0
                                  • IanDaemonI
                                    IanDaemon @Krakatoa
                                    last edited by IanDaemon

                                    @Krakatoa Hmm,
                                    I create custom loading images in Photoshop and put them in
                                    \\[machine]\roms\\[system]\images\\[game]-launching.png.

                                    I find scraped images (from Skyscraper) in
                                    \\[machine]\roms\\[system]\media\screenshots\\[game].png
                                    and
                                    \\[machine]\roms\\[system]\media\marquees\\[game].png.

                                    • 5 Favorite Arcade Games in MAME
                                    • Cocktail Cabinet Games
                                    • Check out the MAME RoW
                                    KrakatoaK 1 Reply Last reply Reply Quote 0
                                    • KrakatoaK
                                      Krakatoa @IanDaemon
                                      last edited by

                                      @IanDaemon that’s why I am looking for the path as each scraper uses different folders. I use both AARM and Skraper https://www.skraper.net/ For scraping. I’m planning on going fully to Skraper if I can get these images loading on boot.

                                      1 Reply Last reply Reply Quote 0
                                      • IanDaemonI
                                        IanDaemon
                                        last edited by IanDaemon

                                        On my system Skraper and Skyscraper both save in the same folder.
                                        (However I did select "use rom folder for scraped images" somewhere so that may be having an effect.)

                                        • 5 Favorite Arcade Games in MAME
                                        • Cocktail Cabinet Games
                                        • Check out the MAME RoW
                                        KrakatoaK 1 Reply Last reply Reply Quote 0
                                        • WeirdHW
                                          WeirdH @Krakatoa
                                          last edited by

                                          @Krakatoa Changing one uniform underscore in thousands of files is no hassle at all with Bulk Rename Utility. Check out my posts here.

                                          KrakatoaK 1 Reply Last reply Reply Quote 0
                                          • KrakatoaK
                                            Krakatoa @IanDaemon
                                            last edited by

                                            @IanDaemon thanks. I’ll try that.

                                            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.