Skip to content

saysaa/ReSharp3DS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

>_ ReSharp3DS

ReSharp3DS is an experimental project that runs C# code on the Nintendo 3DS using nanoCLR / nanoFramework.

The project uses a C++ 3DS homebrew application to load C# assemblies compiled as .pe files, then executes them through nanoCLR.

Screenshots

IMG_0694 IMG_0695

Progress & Roadmap

Done (Click to expand)
  • Initialize nanoCLR on Nintendo 3DS
  • Load mscorlib.pe and app.pe from SD card
  • Execute C# Program.Main()
  • Call native C++ functions from C# using InternalCall
  • Basic Console API (Clear, Write, WriteLine)
  • Input support (Start, Select)
  • Runtime management (Runtime.Yield(), static state preservation)
  • Validate on Citra & Real Hardware
  • Fix screen flickering by avoiding full redraw every tick
To be implemented (Click to expand)
  • Full Button Mapping (A, B, X, Y, D-Pad, L, R)
  • Expanded Console API (bool, float, better formatting)
  • Automatic native method binding instead of index-based mapping
  • Graphics & Audio APIs
  • Filesystem support
  • Better error reporting for C# exceptions
  • Proper SDK structure & templates
  • Stabilize HOME Menu suspend/resume behavior

File Structure

For the runtime to function correctly, your SD card must be organized as follows:

SD:/
├── 3ds/
│   └── ReSharp3DS.3dsx          # The homebrew application
└── ReSharp3DS/                  # Required data folder
    ├── mscorlib.pe              # nanoFramework base library
    └── app.pe                   # Your compiled C# program (user app)

Note: The runtime specifically looks for the assemblies in sdmc:/ReSharp3DS/.


What is it for?

ReSharp3DS is meant for experimenting with managed C# code execution on the Nintendo 3DS. It can be used as a base to build 3DS homebrew logic in C#, test nanoCLR on non-standard platforms, and call native C++ code from C#.

Example:

namespace ReSharp3DS
{
    public class Program
    {
        public static void Main()
        {
            Console.Clear();
            Console.WriteLine("Hello from C# on 3DS!");
            Console.WriteLine("Press START to quit.");

            while (!Input.IsStartPressed())
            {
                Runtime.Yield();
            }

            Console.WriteLine("Bye.");
        }
    }
}

Requirements

  • C++ Side: devkitPro (devkitARM, libctru, make).
  • C# Side: nanoFramework-compatible compiler (e.g., nanoFramework.CoreLibrary).
  • Hardware: A Nintendo 3DS with Luma3DS and Homebrew Launcher.

Installation & Build

1. Building the Homebrew (C++)

From the project folder, run:

make clean
make

This generates ReSharp3DS.3dsx.

2. Building the C# application

Compile your C# code into a .pe assembly using the nanoFramework toolchain. Rename the output file to app.pe.

3. Deployment

  1. Copy ReSharp3DS.3dsx to SD:/3ds/.
  2. Copy mscorlib.pe and your app.pe to SD:/ReSharp3DS/ (create the folder at the root of the SD if it doesn't exist).
  3. Launch the app from the Homebrew Launcher.

Troubleshooting

If a file is missing or incorrectly placed, the program will display an error: [FATAL] app load failed

Make sure the ReSharp3DS folder is at the root of the SD card, not inside the /3ds/ folder.


Disclaimer

This project is not affiliated with Nintendo, Microsoft, the .NET Foundation, or the nanoFramework project. It is an experimental homebrew and runtime porting project intended for learning, research, and development purposes.

Assets

ReSharp3DS Logo

About

C# runtime and SDK experiment for Nintendo 3DS powered by nanoCLR

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages