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
    79 Posts 6 Posters 7.5k 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.
    • DTEAMD
      DTEAM
      last edited by DTEAM

      Following the post #15 in this tread Citra-Nightly-2104 on Pi5 (screen issue) - Nintendo 3DS

      A new work in progress option is available for Pi and Retropie users.

      @gvx64 said in Citra-Nightly-2104 on Pi5 (screen issue) - Nintendo 3DS:

      For those that are new to this conversation, instructions on building Borked3ds-rpi are on the github page (@DTEAM may also have a build script): https://github.com/gvx64/Borked3DS-rpi/tree/master

      NEW EDITS:

      If you don't want to install it manually, Here's my WIP script to install Borked 3DS. It works well. The good scipt to use now is the one from @Folly . You can get it here . This scipt works also for x86_64 .

      You must add MESA_EXTENSION_OVERRIDE="GL_OES_texture_buffer in your es_system.cfg (see post #4)

      On post #57 , you have a settings file (qt-config.ini). The emulator runs well with those settings (Pi4 and Pi5)

      G ExarKunIvE 2 Replies Last reply Reply Quote 3
      • G
        gvx64 @DTEAM
        last edited by gvx64

        @DTEAM Thank you for creating this. I am still supporting this fork and resolving outstanding issues. If you encounter games with issues please post here (specifically issues that are present under GLES that are not present under the Vulkan API are of specific interest to me and are something that I can help with correcting). The Vulkan API seems to run most games but it has rendering issues that are beyond my abilities to fix. GLES 3.1 is a lot simpler and is something that I can use ChatGPT to help with fixing and so it makes sense for us to focus our efforts on improving performance of this API.

        An issue that is currently on my radar, but that I have been able to fix yet, is the black box that appears in the bottom right corner of Fire Emblem Awakening during the battle screens. It is an issue with a particular mipmapping handle that I haven't been able to isolate. I will post here when I make progress.

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

          @DTEAM adding this script to my Repo. for ease of installing
          if you want to do pull requests when things change you can. if not i will update it as i see them here.

          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 .

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

            Just to re-iterate from the other thread:

            @gvx64 said in Citra-Nightly-2104 on Pi5 (screen issue) - Nintendo 3DS:

            I added support for GL_OES_texture_buffer in Borked3ds-rpi. This is a GLES 3.2 extension that the Pi does not completely support, but the code in Borked3ds-rpi does not depend on the problematic portions of this extension and so we can tap into this GLES 3.2 functionality on the Pi by using an environment variable override. to launch within Retropie with GL_OES_texture_buffer support enabled, edit the contents of /etc/emulationstation/es_systems.cfg so that the 3DS entry appears as follows. This will theoretically give better performance than the fall-back code path that uses 2D texture LUTs and it should be more accelerated in games that have fog/lighting effects (that said, I am not noticing much of an improvement on my Pi4, maybe because it's GPU is too weak for it to matter).

            <system>
            <name>3ds</name>
            <fullname>3ds</fullname>
            <path>/home/pi/RetroPie/roms/3ds</path>
            <extension>.3ds .cci .zip .3DS .CCI .ZIP </extension>
            <command>env MESA_EXTENSION_OVERRIDE="GL_OES_texture_buffer" /opt/retropie/supplementary/runcommand/runcommand.sh 0 SYS 3ds %ROM%</command>
            <platform>3ds</platform>
            <theme>3ds</theme>
            </system>

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

              @gvx64

              With your latest update, my script no longer works. I'll take care of it tomorrow. It's probably a small problem that needs to be fixed. Maybe the addition of the capital letter B in the word Build. I'll do a test.

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

                @DTEAM Thanks for letting me know. I haven't made any changes to the name of the fork. It should work same as before. Do you have any info on where it is failing? The log should be retrievable at this location (just correctly enter the fields that have x's below):

                sudo zcat /home/pi/RetroPie-Setup/logs/rps_2025-xx-xx-xxxxx.log.gz
                
                F DTEAMD 2 Replies Last reply Reply Quote 0
                • F
                  Folly @gvx64
                  last edited by Folly

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

                  @DTEAM Thanks for letting me know. I haven't made any changes to the name of the fork. It should work same as before. Do you have any info on where it is failing? The log should be retrievable at this location (just correctly enter the fields that have x's below):

                  sudo zcat /home/pi/RetroPie-Setup/logs/rps_2025-xx-xx-xxxxx.log.gz
                  

                  Just to let you know, there is no need to use sudo, it should work without it.

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

                    @gvx64

                    Now Is it borked3ds-qt instead of borked3ds? Maybe it's on my side. I'll double check. It says the emulator is a Port now. It doesn't make sense.

                    [100%] Building CXX object src/borked3ds_qt/CMakeFiles/borked3ds-qt.dir/borked3ds-qt_autogen/37D3MJFPTG/qrc_style.cpp.o
                    [100%] Linking CXX executable ../../bin/Release/borked3ds
                    /home/pi/RetroPie-Setup/tmp/build/borked3ds/src/input_common/gcadapter/gc_poller.cpp: In member function ‘GetAnalog’:
                    /home/pi/RetroPie-Setup/tmp/build/borked3ds/src/input_common/gcadapter/gc_poller.cpp:202:38: note: parameter passing for argument of type ‘struct pair’ when C++17 is enabled changed to match C++14 in GCC 10.1
                      202 |         const auto [x, y] = GetAnalog(axis_x, axis_y);
                          |                                      ^
                    [100%] Built target borked3ds-qt
                    gmake: *** [Makefile:146: all] Error 2
                    /home/pi
                    /home/pi/RetroPie-Setup/tmp/build/borked3ds /home/pi
                    '/home/pi/RetroPie-Setup/tmp/build/borked3ds/build/bin/Release/borked3ds' -> '/opt/retropie/emulators/borked3ds/borked3ds'
                    cp: cannot overwrite non-directory '/opt/retropie/emulators/borked3ds/borked3ds' with directory '/home/pi/RetroPie-Setup/tmp/build/borked3ds/'
                    /home/pi
                    /opt/retropie/emulators/borked3ds /home/pi
                    
                    = = = = = = = = = = = = = = = = = = = = =
                    Configuring 'borked3ds' : 3DS Emulator borked3ds
                    = = = = = = = = = = = = = = = = = = = = =
                    
                    /home/pi
                    
                    Log ended at: Tue 10 Jun 08:54:36 EDT 2025
                    Total running time: 0 hours, 9 mins, 5 secs
                    
                    1 Reply Last reply Reply Quote 0
                    • DTEAMD
                      DTEAM @gvx64
                      last edited by

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

                      @DTEAM Thanks for letting me know. I haven't made any changes to the name of the fork. It should work same as before. Do you have any info on where it is failing? The log should be retrievable at this location (just correctly enter the fields that have x's below):

                      sudo zcat /home/pi/RetroPie-Setup/logs/rps_2025-xx-xx-xxxxx.log.gz
                      

                      here's my log
                      https://pastebin.com/W93hFNQs

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

                        @DTEAM Thanks for this info. Can you try building Borked3DS-rpi using the instructions below (instead of using the install script). It's building successfully on my Pi4 using these steps.

                        Instructions for Building from Source:

                        cd /home/pi
                        
                        sudo git clone https://github.com/gvx64/Borked3DS-rpi.git
                        
                        cd ./Borked3DS-rpi
                        
                        sudo git submodule update --init --recursive
                        
                        sudo mkdir ./Build ; cd ./Build
                        
                        sudo cmake .. 
                        

                        (note minimum cmake 3.26 requirement - if necessary follow instructions to build new cmake https://geeksww.com/tutorials/operating_systems/linux/installation/downloading_compiling_and_installing_cmake_on_linux.php )

                        sudo make -j4
                        

                        Note that if this build attempt fails, please try the build command again using sudo make -j1 as this will sometimes provide a more descriptive error log (the second build attempt should take a lot less time as well).

                        Note that I am going to try to get your script to build on my Pi.

                        DTEAMD 2 Replies Last reply Reply Quote 0
                        • DTEAMD
                          DTEAM @gvx64
                          last edited by

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

                          (note minimum cmake 3.26 requirement - if necessary follow instructions to build new cmake https://geeksww.com/tutorials/operating_systems/linux/installation/downloading_compiling_and_installing_cmake_on_linux.php )

                          I'm ok for that part, with Bookworm backport, I'm at 3.31 or 3.3x

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

                            @gvx64

                            The script works, but I have to run it twice, like for an update. I leave the temporary folder there and run the installation again. It'S strange. It was not like that before

                            BTW, the emulator works very well.

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

                              @DTEAM Thank you for letting me know. When the build fails at the very end like that it usually means that it is a linking issue (e.g. a missing include or a module that was mistakenly not added to a CMake file). I wonder if it had something to do with one of the externals not downloading properly that set it off. It's weird that it is working now for you because I didn't change anything.

                              I actually have had a lot of difficulty successfully running these install scripts for the more complex emulators (ppsspp, dolphin, citra) I think because of my internet connection. That said, the install process usually fails for me prior to building when it is doing the submodule update stage not at the very end like it did for you. I usually find it a lot easier just to manually build.

                              Anyways, I was wondering if you might be able to update the configure_borked3ds() in your build script as follows and just test + verify that it works as intended. I haven't been able to test it out but ChatGPT says that this should get the env var gl_oes_texture_buffer added to the /etc/emulationstation/es_systems.cfg file as I showed above:

                              function configure_borked3ds() {
                                  mkRomDir "3ds"
                                  ensureSystemretroconfig "3ds"
                                  local launch_prefix
                                  isPlatform "kms" && launch_prefix="XINIT-WMC:"
                              
                                  addEmulator 0 "$md_id-ui" "3ds" "$launch_prefix$md_inst/borked3ds"
                                  addEmulator 1 "$md_id-roms" "3ds" "env MESA_EXTENSION_OVERRIDE=GL_OES_texture_buffer $launch_prefix$md_inst/borked3ds %ROM%"
                                  #addEmulator 1 "$md_id-room" "3ds" "$launch_prefix$md_inst/borked3ds-room"
                                  #addEmulator 2 "$md_id-cli" "3ds" "$launch_prefix$md_inst/borked3ds-cli"
                                  #addEmulator 3 "$md_id-tests" "3ds" "$launch_prefix$md_inst/tests"
                              
                                  addSystem "3ds" "3ds" ".3ds .3dsx .elf .axf .cci ,cxi .app"
                              }
                              
                              DTEAMD 1 Reply Last reply Reply Quote 1
                              • DTEAMD
                                DTEAM @gvx64
                                last edited by

                                @gvx64

                                Same problem with your method on GitHub. I can't tell if the problem is only on my side. If someone else could test it on a Pi5, that might be helpful.

                                roslofR 1 Reply Last reply Reply Quote 0
                                • roslofR
                                  roslof @DTEAM
                                  last edited by roslof

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

                                  @gvx64

                                  Same problem with your method on GitHub. I can't tell if the problem is only on my side. If someone else could test it on a Pi5, that might be helpful.

                                  It breaks for me earlier in the process:

                                  [ 94%] Building CXX object src/tests/CMakeFiles/tests.dir/common/param_package.cpp.o
                                  In file included from /home/pi/RetroPie-Setup/tmp/build/borked3ds/src/./video_core/renderer_opengl/gl_texture_runtime.h:9,
                                                   from /home/pi/RetroPie-Setup/tmp/build/borked3ds/src/./video_core/renderer_opengl/gl_rasterizer.h:13,
                                                   from /home/pi/RetroPie-Setup/tmp/build/borked3ds/src/./video_core/renderer_opengl/renderer_opengl.h:12,
                                                   from /home/pi/RetroPie-Setup/tmp/build/borked3ds/src/borked3ds/borked3ds.cpp:15:
                                  /home/pi/RetroPie-Setup/tmp/build/borked3ds/src/./video_core/rasterizer_cache/rasterizer_cache_base.h:15:10: fatal error: tsl/robin_map.h: No such file or directory
                                     15 | #include <tsl/robin_map.h>
                                        |          ^~~~~~~~~~~~~~~~~
                                  compilation terminated.
                                  gmake[2]: *** [src/borked3ds/CMakeFiles/borked3ds.dir/build.make:96: src/borked3ds/CMakeFiles/borked3ds.dir/borked3ds.cpp.o] Error 1
                                  gmake[1]: *** [CMakeFiles/Makefile2:4618: src/borked3ds/CMakeFiles/borked3ds.dir/all] Error 2
                                  gmake[1]: *** Waiting for unfinished jobs....
                                  
                                  F 1 Reply Last reply Reply Quote 0
                                  • F
                                    Folly @roslof
                                    last edited by Folly

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

                                    /home/pi/RetroPie-Setup/tmp/build/borked3ds/src/./video_core/rasterizer_cache/rasterizer_cache_base.h:15:10: fatal error: tsl/robin_map.h: No such file or directory
                                    15 | #include <tsl/robin_map.h>

                                    @gvx64
                                    For me it failed on the same when building manually.
                                    (not using the command sudo btw., no need to do so)
                                    Noticed that when using :

                                    git submodule update --init --recursive
                                    

                                    It had a problem getting the submodule that contains robin_map.h.

                                    I am trying again to see if it will work when doing it a second time.

                                    roslofR 1 Reply Last reply Reply Quote 1
                                    • roslofR
                                      roslof @Folly
                                      last edited by roslof

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

                                      It had a problem getting the submodule that contains robin_map.h.

                                      Right. Was just zeroing in on the same. It appears that it fails early on in the process, but doesn't Fatal until near the end. Here's where multiple files aren't found and a clue about why:

                                        The following configuration files were considered but not accepted:
                                      
                                          /usr/lib/aarch64-linux-gnu/cmake/fmt/fmt-config.cmake, version: 9.1.0
                                          /lib/aarch64-linux-gnu/cmake/fmt/fmt-config.cmake, version: 9.1.0
                                      
                                      
                                      
                                      -- Could NOT find mcl (missing: mcl_DIR)
                                      -- Could NOT find tsl-robin-map (missing: tsl-robin-map_DIR)
                                      -- Could NOT find oaknut (missing: oaknut_DIR)
                                      CMake Deprecation Warning at externals/dynarmic/externals/robin-map/CMakeLists.txt:1 (cmake_minimum_required):
                                        Compatibility with CMake < 3.10 will be removed from a future version of
                                        CMake.
                                      
                                        Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
                                        to tell CMake that the project requires at least <min> but has been updated
                                        to work with policies introduced by <max> or earlier.
                                      

                                      @Folly are you using cmake 4.0 or higher? I'm wondering if CMake just needs a range for cmake_minimum_required as specified

                                      .

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

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

                                        @Folly are you using cmake 4.0 or higher? I'm wondering if CMake just needs a range for cmake_minimum_required as specified

                                        Yes, I use the latest cmake 4.0.2 now.

                                        78% ...

                                        roslofR 1 Reply Last reply Reply Quote 0
                                        • roslofR
                                          roslof @Folly
                                          last edited by roslof

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

                                          Yes, I use the latest cmake 4.0.2 now.

                                          78% ...

                                          I modified CMakeLists.txt adding the range and I'm giving it another run.
                                          EDIT: Still having the same problem each time cmake is run. mcl_DIR, tsl-robin-map_DIR and oaknut_DIR are missing. Boo.

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

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

                                            I modified CMakeLists.txt adding the range and I'm giving it another run.

                                            I didn't edit the CMakeList.txt, I think it should work oob.

                                            90%..

                                            Edit:

                                            [ 95%] Building CXX object src/tests/CMakeFiles/tests.dir/common/bit_field.cpp.o
                                            In file included from /home/pi/Borked3DS-rpi/src/./video_core/renderer_opengl/gl_texture_runtime.h:9,
                                                             from /home/pi/Borked3DS-rpi/src/./video_core/renderer_opengl/gl_rasterizer.h:13,
                                                             from /home/pi/Borked3DS-rpi/src/./video_core/renderer_opengl/renderer_opengl.h:12,
                                                             from /home/pi/Borked3DS-rpi/src/borked3ds/borked3ds.cpp:15:
                                            /home/pi/Borked3DS-rpi/src/./video_core/rasterizer_cache/rasterizer_cache_base.h:15:10: fatal error: tsl/robin_map.h: Bestand of map bestaat niet
                                               15 | #include <tsl/robin_map.h>
                                            

                                            git submodule seemed to get all submodules and cmake did not say "Not Found", Hmmm..

                                            Edit : I will have a look later.

                                            1 Reply Last reply Reply Quote 1
                                            • 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.