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

    $md_inst string not working correctly when added against another string?v(lr-melondsds

    Scheduled Pinned Locked Moved Ideas and Development
    stringsndsmelonds
    10 Posts 4 Posters 550 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.
    • retropieuser555R
      retropieuser555
      last edited by

      I'm having an issue when writing a script to add a second string before the $md_inst script that generates for a retroarch game.

      function configure_lr-melondsds() {
          mkRomDir "nds"
          ensureSystemretroconfig "nds"
      
          local launch_prefix="XINIT-WM:"
      
          addEmulator 0 "$md_id" "nds" "$launch_prefix$md_insta/melondsds_libretro.so"
          addSystem "nds"
      }
      

      This just gives me XINIT-WM:opt/retropie/libretrocores/lr-melondsds/melondsds_libretro.so

      Any idea what I'm doing wrong with the two strings to make them play nice?

      Pi 5 4GB

      Retroflag GPI with raspberry pi zero 2 w/ wifi

      Retroachievements:- lovelessrapture

      ExarKunIvE S 2 Replies Last reply Reply Quote 0
      • ExarKunIvE
        ExarKunIv @retropieuser555
        last edited by

        @retropieuser555 why is xinit needed. It's a retroarch core. They don't need xinit to work

        RPi3B+ / 200GB/ RetroPie v4.5.14, RPi4 Model B 4gb / 256gb / RetroPie 4.8.2
        RPi5 4gb / 512gb / RetroPie 4.8.9 -Basic
        Maintainer of RetroPie-Extra .

        retropieuser555R 1 Reply Last reply Reply Quote 0
        • retropieuser555R
          retropieuser555 @ExarKunIv
          last edited by

          @ExarKunIv melondsds does, it has a strange geometry setting that doesn't play nice with runcommand, but the xinit setting allows it to launch fine

          Pi 5 4GB

          Retroflag GPI with raspberry pi zero 2 w/ wifi

          Retroachievements:- lovelessrapture

          ExarKunIvE 1 Reply Last reply Reply Quote 0
          • ExarKunIvE
            ExarKunIv @retropieuser555
            last edited by

            @retropieuser555 I see.
            Then it must be on the pi5 then. Others have used it on the pi4 and have not reported anything.

            RPi3B+ / 200GB/ RetroPie v4.5.14, RPi4 Model B 4gb / 256gb / RetroPie 4.8.2
            RPi5 4gb / 512gb / RetroPie 4.8.9 -Basic
            Maintainer of RetroPie-Extra .

            retropieuser555R 1 Reply Last reply Reply Quote 0
            • retropieuser555R
              retropieuser555 @ExarKunIv
              last edited by

              @ExarKunIv to clarify this isn't lr-melonds but lr-melondsds

              https://github.com/JesseTG/melonds-ds

              It's a fork that supports real microphones & a larger number of layout changes (specifically rotated screens for the book style DS games like Hotel Dusk)

              Pi 5 4GB

              Retroflag GPI with raspberry pi zero 2 w/ wifi

              Retroachievements:- lovelessrapture

              ExarKunIvE 1 Reply Last reply Reply Quote 0
              • S
                sleve_mcdichael @retropieuser555
                last edited by sleve_mcdichael

                (see next)

                S 1 Reply Last reply Reply Quote 0
                • S
                  sleve_mcdichael @sleve_mcdichael
                  last edited by sleve_mcdichael

                  Oh, I see. You're trying to do (re: helpers.sh:function addEmulator):

                  ## For libretro emulators, cmd needs to only contain the path to the libretro library.
                  

                  See the code which accomplishes this:

                      # automatically add parameters for libretro modules
                      if [[ "$id" == lr-* && "$cmd" =~ ^"$md_inst"[^[:space:]]*\.so ]]; then
                          cmd="$emudir/retroarch/bin/retroarch -L $cmd --config $md_conf_root/$system/retroarch.cfg %ROM%"
                      fi
                  

                  ...in the expression ^"$md_inst"[^[:space:]]*\.so, I believe the first "^" character matches the start of the string. So when you add another $launch_prefix variable before the $md_inst, it fails to match. I think in this case, you should spell out the whole $cmd explicitly, something like:

                  addEmulator 0 "$md_id" "nds" "$launch_prefix$emudir/retroarch/bin/retroarch -L $md_inst/melondsds_libretro.so --config $md_conf_root/$system/retroarch.cfg %ROM%"
                  
                  retropieuser555R 1 Reply Last reply Reply Quote 1
                  • ExarKunIvE
                    ExarKunIv @retropieuser555
                    last edited by

                    @retropieuser555 Oh

                    RPi3B+ / 200GB/ RetroPie v4.5.14, RPi4 Model B 4gb / 256gb / RetroPie 4.8.2
                    RPi5 4gb / 512gb / RetroPie 4.8.9 -Basic
                    Maintainer of RetroPie-Extra .

                    1 Reply Last reply Reply Quote 0
                    • LolonoisL
                      Lolonois
                      last edited by

                      This post is deleted!
                      1 Reply Last reply Reply Quote 0
                      • retropieuser555R
                        retropieuser555 @sleve_mcdichael
                        last edited by retropieuser555

                        @sleve_mcdichael Thanks for your help with this, you're a star. Oddly $system doesn't want to play ball and reports back empty, so I just changed that to nds directly and it works fine. Have added a PR into RetroPie Extras if anyone is curious to see the end result.

                        Oh also the core has networking support and works fine playing on wiimmf if anyone fancies a game of Mario Kart

                        Pi 5 4GB

                        Retroflag GPI with raspberry pi zero 2 w/ wifi

                        Retroachievements:- lovelessrapture

                        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.