That’s how more than a few of my projects have started. It really helps you learn the performance mechanics of a language and it’s runtime doing something like, implementing an emulator then optimizing it. Maybe not something as ambitious as a switch emulator though. I like 16 bit processors like the MSP430 :)
In my opinion this is the exact reason C# was picked. Almost everything C# is either Windows-only or Console/Server app. This is neither and that's what's interesting to me.
Many video games are written in c#. This includes pretty much all games written using unity (the most popular 3d game engine) and fna (a very popular 2d framework).
But that's an apples/oranges comparison, isn't it? C# code in Unity games is predominantly high-level game behaviour / scripting. Most of the heavy lifting is done by Unity behind the scenes. So to me it's even more impressive that an emulator for a modern games console can be written in a 'managed' language.
Mostly, because it's easier to program in C# than in C++, and there is not much of a loss of performance (and worth noting that C# has `unsafe` keyword if necessary). In the past Ryujinx did use RyuJIT provided by .NET for JIT, albeit now it's using a custom JIT because RyuJIT was too slow for the way it was used by an emulator.
C# is the fastest GCed language and emulators are not just about performance, a high level language increase both productivity and the number of contributors, hence the number/depth of optimizations + features and correctness.
C# has C++ interop if ever needed.
Indeed, on Windows there’s no need for that library. But on Linux, none of that is available.
I have used C++/CLI long ago for a couple of minor things, and I didn’t like it. The two runtimes, C++ and .NET, are interacting in a weird way, I got an impression it combines worst parts from both C# and C++ languages.
I prefer IUnknown-based COM interfaces ever since. With some care about API design, C# side of the interop is only marginally more complex that it would be with C++/CLI, but unmanaged side is much easier in regular C++, without the CLI.
maybe that's the case here