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

    Need help with writing install script

    Scheduled Pinned Locked Moved Help and Support
    new emulatorinstalliationlr-melonds
    16 Posts 2 Posters 1.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.
    • UnknownU
      Unknown @mitu
      last edited by

      @mitu
      Well, that's not good. Is there another way to get it?

      mituM 1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator @Unknown
        last edited by mitu

        You could install it manually from source, and remove the dependency in the scriptmodule. During compilation, if needed, MelonDS will find it and use it.

        UnknownU 1 Reply Last reply Reply Quote 1
        • UnknownU
          Unknown
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • UnknownU
            Unknown @mitu
            last edited by

            @mitu I t appeears that "libslirp-dev" is avaliable for ubuntu.

            @mitu said in Need help with writing install script:

            What error do you get and where ? The depends functions looks ok, but the build part doesn't look correct - there's no melon-ds folder present in the source repository.

            Forgive me for asking, but what would you sugguest I replace:

            md_ret_require="$md_build/melonDS/src/frontend/libretro/melonDS_libretro.so"
            

            with?

            mituM 1 Reply Last reply Reply Quote 0
            • mituM
              mitu Global Moderator @Unknown
              last edited by mitu

              @unknown said in Need help with writing install script:

              @mitu I t appeears that "libslirp-dev" is avaliable for ubuntu.

              Yes, but only starting with Ubuntu 20.04 and it's not available for the platform you're trying to install it (Debian Buster).

              Forgive me for asking, but what would you sugguest I replace:

              md_ret_require="$md_build/melonDS/src/frontend/libretro/melonDS_libretro.so"
              

              with?

              Not sure what you're trying to do here - does MelonDS have a Libretro core that should appear at that location ? Because in the src/frontend folder, as present in the project's repository, there's no libretro folder.

              My advice would be to try to compile and use the emulator without resorting to RetroPie's scriptmodules, just following the project's installation instructions. This way you can test it's working, before resolving any issues that may appear in the scriptmodule.

              UnknownU 1 Reply Last reply Reply Quote 1
              • UnknownU
                Unknown @mitu
                last edited by

                @mitu I just relized that I wasn't cloning from the libretro core on github. Here is the current install script.

                #!/usr/bin/env bash
                
                # This file is part of The RetroPie Project
                #
                # The RetroPie Project is the legal property of its developers, whose names are
                # too numerous to list here. Please refer to the COPYRIGHT.md file distributed with this source.
                #
                # See the LICENSE.md file at the top-level directory of this distribution and
                # at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md
                #
                
                rp_module_id="lr-melonDS"
                rp_module_desc="NDS/DSI emu requries bios and firmware from DS/DSI port for libretro"
                rp_module_help="ROM Extensions: .nds .zip\n\nCopy your Nintendo DS/DSI roms to $romdir/nds"
                rp_module_licence="GPL2 https://github.com/libretro/melonDS/blob/master/LICENSE"
                rp_module_section="exp"
                #rp_module_flags="!all 64bit"
                
                function _params_lr-melonDS() {
                    local params=()
                    isPlatform "arm" && params+=("platform=armvhardfloat")
                    isPlatform "aarch64" && params+=("melonDS_JIT=0")
                    echo "${params[@]}"
                }
                
                function depends_lr-melonDS() {
                    getDepends cmake libcurl4-gnutls-dev libpcap0.8-dev libsdl2-dev qtbase5-dev qtdeclarative5-dev 
                }
                
                function sources_lr-melonDS() {
                    gitPullOrClone "$md_build" https://github.com/libretro/melonDS.git
                }
                
                function build_lr-melonDS() {
                    cd melon-ds/src/frontend/libretro
                    make clean
                    make $(_params_lr-melonDS)
                    #md_ret_require="$md_build/melonDS/src/frontend/libretro/melonDS_libretro.so"
                }
                
                function install_lr-melonDS() {
                    md_ret_files=(
                        'melonDS/src/frontend/libretro/melonDS_libretro.so'
                    )
                }
                
                function configure_lr-melonDS() {
                    mkRomDir "nds"
                    ensureSystemretroconfig "nds"
                
                    addEmulator 0 "$md_id" "nds" "$md_inst/melonDS_libretro.so"
                    addSystem "nds"
                }
                

                I still have to find the melonDS_libretro.so file, but this is progress!

                UnknownU 1 Reply Last reply Reply Quote 0
                • UnknownU
                  Unknown @Unknown
                  last edited by

                  Here is a link to my logfile:
                  https://github.com/Python-retropie-raspberry-pi-hobby/3/blob/main/README.md

                  mituM 1 Reply Last reply Reply Quote 0
                  • mituM
                    mitu Global Moderator @Unknown
                    last edited by

                    @unknown As I said, try to install the emulator first without the RetroPie script, including compilation, and see which steps are needed to compile and configure it.

                    UnknownU 2 Replies Last reply Reply Quote 1
                    • UnknownU
                      Unknown @mitu
                      last edited by

                      @mitu I will look into that, in the meantime here is the latest version of the install script.

                      #!/usr/bin/env bash
                      
                      # This file is part of The RetroPie Project
                      #
                      # The RetroPie Project is the legal property of its developers, whose names are
                      # too numerous to list here. Please refer to the COPYRIGHT.md file distributed with this source.
                      #
                      # See the LICENSE.md file at the top-level directory of this distribution and
                      # at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md
                      #
                      
                      rp_module_id="lr-melonDS"
                      rp_module_desc="NDS/DSI emu requries bios and firmware from DS/DSI melonDS port for libretro"
                      rp_module_help="ROM Extensions: .nds .zip\n\nCopy your Nintendo DS/DSI roms to $romdir/nds"
                      rp_module_licence="GPL2 https://github.com/libretro/melonDS/blob/master/LICENSE"
                      rp_module_section="exp"
                      rp_module_flags="!all 64bit"
                      
                      function _params_lr-melonDS() {
                          local params=()
                          isPlatform "arm" && params+=("platform=armvhardfloat")
                          isPlatform "aarch64" && params+=("melonDS_JIT=0")
                          echo "${params[@]}"
                      }
                      
                      function depends_lr-melonDS() {
                          getDepends cmake libcurl4-gnutls-dev libpcap0.8-dev libsdl2-dev qtbase5-dev qtdeclarative5-dev 
                          git clone https://github.com/virtualsquare/libvdeslirp.git 
                          cd bin
                          make -j8
                          sudo make install
                      }
                      
                      function sources_lr-melonDS() {
                          gitPullOrClone "$md_build" https://github.com/libretro/melonDS.git
                      }
                      
                      function build_lr-melonDS() {
                          cd melon-ds/src/frontend/libretro
                          make clean
                          make $(_params_lr-melonDS)
                          #md_ret_require="$md_build/lr-melonDS/src/frontend/libretro/melonDS_libretro.so"
                      }
                      
                      function install_lr-melonDS() {
                          md_ret_files=(
                              'lr-melonDS/src/frontend/libretro/melonDS_libretro.so'
                          )
                      }
                      
                      function configure_lr-melonDS() {
                          mkRomDir "nds"
                          ensureSystemretroconfig "nds"
                      
                          addEmulator 0 "$md_id" "nds" "$md_inst/melonDS_libretro.so"
                          addSystem "nds"
                      }
                      

                      I'm getting the feeling that this emulator will not work for 32bit.

                      1 Reply Last reply Reply Quote 0
                      • UnknownU
                        Unknown @mitu
                        last edited by

                        @mitu I've located a arm64bit version, but I haven't run it yet because apparently DSI bios isn't accepted. Also here are the compiling steps.

                        #Linux:
                        
                            Install dependencies: sudo apt install cmake libcurl4-gnutls-dev libpcap0.8-dev libsdl2-dev qt5-default libslirp-dev libarchive-dev libepoxy-dev
                            Download the melonDS repository and prepare:
                        
                        git clone https://github.com/Arisotura/melonDS
                        cd melonDS
                        mkdir build && cd build
                        
                           # Compile:
                        
                        mkdir -p build
                        cd build
                        cmake ..
                        make -j$(nproc --all)
                        

                        Any suggestions?

                        UnknownU 1 Reply Last reply Reply Quote 0
                        • UnknownU
                          Unknown @Unknown
                          last edited by

                          ok melonDS now offers a arm64 linux build which means it should work when retropie has a 64bit version. unfortunately we will have to wait until then for DSi

                          1 Reply Last reply Reply Quote 0
                          • UnknownU
                            Unknown
                            last edited by

                            @mitu Could you move this to “ideas and development “ please?

                            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.