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 68.2k 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.
    • cyperghostC
      cyperghost
      last edited by

      @meleu
      I planed something similar and wanted to write a program called little favourite launcher - but as always.... There is no time :(

      It uses not symbolic links but description files.
      So you create a file like Tetris (GB).fav
      The file contains two lines

      1. ROM fullpath
      2. runcommand

      For example
      ROM location: ~/RetroPie/roms/GB/Tetris (JUE) (V1.1) [!].gb
      runcommand: /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ gb

      The little launcher reads out those two lines and excutes the runcommand in addition with ROM path. and Execute: /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ gb ~/RetroPie/roms/GB/Tetris (JUE) (V1.1) [!].gb. That's just a 6 to 8 liner in any language you want.
      The big advantage is that you don't have to mess around with symlinks. To create the FAV files you can use any frontend you want.

      Changes that must be done to es_launcher.cfg

          <fullname>Favorites</fullname>
          <path>/home/pi/RetroPie/roms/favorites</path>
          <extension>.fav .FAV</extension>
          <command>.lilfavlaunch %ROM%</command>
          <platform>all</platform>
          <theme>Favorites</theme>
        </system>
      
      meleuM 1 Reply Last reply Reply Quote 1
      • meleuM
        meleu @cyperghost
        last edited by

        @cyperghost pretty cool idea too. But one thing I can anticipate is that it won't be possible to scrape in the traditional ways.

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

          Ah... You're right!
          Well, I never scrape :)
          I would suggest it as small workaround for a favorite folder

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

            @cyperghost if you were about to write a program to create those files, your program could also get the game's metadata info from the respective gamelist.xml and dump it in favorites/gamelist.xml. ;-)

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

              Sorry, this has been a bit hard to follow, I probably should know the answer here and it was likely answered before, but couldn't we just create a gamelist file that points to relative paths in other folders and achieve the same thing without the symbolic links?

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

                @pjft perfectly doable, but the problems would be:

                1. the users would need to edit konami/gamelist.xml manually, (less practical than ln -s target symlink).

                2. the script to launch the game would be a little more complex (get the actual system from the xml file).

                3. the use of gamelist.xml would be mandatory, not an option.

                I'll add this question to the FAQ.

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

                  @meleu Got it, thank you.

                  Just wanted to check if I was missing something from the overall picture, but it was mostly curiosity and feasibility for non-Linux file tables (i.e. those who run their ROMs from a FAT32 USB drive like me).

                  Well done!

                  Hope your boy has fully recovered by now :)

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

                    @meleu There is a difference in creating config files like a database or to create some filepieces to call some files. But here it is ... A pity I can't call other bash files.
                    I think it caused while a user (pi) calls user with privleges. It can run easy bash files and other binaries but this makes no sense so far :(

                    It's compiled on a raspberry 1 .... but due compatibilty it can run on the pi 2/3
                    Make it executable via chmod +x

                    Usage: create any file you want (maybe testfile.test)
                    First line contains parameters
                    Second contains binary or bash

                    run
                    ./lfl testfile.test

                    output is:
                    first line of testfile
                    second line of testfile
                    Execute firstline+secondline

                    EDIT:
                    Can't upload... well this small binary isn't usefull anyway :)

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

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

                      feasibility for non-Linux file tables (i.e. those who run their ROMs from a FAT32 USB drive like me)

                      The symbolic links must be in a Linux partition, but the target file can be in any valid path. As a FAT32 partition is mounted in a valid path, I think the method works fine for those people. :-)

                      The boy is recovering well! :-)

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

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

                        The symbolic links must be in a Linux partition, but the target file can be in any valid path. As a FAT32 partition is mounted in a valid path, I think the method works fine for those people. :-)

                        I think I get that, but if the whole ROM folder and subfolders are in a FAT32 partition, there's no way to add symlinks in a Linux partition for this purpose (i.e. all the roms are expected to be in that folder anyway), or am I missing something?

                        Or would you suggest in the es_systems.cfgfile to add a <path> pointing to a folder in the SD card? Is that what you'd be recommending?

                        Thanks!

                        cyperghostC meleuM 2 Replies Last reply Reply Quote 1
                        • cyperghostC
                          cyperghost @pjft
                          last edited by cyperghost

                          @pjft That should work
                          Create a folder to /home/pi/RetroPie/symlinks and point from FAT32-ROM to that folder
                          Change es_systems.cfgfolder path to /home/pi/RetroPie/symlinks

                          1 Reply Last reply Reply Quote 2
                          • meleuM
                            meleu @pjft
                            last edited by

                            @pjft yep! @cyperghost answered well.

                            Also, I've just updated the question 3 of the FAQ:

                            3. Is it possible to create symbolic links on a Windows machine and move them to my RetroPie later?

                            No. Symbolic links can't be created on Windows and can't be placed on a Windows partition.

                            But if your ROMs are stored on a Windows partition, you can use the method described here. You just have to place the symbolic links themselves on a Linux partition (target files can be in any valid path). Click here to see the conversation about it.

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

                              Excellent work, thanks for posting, will give this a go over the weekend!

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

                                Changelog:

                                Small update in the runcustom.sh. I've just discovered the readlink command, no need to pipe ls output to sed in order to get the target file name.

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

                                  @meleu
                                  So work done - I created a litlle unix binary for a fav launcher in a new thread

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

                                    Guess what? Yes, you're right, another script...

                                    This time it's a script to let you use the already existent metadata. So, there's no need to scrape the games in konami folder.

                                    The script can be found here: https://github.com/meleu/share/blob/master/custom-system-autoscraper.sh

                                    And you can download it with this command:

                                    wget https://raw.githubusercontent.com/meleu/share/master/custom-system-autoscraper.sh
                                    

                                    Launch it with --help to see the usage:

                                    $ ./custom-system-autoscraper.sh -h
                                    This script gets all the symbolic links in a custom ES system directory and
                                    tries to create a gamelist.xml based on already existent metadata, boxart,
                                    marquee, and video.
                                    
                                    More info here: https://retropie.org.uk/forum/post/84125
                                    
                                    Usage:
                                    ./custom-system-autoscraper.sh /path/to/custom/system/directory
                                    

                                    Updated the OP with this info.

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

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

                                      Maybe this one from title screen:

                                      Logo done. Complete manual design.

                                      0_1497034362790_megaman.png
                                      Works best on dark background.

                                      Available here.

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

                                        OMG! I'm loving this theme tweaking stuff!!!

                                        0_1497060729318_megaman-ES-pixel.png

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

                                          I'm still trying to fully understand the differences between the various config directories, but following along with the OP for setting up a Konani directory, I ended up getting it to work by editing my ~/.emulationstation/es_systems.cfg file instead of the one listed in /etc/emulationstation/ directory.

                                          Are the files in the ~/.emulationstation intended to be only for overrides, so essentially empty except for and local changes? I started with an existing image setup a few months ago, so while it's helpful for getting started, does add some confusion later on when trying to weed-out unnecessary files.

                                          melue, thanks for putting together this tutorial, very helpful, and thanks to UDB23 for the Mega Man vector, nice work!

                                          meleuM 2 Replies Last reply Reply Quote 2
                                          • meleuM
                                            meleu @Howitzer99
                                            last edited by meleu

                                            removed duplicated post (due to poor internet connection)

                                            • Useful topics
                                            • joystick-selection tool
                                            • rpie-art tool
                                            • achievements I made
                                            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.