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

    3DS emulator for Pi users based on "Borked 3DS"

    Scheduled Pinned Locked Moved Projects and Themes
    nintendo 3dspi 4pi5borked 3ds
    80 Posts 6 Posters 8.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.
    • F
      Folly @DTEAM
      last edited by Folly

      This post isn't correct !!!

      @DTEAM

      I checked the helpers.sh file from RetroPie-Setup if it is possible to use a function to use "git submodule update etc." in the script as a function.
      Seems there is no function for that, however I found that when a clone is already present in the temp build folder and if it's on a tracking branch then the function seems to do something else and will do the "git submodule update".
      Not sure but this could be the issue with the script if not all submodules are downloaded the first time with the individual git clones then the second time it will do the automatic "git submodule update".

      See here.
      Remember it's part of this function here

      Might be that you can just remove all individual git submodule cloning and replace that with just :

      runCmd git submodule update --init --recursive
      

      Just like with compiling manually, understand ?

      Edit :
      Btw.
      For now robin-map is a submodule of teakra not of Borked3DS
      Here could be the problem too

      DTEAMD 1 Reply Last reply Reply Quote 1
      • DTEAMD
        DTEAM @Folly
        last edited by DTEAM

        @Folly said in 3DS emulator for Pi users based on "Borked 3DS":

        I did not use the sudo command when compiling manually, there is no need to do so.

        I agree, and it's easier to delete something after if needed

        1 Reply Last reply Reply Quote 1
        • TPRT
          TPR @DTEAM
          last edited by

          @DTEAM said in 3DS emulator for Pi users based on "Borked 3DS":

          @TPR

          This thread is a "work in progress thread" for a Nintendo 3DS emulator for Pi based on Borked3DS. Here's the status (@gvx64 can confirm or add comments)

          • Once installed, the emulator works well on Pi4 (64-bit) and Pi5 (64-bit)
          • Right now, the big issue is with CMake
          • You need to upgrade your CMake version. You can follow the last post here, but do a sd card backup first.
          • The emulator runs with GLES 3.1 on Pi and not Vulkan for now, @gvx64 put a lot of energy on that and fixed a lot of issues with GLES 3.1.
          • I'll add the line below in the script when the CMake issue will be fixed. For now, put it in /etc/emulationstation/es_systems.cfg like @gvx64 says here
          env MESA_EXTENSION_OVERRIDE=GL_OES_texture_buffer
          
          • The hotkey combos doesn't work for now with gamepads. Only work with keyboard.
          • You need a mouse for now to control the arrow in the UI and in some games. The joystick can't control the arrow like the Nintendo DS emulator.
          • You can get the installation script on Retropie Extra, It takes 2 times to install it. First installation stops at 95% and you restart it and you should be good.
          • Some settings affect performance (like some sound settings and 3D options), with the right settings you can easily play at full speed on a Pi5.

          Here's the GitHub link for Borked3ds-rpi

          Fantastic re-cap! Thank you!

          1 Reply Last reply Reply Quote 1
          • DTEAMD
            DTEAM @Folly
            last edited by DTEAM

            @Folly said in 3DS emulator for Pi users based on "Borked 3DS":

            Might be that you can just remove all individual git submodule cloning and replace that with just :

            runCmd git submodule update --init --recursive
            Just like with compiling manually, understand ?

            I understand, but don't know how to add it in the script. if I deleted depends fonction and replace that by your line, it doesn't work. I'm gonna read some .sh file to see how they manage that

            F 2 Replies Last reply Reply Quote 0
            • F
              Folly @DTEAM
              last edited by Folly

              @DTEAM said in 3DS emulator for Pi users based on "Borked 3DS":

              @Folly said in 3DS emulator for Pi users based on "Borked 3DS":

              Might be that you can just remove all individual git submodule cloning and replace that with just :

              runCmd git submodule update --init --recursive
              Just like with compiling manually, understand ?

              I understand, but don't know how to add it in the script. if I deleted depends fonction and replace that by your line, it doesn't work. I'm gonna read some .sh file to see how they manage that

              You have to keep the depends function.
              It needs to be in the sources function.

              Edit:
              I will add an example later after diner ;-)

              1 Reply Last reply Reply Quote 0
              • F
                Folly @DTEAM
                last edited by Folly

                @DTEAM said in 3DS emulator for Pi users based on "Borked 3DS":

                @Folly said in 3DS emulator for Pi users based on "Borked 3DS":

                Might be that you can just remove all individual git submodule cloning and replace that with just :

                runCmd git submodule update --init --recursive
                Just like with compiling manually, understand ?

                I understand, but don't know how to add it in the script. if I deleted depends fonction and replace that by your line, it doesn't work. I'm gonna read some .sh file to see how they manage that

                Sorry I assumed you did clone submodules in your sources function.
                Now seeing again at your script I see that they are other branches commented.

                I will check your script when running the sources function to see if it gets the submodules in 1 go with :
                sudo ./retropie_packages.sh borked3ds sources

                OK, forget what I said earlier about "git submodule update".
                I doesn't seem valid !
                It seems that the submodules are retrieved properly by your script.

                DTEAMD 1 Reply Last reply Reply Quote 0
                • DTEAMD
                  DTEAM @Folly
                  last edited by DTEAM

                  @Folly @gvx64

                  This is not the full log (too big for pastebin), but here is the part between 94% and the start of the successful installation after the second round of installation with my script.

                  https://pastebin.com/0HLXKu2x

                  It handles the tsl/robin_map issue. It's interesting to see what happens between 94% and 100%

                  F 1 Reply Last reply Reply Quote 0
                  • F
                    Folly @DTEAM
                    last edited by Folly

                    @DTEAM

                    OK, I tried :

                    sudo ./retropie_packages.sh borked3ds build
                    

                    And indeed the first time it fails.
                    The second time it has an error at the end but builds the binaries.
                    Looking at both my logs it seems the second time the compilation is forced to create a binary but according to my log it still fails to find tsl/robin-map.h.
                    Your log looks the same as mine.

                    My conclusion would be that with the second build trial, the binary is force created but without the package robin-map.
                    Altough the binary works, in my opinion it's not a good binary, agree ?

                    DTEAMD 1 Reply Last reply Reply Quote 0
                    • DTEAMD
                      DTEAM @Folly
                      last edited by DTEAM

                      @Folly

                      Yes. I think the tsl/robin_map is probably useless. It doesn't affect the emulator, but a deeper investigation is needed too validate that. It's not a good binary because it contains errors. It does not compile directly and on the first try

                      F G 2 Replies Last reply Reply Quote 0
                      • F
                        Folly @DTEAM
                        last edited by

                        @DTEAM

                        I tried the https://github.com/rtiangha/Borked3DS version on my x86_64 with your script.
                        It compiled in 1 go and now have some files actually working.

                        Found that line 57 doesn't work in your script and is also not needed :

                        cd "$md_build/borked3ds"
                        

                        If needed it should have been :

                        cd "$md_build"
                        

                        Line 57 can be totally remove though.


                        I will try to check this issue again later to see if I can find a solution.

                        1 Reply Last reply Reply Quote 2
                        • G
                          gvx64 @DTEAM
                          last edited by gvx64

                          @DTEAM Can you try:

                          sudo apt-get install robin-map-dev
                          

                          and then re-build from scratch?

                          I will need to investigate later but it looks like the main CMakeFile.txt has the following guard:

                          # Use system tsl::robin_map if available (otherwise we fallback to version bundled with dynarmic)
                          if (NOT DYNARMIC_USE_BUNDLED_EXTERNALS)
                              find_package(tsl-robin-map QUIET)
                          endif()
                          

                          I think that what we want to do is force cmake to look for tsl-robin-map as a package that is installed on the local system and not try to defer to the version that is supposedly bundled with the dynarmic jit recompilier (I suspect that it is no longer available for some reason and is causing the conflict). Something like this:

                          # Use system tsl::robin_map 
                              find_package(tsl-robin-map REQUIRED)
                          

                          I am hoping that all you then have to do is add robin-map-dev as a required dependency in the script that gets installed prior to building. I haven't tested any of this yet though. I can modify the CMake file later once we can confirm that this addresses the issue.

                          I think that<tsl/robin_map.h> library is only getting used by the vulkan renderer and so yeah, it probably shouldn't impact gles. That said, I would like to try to retain the functionality of the Vulkan renderer since it does partially work and could have potential use for some games.

                          @DTEAM said in 3DS emulator for Pi users based on "Borked 3DS":

                          The hotkey combos doesn't work for now with gamepads. Only work with keyboard.
                          You need a mouse for now to control the arrow in the UI and in some games. The joystick can't control the arrow like the Nintendo DS emulator.

                          These items are on my radar but I want to focus on fixing up the gles renderer while it is fresh in my mind.

                          G 1 Reply Last reply Reply Quote 2
                          • G
                            gvx64 @gvx64
                            last edited by gvx64

                            @DTEAM OK, so I pushed a new master that has the following code segment that pertains to tsl::robin_map in the main CMakeList.txt file:

                            # Use system tsl::robin_map
                            if (NOT DYNARMIC_USE_BUNDLED_EXTERNALS)
                                message(STATUS "Looking for system-installed tsl::robin_map...")
                                find_package(tsl-robin-map REQUIRED)
                            
                                if (tsl-robin-map_FOUND)
                                    message(STATUS "Found tsl-robin-map: ${tsl-robin-map_DIR}")
                                else()
                                    message(FATAL_ERROR "tsl-robin-map not found. Please install it on your system.")
                                endif()
                            endif()
                            

                            What I am hoping this does is halt the building process early on with an error if the tsl-robin-map library is found to NOT be locally installed on the user's Pi (it won't even try looking for the bundled dynarmic tsl-robin-map library). That said, including robin-map-dev as a required dependency in your build script will get it installed upfront and so I am hoping that this issue disappears going forward.

                            1 Reply Last reply Reply Quote 3
                            • F
                              Folly
                              last edited by Folly

                              I am busy with rewriting the script....

                              @DTEAM and @ExarKunIv
                              Here is my rewrite :
                              https://github.com/FollyMaddy/RetroPie-Extra/blob/Borked3DS-WIP/scriptmodules/emulators/borked3ds.sh

                              It's not fully tested yet, I will test it this evening if I have the time to do so.
                              Can you both check and test ?

                              Edit :
                              Made some more changes.

                              I am doing a full test now on x86_64 : looks OK

                              I am doing a full test now for rpi : not working 2 errors !

                              CMake Error at externals/dynarmic/CMakeLists.txt:207 (install):
                                install TARGETS given target "robin_map" which does not exist.
                              
                              CMake Error at externals/teakra/CMakeLists.txt:111 (install):
                                install TARGETS given target "robin_map" which does not exist.
                              
                              DTEAMD 1 Reply Last reply Reply Quote 0
                              • F
                                Folly
                                last edited by

                                @gvx64

                                Your solution doesn't seem to work, any ideas ?

                                G 1 Reply Last reply Reply Quote 0
                                • G
                                  gvx64 @Folly
                                  last edited by

                                  @Folly I am working on it. I am getting the same error. I will let you know once it is working on my end.

                                  1 Reply Last reply Reply Quote 2
                                  • DTEAMD
                                    DTEAM @Folly
                                    last edited by DTEAM

                                    @Folly said in 3DS emulator for Pi users based on "Borked 3DS":

                                    Here is my rewrite :
                                    https://github.com/FollyMaddy/RetroPie-Extra/blob/Borked3DS-WIP/scriptmodules/emulators/borked3ds.sh

                                    Thanks, I left a lot of old stuff in there, including too many dependencies. When we have something solid, we should clean it up and change the name to Borked3DS-rpi, like @gvx64 did.

                                    We could also add some presets for a good first-launch experience. I'll share my settings later, and we can discuss the best option for getting started with this emulator on a Pi.

                                    F 1 Reply Last reply Reply Quote 0
                                    • F
                                      Folly @DTEAM
                                      last edited by Folly

                                      @DTEAM said in 3DS emulator for Pi users based on "Borked 3DS":

                                      @Folly said in 3DS emulator for Pi users based on "Borked 3DS":

                                      Here is my rewrite :
                                      https://github.com/FollyMaddy/RetroPie-Extra/blob/Borked3DS-WIP/scriptmodules/emulators/borked3ds.sh

                                      Thanks, I left a lot of old stuff in there, including too many dependencies. When we have something solid, we should clean it up and change the name to Borked3DS-rpi, like @gvx64 did.

                                      You're welcome.
                                      Yes sure, some stuff can be removed, I agree.
                                      Changing the name could be done but I created a chameleon script that changes the source upon aarch64 and x86_64.
                                      So not sure if renaming is a good idea then.

                                      We could also add some presets for a good first-launch experience. I'll share my settings later, and we can discuss the best option for getting started with this emulator on a Pi.

                                      Good idea !
                                      First thing first, we need a solution to get it properly compiling first ;-)

                                      DTEAMD 1 Reply Last reply Reply Quote 0
                                      • DTEAMD
                                        DTEAM @Folly
                                        last edited by DTEAM

                                        @Folly @gvx64

                                        I did sudo apt-get install robin-map-dev and modify my old script a little bit (I added the depends robin-map-dev) and switch for Borked3DS-rpi inside the script and everything works well on the first run! I did the switch before your previous message, if you prefer to keep Borked3DS name for X86_64 build and Pi, and be more versatile, I understand. You don't need the last CMake version.

                                        Here's the script. Feel free to modify it.

                                        borked3ds-rpi.sh

                                        G 1 Reply Last reply Reply Quote 0
                                        • G
                                          gvx64 @DTEAM
                                          last edited by gvx64

                                          @DTEAM @Folly So with the latest changes to the github master the retropie install script provided by @Folly finally built successfully on my Pi4. Note that I made a couple of edits to the build script:

                                                  if isPlatform "aarch64"; then
                                                          gitPullOrClone "$md_build" https://github.com/gvx64/Borked3DS-rpi.git
                                          #               downloadAndExtract https://cmake.org/files/v4.0/cmake--linux-aarch64.tar.gz "$md_build"
                                                          downloadAndExtract https://cmake.org/files/v4.0/cmake-4.0.2-linux-aarch64.tar.gz "$md_build" #gvx64
                                                          mv cmake-4.0.2* cmake-4.0.2
                                                  else
                                          
                                          function build_borked3ds() {
                                                  mkdir build
                                                  cd build
                                          #       $md_build/cmake-4.0.2/bin/cmake .. -DCMAKE_BUILD_TYPE=Release
                                                  $md_build/cmake-4.0.2/bin/cmake .. -DCMAKE_BUILD_TYPE=Release -DDYNARMIC_USE_BUNDLED_EXTERNALS=OFF #gvx64 addition
                                                  $md_build/cmake-4.0.2/bin/cmake --build . -- -j"$(nproc)"
                                                  md_ret_require="$md_build/build/bin"
                                          }
                                          
                                          DTEAMD 1 Reply Last reply Reply Quote 1
                                          • DTEAMD
                                            DTEAM @gvx64
                                            last edited by DTEAM

                                            @gvx64

                                            Thanks , I’m gonna it with Folly script (borked3ds.sh)

                                            New edit: I confirm, @Folly's script works very well on Pi5 (64-bit)! Well done!

                                            @ExarKunIv The script from @Folly should be the one on Retropie-Extra and not mine

                                            roslofR ExarKunIvE 3 Replies Last reply Reply Quote 2
                                            • 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.