• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
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

Using custom script that is not runcommand.sh does not work

Scheduled Pinned Locked Moved Help and Support
scripting
36 Posts 3 Posters 3.7k 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.
  • R
    RetroFloppy08 @RetroFloppy08
    last edited by 10 Nov 2022, 14:09

    @RetroFloppy08 Furthermore, if the check for a PSX game (as an example) fails, it moves on to checking for another system (eg. SNES) and so on and so forth.

    R F 2 Replies Last reply 10 Nov 2022, 14:11 Reply Quote 0
    • R
      RetroFloppy08 @RetroFloppy08
      last edited by 10 Nov 2022, 14:11

      @RetroFloppy08 The main reason i'm attempting this is because of a project i've been working on that aims to get game disc support on RetroPie. I've worked out mounting and loading the contents of the disc, and remounting it after a swap, but so far the only system properly supported is PSX, as there exists no pre-made way to detect file types and run the corresponding emulator.

      1 Reply Last reply Reply Quote 0
      • F
        Folly @RetroFloppy08
        last edited by Folly 11 Oct 2022, 14:22 10 Nov 2022, 14:12

        @RetroFloppy08

        Ok, I read your post.
        Really not sure what you are trying to do here.
        Basically you want to detect filetype and the run the appropriate runcommand.

        Perhaps this is something to look at (read lines 66-83) :
        https://github.com/FollyMaddy/RetroPie-Share/blob/main/00-scriptmodules-00/emulators/b-em-allegro4.sh
        On the extentsion it detects whether it's a tape or a disk and loads the appropriate commands.

        Looks like this is somewhat you want to do.

        R 2 Replies Last reply 10 Nov 2022, 14:21 Reply Quote 0
        • R
          RetroFloppy08 @Folly
          last edited by 10 Nov 2022, 14:21

          @Folly Basically:

          -User selects ROM from EmulationStation
          -Custom script runs in place of runcommand.sh (thanks, es_systems.cfg)
          -Custom script detects file extension, then uses runcommand.sh to load the correct emulator

          F 1 Reply Last reply 10 Nov 2022, 14:24 Reply Quote 0
          • F
            Folly @RetroFloppy08
            last edited by 10 Nov 2022, 14:24

            @RetroFloppy08

            Well look at my earlier post.

            It runs that multiload.sh with the runcommand.sh and then the multiload.sh script does the rest without using runcommand.sh.

            1 Reply Last reply Reply Quote 0
            • R
              RetroFloppy08 @Folly
              last edited by 10 Nov 2022, 14:24

              @Folly Looking at the link, it's not exactly what i'm looking for. I shouldn't need too much code, just some if else statements.

              F R 2 Replies Last reply 10 Nov 2022, 14:26 Reply Quote 0
              • F
                Folly @RetroFloppy08
                last edited by 10 Nov 2022, 14:26

                @RetroFloppy08

                And did you try the suggestions earlier in the thread ?

                1 Reply Last reply Reply Quote 0
                • R
                  RetroFloppy08 @RetroFloppy08
                  last edited by 10 Nov 2022, 14:30

                  @RetroFloppy08 Of course, I would need some kind of way to load the ROM's filename in question. That's the problem i'm facing currently.

                  F 1 Reply Last reply 10 Nov 2022, 14:31 Reply Quote 0
                  • F
                    Folly @RetroFloppy08
                    last edited by 10 Nov 2022, 14:31

                    @RetroFloppy08

                    From the CLI or from emulationstation ?

                    R 1 Reply Last reply 10 Nov 2022, 14:32 Reply Quote 0
                    • R
                      RetroFloppy08 @Folly
                      last edited by 10 Nov 2022, 14:32

                      @Folly EmulationStation.

                      F 1 Reply Last reply 10 Nov 2022, 14:40 Reply Quote 0
                      • F
                        Folly @RetroFloppy08
                        last edited by 10 Nov 2022, 14:40

                        @RetroFloppy08

                        You need somehow to add an other system that will load the .chd file and redirects it to your bash script which will detect the extension and then uses the correct runcommand.

                        R 1 Reply Last reply 10 Nov 2022, 14:44 Reply Quote 0
                        • R
                          RetroFloppy08 @Folly
                          last edited by 10 Nov 2022, 14:44

                          @Folly That's what I've done. I made a seperate system reserved for loading games from the disc. It also uses the custom script.

                          F 1 Reply Last reply 10 Nov 2022, 14:46 Reply Quote 0
                          • F
                            Folly @RetroFloppy08
                            last edited by 10 Nov 2022, 14:46

                            @RetroFloppy08

                            So what is your custom system name then ?
                            And how did you configure it ?

                            R 1 Reply Last reply 10 Nov 2022, 14:51 Reply Quote 0
                            • R
                              RetroFloppy08 @Folly
                              last edited by 10 Nov 2022, 14:51

                              @Folly If you look at the initial post, you can see the system entry.

                              F 1 Reply Last reply 10 Nov 2022, 14:56 Reply Quote 0
                              • F
                                Folly @RetroFloppy08
                                last edited by Folly 11 Oct 2022, 14:59 10 Nov 2022, 14:56

                                @RetroFloppy08

                                Is that all you added ?
                                You will need to add much more to get it working.

                                So you have 2 choices.
                                Make a module-script like the example I gave you earlier , or do all the setting manually.
                                You can have a look here on how to do it manually :
                                https://retropie.org.uk/forum/topic/28462/tutorial-handheld-and-plug-play-systems-with-mame

                                And replace mame or emulator with your script and no need to use some retroarch.cfg.

                                R 1 Reply Last reply 10 Nov 2022, 15:02 Reply Quote 0
                                • R
                                  RetroFloppy08 @Folly
                                  last edited by 10 Nov 2022, 15:02

                                  @Folly Hmm. Seems like I've got a lot of work to do. I'll let you know how it goes.

                                  F 1 Reply Last reply 10 Nov 2022, 15:04 Reply Quote 0
                                  • F
                                    Folly @RetroFloppy08
                                    last edited by 10 Nov 2022, 15:04

                                    @RetroFloppy08

                                    Can you filter all the nonsense and pick the correct things for yourself ?

                                    R 1 Reply Last reply 10 Nov 2022, 15:06 Reply Quote 0
                                    • R
                                      RetroFloppy08 @Folly
                                      last edited by 10 Nov 2022, 15:06

                                      @Folly I can certainly try. I'm seeing some key things already, for example lines at the end that use the %ROM% argument to load a file from EmulationStation.

                                      F 1 Reply Last reply 10 Nov 2022, 15:08 Reply Quote 0
                                      • F
                                        Folly @RetroFloppy08
                                        last edited by 10 Nov 2022, 15:08

                                        @RetroFloppy08

                                        Ok, good luck.

                                        Try this first, otherwise I recommend you to make a module-script.
                                        Once you know how, then it's the easiest way.

                                        R 1 Reply Last reply 10 Nov 2022, 15:19 Reply Quote 0
                                        • R
                                          RetroFloppy08 @Folly
                                          last edited by 10 Nov 2022, 15:19

                                          @Folly 03194593-0046-4323-8de9-8c6338d71ef9-image.png These are the lines I have narrowed down. I have a feeling they're wrong, so if they are, please tell me.

                                          F 1 Reply Last reply 10 Nov 2022, 16:49 Reply Quote 0
                                          31 out of 36
                                          • First post
                                            31/36
                                            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.

                                            This community forum collects and processes your personal information.
                                            consent.not_received