RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    Create a custom ES system able to launch games for many systems

    Scheduled Pinned Locked Moved Ideas and Development
    emulationstatiocustomisationscustom theme
    157 Posts 15 Posters 67.1k 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 @hansolo77
      last edited by

      @hansolo77 said in Create a custom ES system able to launch games for many systems:

      1 - Does it NEED to be in that folder at all though? Is it safe where I have it in /home/pi/?

      No. Yes, just change es_systems.cfg accordingly.

      2 - Does ES look in the ~/.emulationstation/es_systems.cfgfirst?

      Yes.

      5 - https://github.com/meleu/hascheevos#create-a-list-of-all-roms-that-have-cheevos-in-a-directory (step #4)

      # adapt the path below to your setup!
      export PATH="$PATH:/path/to/hascheevos/bin"
      

      I tried to map it to /home/pi/hascheevos/bin, /home/pi/hascheevos/bin/hascheevos.sh, ~/hascheevos/bin/ etc.. none of them work.

      Oh, I got it. I would need to know what exactly you typed to help with this. But this is subject for that other thread. Feel free to ask there, but please give more details of what you typed and error you got.

      Have a good night Han!

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

        @meleu
        Just logged in for small comment. You are awesome! I am still in holiday and enjoying it.

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

          @cyperghost thanks for the kind words bro. Enjoy your time!

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

            Yesterday I realized I had a lot of my modded roms (that I got for cheevos) only in my "Achievements" sub folders. So I moved those back into their root system folders with the rest of their rom brothers. That then prompted me to have to re-scrape all my roms so that when I migrate them over to the new custom system, they'll all still have proper metadata. Took me all day yesterday, then I realized I didn't have the naming scheme set right (the last scrape I did was for MAME so I had changed it). So today I'm re-scraping again, but this time I made sure to have the name scheme set right! Oh well, I'll get there eventually.

            Who's Scruffy Looking?

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

              @hansolo77 what do you mean by "naming scheme set right"? What would be the right naming scheme?

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

                @meleu I was using USX and had it configured to provide just the Game Name in the gamelist.xml. Since I'm using a no-intro romset, the resulting gamelist had a bunch of duplicate game names. This is a bother to me, because if there are multiple versions of games, I want to know which one I'm loading up. So now I'm scraping using the scheme "filename", so it will provide me with the extra bits of info at the end (like USA, Japan, v1.0, v1.2, etc.

                Who's Scruffy Looking?

                TMNTturtlguyT 1 Reply Last reply Reply Quote 1
                • TMNTturtlguyT
                  TMNTturtlguy @hansolo77
                  last edited by

                  @hansolo77 why did you have to rescrape? Just because you moved the roms to a different folder? You could just use notepad++ and do a replace all to all the files in the folder. Takes about 10 seconds.

                  1 Reply Last reply Reply Quote 0
                  • hansolo77H
                    hansolo77
                    last edited by

                    There's more to it than that though. All my achievement artwork was saved with the folder name as part of the filename. So they all looked like _ACHIEVEMENTS_Sonic 1 (etc).mp4. It's all good. I'm in the process of making the symlinks now. Fingers crossed!

                    I also create a system logo for Achievements. I was going to upload it the ComicBook theme page, but everything says the file is corrupted or something. I even tried to copy it back over from the Pi and still no good. If it's corrupted, it shouldn't work with the Pi either right? I dunno. It works, that's all that matters.

                    Who's Scruffy Looking?

                    1 Reply Last reply Reply Quote 0
                    • hansolo77H
                      hansolo77
                      last edited by hansolo77

                      I think I got it working! Took forever adding the last couple of systems, probably due to memory or something. All told, I now have a custom system named "Achievements", and there are currently 1426 games to choose from! :) I need to do some further checking and testing, but so far all the games look like they have proper metadata installed.

                      Next on my list - figure out how to get the ComicBook loading screens to install.

                      Thanks @meleu !!!

                      Who's Scruffy Looking?

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

                        @hansolo77 said in Create a custom ES system able to launch games for many systems:

                        figure out how to get the ComicBook loading screens to install.

                        Didn't rpie-art work for you?

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

                          I never progressed any further with it because I can't get it to load up in the Retropie menu. I'm tackling this today.

                          Who's Scruffy Looking?

                          1 Reply Last reply Reply Quote 0
                          • namyzarkN
                            namyzark @meleu
                            last edited by

                            @meleu said in Create a custom ES system able to launch games for many systems:

                            https://retropie.org.uk/forum/topic/11499/change-es_systems-cfg-script

                            Wonderful! I have combined @TMNTturtlguy 's change ES system script with @meleu 's 'Custom ES System able to launch games for many systems. I have a very happy family right now.

                            Next: to see if I can combine symbolic links with actual games files so that multiple people in my house can play the same game without overwriting each others save games/save states.

                            1 Reply Last reply Reply Quote 2
                            • pjftP
                              pjft
                              last edited by

                              Hi all,

                              The ability to create custom collections (effectively, custom systems) from within ES is now available.

                              Best.

                              1 Reply Last reply Reply Quote 1
                              • TMNTturtlguyT
                                TMNTturtlguy @meleu
                                last edited by

                                @meleu said in Create a custom ES system able to launch games for many systems:

                                @tmntturtlguy said in Create a custom ES system able to launch games for many systems:

                                @meleu Is there anyway that we can point the custom folders with the symlinks to use a custom launching image?

                                We can think in a workaround for it, but currently not.

                                Maybe it's better to use the game specific launching image feature.

                                More info in the docs: https://retropie.org.uk/docs/Runcommand/#adding-custom-launching-images

                                So I know most users are now using the neat and easy custom collections in ES, but for anyone still using this symlink method, i have figured out how to do what I had originally asked in an early post, quoted above. Now when I launch a rom from my TMNT collection my TMNT launch screen appears based on the theme. When I launch a Mega Man game from my Mega Man collection, a Mega Man launch screen appears. If i launch the same game from the NES system, the NES launch screen appears! Here is how to do it, if anyone is interested:

                                • Go to /opt/retropie/configs/all/emulationstation

                                  • Create a folder called “Launching”
                                    • Place folders for each system within this folder, with the launching image inside that folder
                                    • Example, place TMNT folder here with “Launching.png”
                                • Create a folder called “runcommand”

                                  • Place a custom runcommand.sh file for each custom system here named with the custom system at the end:
                                    • Example: runcommonandtmnt.sh
                                  • Edit runcommand starting at line 915
                                • # look for custom launching images
                                   if [[ "$IS_SYS" -eq 1 ]]; then
                                  images+=(
                                  "$HOME/.emulationstation/Launching/TMNT/launching"
                                  )
                                  Fi
                                  
                                • Go to /home/pi/bin/

                                  • Add custom runcommand for each system
                                    • Example: runcustomtmnt.sh
                                  • Edit the last line to launch the custom runcommand from above
                                    • Example:
                                      - /opt/retropie/configs/all/emulationstation/runcommand/runcommandtmnt.sh 0 _SYS_ "$system" "$rom"
                                • In putty, go to both new runcommand files and type the following:

                                  • chmod +x nameofruncommand.sh
                                • Go to your es_systems.cfg

                                  • Modify your runcommand for each system to the new runcustom.sh you created. Example: runcustomtmnt.sh

                                So anyone crazy enough to have read through this without just leaving the post might want to know why I am still running the custom systems through the script and not using the newest updates to ES. There are a few reasons:

                                1. I already went through all the work to set these up about 2 months prior to this being available in ES.
                                2. Using this symlink script I am able to have a gamelist for each custom system. I can then modify my images and marquees to be different than in the standard system list.
                                3. I now have the ability to have the custom launching images for each custom system.
                                4. Bottom line, it is a lot more work for the same results, but I have a lot more flexibility to set them up exactly how I want them.
                                cyperghostC 1 Reply Last reply Reply Quote 0
                                • cyperghostC
                                  cyperghost @TMNTturtlguy
                                  last edited by cyperghost

                                  @tmntturtlguy That's very complicate! And we have the ES collections as @pjft mentioned. But of course that scripting provides much more flexibility ... You are so a kind of person... here we go!

                                  You forget... there are other "entrypoints" as only the runcommand.sh as it's the "brain" of our RetroPie I would leave it untouched.

                                  I would do following:
                                  You have already a bash-file that provides $rom (that's the runcustom.sh)
                                  So you can identify the system by filepath...

                                  1. Best method is to compare es_system.cfg rom filepathes with extraced one = 100% working methof
                                  2. Set the filepathes on your own script so /home/pi/roms/nes could be NES system

                                  Next step...

                                  As an example...
                                  You identified it as SNES system
                                  Then you extract the original launch-image for SNES system and temporarily move it somewhere and copy launch image of a custom system...

                                  To genereate a generel script you can use command line parametes like -megaman or -tmnt ....

                                  So for your MEGANMAN "system" in es_systems.cfg you set

                                  <command>/home/pi/bin/runcustom.sh %ROM% -megaman</command>
                                  

                                  and then create "usecases" for the parameters "-megaman" "-tmnt" "-mario".... within @meleu runcustom.sh script!

                                  Last line reverts all back to normal!

                                  TMNTturtlguyT 1 Reply Last reply Reply Quote 0
                                  • TMNTturtlguyT
                                    TMNTturtlguy @cyperghost
                                    last edited by

                                    @cyperghost Thanks as always for your kind and quick response to help me out!

                                    I have a few questions for you as I am not fully understanding your instructions:

                                    1. In regards to the runcomand.sh file - Yes i understand it is the brain of running the roms. I have left the runcommand.sh in its original location and it is untouched. It still runs all the roms for the normal systems. The modified runcommands are moved to the .emulationstation folder, thus they will not be orverwritten, and I can simply delete them change my es_systems.cfg back to the original path for my custom systems. In theory, if anything does not function properly, I can simply revert back with no harm done. Do you see any issues with this thinking?
                                    2. I have my full system setup, and don't plan to change how anything is executed outside of the retroarch files themselves. I have only modified the location in which the runcommand pulls the launch image. What if any are the downsides of doing this? All other runcommand functions are untouched and as it is the "brain" it should not see or execute any differently than the standard runcommand.

                                    Now onto your solution, I think this might be more elegant than my attempt, however I am unclear on how it works.

                                    Best method is to compare es_system.cfg rom filepathes with extraced one = 100% working methof
                                    Set the filepathes on your own script so /home/pi/roms/nes could be NES system

                                    • what are you stating here? I don' t follow. are you moving the roms location? if i repath the roms folder, then i would no longer be launching the same rom from the original location, which defeats the purpose of @meleu's script. Please explain more if you have the time.

                                    Last line reverts all back to normal!

                                    • what do you mean here? Currently @meleu's runcustom.sh script tells to launch using the original runcommand for the rom in its original system folder. That is the end of the runcustom.sh and it turns everything over to the runcommand.sh file. How would I create a last line to set all back to normal in the runcustom.sh script?

                                    Again, thank you for all of your help!

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

                                      @TMNTturtlguy @cyperghost hello fellows!
                                      IMHO you guys are going through a very complex/confusing way. I already have thought on a simpler solution for this, just give me a couple of days to implement and test, and then I'll let you know when it's ready. ;-)

                                      • Useful topics
                                      • joystick-selection tool
                                      • rpie-art tool
                                      • achievements I made
                                      cyperghostC 1 Reply Last reply Reply Quote 1
                                      • cyperghostC
                                        cyperghost @TMNTturtlguy
                                        last edited by cyperghost

                                        @tmntturtlguy Yes... sometimes I have two or three ideas together and it's a bit diffucult to explain.

                                        So next attempt!

                                        My idea is following. The launch images are fixed for each system. So a SNES ROM launches a SNES images. But it's your turn to decide what is the content of the picture ;)

                                        What I mean with this?

                                        Best method is to compare es_system.cfg rom filepathes with extraced one = 100% working methof
                                        Set the filepathes on your own script so /home/pi/roms/nes could be NES system

                                        The runcostum script extracts ROM name and ROM system (Good work @meleu)
                                        But I'm not sure if ROM $system equals all usecases.
                                        For NES and SNES it may work ;) but to cover all usecases it would use the ROMs folder and compare location string with es_systems.cfg >> 100% working solution.

                                        But the $system should also work

                                        Then you add following to runcostum.sh
                                        As I don't know the location of the custom-launch-images I use just the name megaman.jpg

                                        # Set custom lauching image
                                        mv "/opt/retropie/configs/$system/launching.jpg" "/opt/retropie/configs/$system/launching.jpg.org"
                                        cp megman.jpg  "/opt/retropie/configs/$system/launching.jpg"
                                        
                                        # Start  runcommand
                                        /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ "$system" "$rom"
                                        
                                        # Revert back
                                        rm "/opt/retropie/configs/$system/launching.jpg"
                                        mv "/opt/retropie/configs/$system/launching.jpg.org" "/opt/retropie/configs/$system/launching.jpg"
                                        

                                        With the parameter you can avoid to use megaman.jpg as hard coeded rather set general usecases ;)

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

                                          @meleu Is this a solution I posted above is in your mind?
                                          Hello my friend ;)

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

                                            @cyperghost To be honest I'm against this solution. If for some reason the user turns off the pi while emulator is running, it will mess his/her launching images configs and will lead to confusion.
                                            Wait a little, it should be a way simpler than those workaround solutions... :-)

                                            • Useful topics
                                            • joystick-selection tool
                                            • rpie-art tool
                                            • achievements I made
                                            cyperghostC 1 Reply Last reply Reply Quote 1
                                            • 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.