from Hacker News

Experimental Nintendo Switch Emulator written in C#

by chwolfe on 3/13/21, 9:20 PM with 168 comments

  • by molticrystal on 3/13/21, 10:49 PM

    This emulator currently has the most complete guest audio renderer implementations, as they just finished a project of doing an in depth reversing of that portion of the firmware. [0]

    Getting it to work with the host os(windows usually) can have minor issues with output in rare circumstances, or when a game is still not running the proper speed, but they've ironed out the major ones.

    -----------------------

        This is my requiem, I present to you Amadeus, a complete reimplementation of the Audio Renderer!
        This reimplementation is based on my reversing of every version of the audio system module that I carried for the past 10 months.
        This supports every revision (at the time of writing REV1 to REV8 included) and all features proposed by the Audio Renderer on real hardware.
    
    [0] https://github.com/Ryujinx/Ryujinx/pull/1481
  • by MegaDeKay on 3/14/21, 1:12 AM

    The other popular Switch emulator, Yuzu, recently released their progress report for February in case you are interested in how far along the state of Switch emulation is these days. Yuzu is C++ and roughly comparable to Ryujinx, feature-wise.

    https://yuzu-emu.org/entry/yuzu-progress-report-feb-2021/

  • by edoceo on 3/13/21, 11:57 PM

    Why wouldn't one create and emulator for this using QEMU? Couldn't that be possible? Doesn't a bunch of hardware faking have to be rebuilt in C# that QEMU already does (well¿)? Or is it too hard to introduce custom hardware/firmware (like this audio stuff) into QEMU?
  • by whoisthemachine on 3/13/21, 11:29 PM

    > The CPU emulator, ARMeilleure, emulates an ARMv8 CPU and currently has support for most 64-bit ARMv8 and some of the ARMv7 (and older) instructions, including partial 32-bit support. It translates the ARM code to a custom IR, performs a few optimizations, and turns that into x86 code.

    Interesting... since .Net is cross-platform and can run on ARM, if it's running on an ARM processor does it just run the instructions directly?

  • by brundolf on 3/13/21, 11:23 PM

    I have mixed feelings about emulating current-gen consoles. I think there's a very strong ethical case for emulating consoles whose games are no longer made (despite Nintendo's best efforts to shut that down too). But emulating something whose games can still be bought new would tend to encourage piracy, I expect.

    Edit: "cracking" -> "piracy", for clarity

  • by yc-kraln on 3/14/21, 11:03 AM

    The one thing I used to really enjoy about developing for Nintendo platforms once they've aged a bit is being able to have fast test-play cycles without hardware; for Gameboy Advance or Nintendo DS the emulators were very good and fully-featured (debuggers, memory inspection, etc.)

    Unfortunately with Switch we're not there, and I don't think we ever will be. These emulators target, in order of priority, Cracked/Dumped Retail Games, then Homebrew games. I can't use them as part of my game development stack because they won't run binaries if they haven't been submitted to Nintendo to be signed (and subsequently cracked).

  • by edflsafoiewq on 3/14/21, 12:22 AM

    What made C# a good choice for this?
  • by nicetryguy on 3/13/21, 10:14 PM

    It's really coming along! It took Dolphin a few years to nail it but i'd imagine a near-perfectly emulated 4k switch in a couple years time.
  • by smaudet on 3/14/21, 9:27 PM

    Regarding all the positions that piracy is bad vs freedom of intellectual property, isn't this a bit a red herring?

    I'm sure neither this nor Yuzu are 100% working - but if let's say work was done regarding allowing legal ripping, i.e. a license system whereby Nintendo grants sale or other rights to hobbyist runningthe express purpose of runnin their games on some emulator.

    I think a lot of the people drawn to emulator, work, are drawn by the cool factor. Working on homebrew games is a way to learn and express passion about embedded platforms, game dev and coding.

    They say 'piracy is stealing', but locking down platforms is also stealing. We should enforce universal IP monetary attribution - keep a low standard rate of mandatory fees which must be paid out while at the same time make it illegal for companies to entirely hide their designs.

  • by huachimingo on 3/14/21, 2:03 AM

    Check out MelonDS, looks very promising and faster than Desmume. They managed to put a JIT for the emulation.
  • by royalghost on 3/14/21, 3:25 AM

    I am basically trying to learn c# after many years of working in JVM languages. This project looks like a good hack to learn C# and .NET.
  • by azinman2 on 3/13/21, 11:27 PM

    Considering this is emulating an ARM processor, I wonder how such software might perform if written specifically for the new M1 macs?
  • by andi999 on 3/14/21, 8:22 AM

    Did GC lead to any problems?
  • by Cyph0n on 3/13/21, 10:42 PM

    Impressive! Is this the first modern console emulator written in a GCed language, or even a language other than C++?
  • by jb775 on 3/14/21, 2:03 AM

    Is there a way to intercept data between the Switch and online Fortnite services?

    I recently bought a Switch and have been playing Fortnite online...noticed more and more "online gamers" have been behaving like bots, so I'd like to take a look at the data if possible (to see if I'm playing against actual people)

  • by DC1350 on 3/13/21, 11:06 PM

    This is great to see. It would be nice to play switch games on something at least as powerful as a modern phone
  • by miguelmurca on 3/13/21, 11:27 PM

    Starting a betting pool as to how long this makes it before being DMCAd
  • by politelemon on 3/13/21, 11:18 PM

    I wanted to say dupe, but I can't really... my submission got no attention. Is it just matter of timing?

    https://news.ycombinator.com/item?id=26445101