Ryujinx: Experimental Nintendo Switch Emulator written in C#
github.com
github.com
For example, Mario Kart Wii (one of my all time favorite games, I used to time trial it for fun! Very zen but no rubber bumpers on the GameCube controller thumbpads and one of them had a piece snapped off the edge, so very bruised and hurting thumbs and such the next day) has seen loads of incredible TAS' in the last year or so, with the introduction of superhopping and a few other techniques bringing vehicles other than the flamerunner back into the limelight.
Then there's also this incredible demonstration of beating the Legend of Zelda demo in Super Smash Brothers Brawl before the 5 minute timer runs out, using game state manipulation and pointer creation from positions/objects/etc, a technique I first saw popularized in Super Mario World a few years back. https://www.youtube.com/watch?v=jusgAEW4soo
It's incredible both the debug tools people create and lengths of research that people will go to to be able to accomplish what many consider a 'silly' goal, one that often is oddly enough extremely grounded in an active community. Speedrunning is a beautiful thing and it's one of the foundations for how and why I work with neural networks in the way that I do today.
In case you haven't seen this particularly excruciatingly cool demo before: https://www.youtube.com/watch?v=hB6eY73sLV0
It may be a bit slow for the types here already well familiar with floating point and the like but it's still got amazingly deep content on something silly but fun.
Thank you for the recommendation! <3 :)))) <3 :D
In any case, yay amnesia! Worth seeing again for the half-first time. ;PPPP
https://www.youtube.com/@ThaRixer/videos
He gives a good sense of how unlikely it was for some of these glitches to be found, and how much luck and skill is involved in pulling off a successful world record.
https://dsp56300.wordpress.com/faqs/
One of my favourites is the effort to emulate the Motorola 56K DSP processor, which is widely used in many hardware synthesizers and effects units. Things have progressed so far with this emulator, that it is now possible to directly boot the firmware from many of these devices, and produce results that are indistinguishable from the original, long-since end-of-lifed, hardware.
Watching the development of this emulator from the sidelines, I was regularly amused at the competence and sheer persistence of the authors, especially when running into very hard edge cases. It seems this style of development attracts folks with the Right Stuff, indeed ..
[1] https://www.sfchronicle.com/bayarea/article/The-Silicon-Vall...
[2] https://en.wikipedia.org/wiki/List_of_Super_NES_enhancement_...
In addition to the stuff I mentioned before (pointer setting and lookup, momentum abuse, etc), there's also collision edge abuse, generally checkpointing stuff is the big thing stopping a lot of exploits so how checkpoints work are really important to understand (and as a result, are very well-mapped out and are common community knowledge for a lot of these games).
There's also been this beautiful altrustic wave of colabbed TAS (tool-assisted speedruns) in the last few months where the best speedrunners all have different sections of racing tracks or whatever that they're good at, and they pass the recording back and forth until they build a run that sets a new world record or whatever.
Both of these are highly worth watching, it's a very good genre of entertainment and somehow (???) due to a fellow person named SummoningSalt has become almost a rite of passage that if you set an important world record, that you make a mini 30-60 minute documentary about it. One person was humble enough to make an entire 40 minute long documentary about their own world record (ill put the category title down below, it's something else), but only referred to everyone in the third person and was very professional, so you wouldn't know unless you saw the name, channel description, or the youtube comments.
Here's two that are very much worth the time and to me are endlessly fascinating:
Collaboration TAS (so freaking cool): https://www.youtube.com/watch?v=gaCYxNyJzzQ
Autodocumentarian "Blue Yourself" world record: https://www.youtube.com/watch?v=JR4isHLuAko
Both are well worth the watch over a good bowl of cereal, ice cream, and/or both.
Here's a good "funny for the day" ;P : https://www.youtube.com/watch?v=N6hVmn9FM7o
Independent of a bit sarcasm, this project is a nice showcase how versatile C# and .NET is.
C# and .NET are highly underrated/underappreciated because of some early flops and the Microsoft branding.
It's converging with TypeScript in the best way possible[0] and has some really great language features that even TS is lacking (really powerful switch expressions, for example).
It seems like the natural option for teams that want to move from TypeScript to a compiled, multi-threaded, statically typed language but it seems that there's a lot of teams that would rather use Go or Rust; neither of which are as easy to step up to from TypeScript, IMO.
I think if Microsoft were to make a T# -- which removes some of the legacy cruft from C# -- it would blow minds.
My last .NET experience was 10 years ago (so yeah maybe totally outdated) and I had to learn from scratch how to admin Windows Server, IIS & SQL Server, and learn Batch and PowerShell to automate all that stuff (installation, backups, etc). Took me a while and it had a lot of frustrating parts. Although C# was actually pretty nice to use 10 years ago (surely even better now).
Also I still haven't seen anything as good as the Visual Studio integration with C# to create GUIs in Windows.
I hope by the time they get shake off the “endless grind for crafting materials in a giant featureless grass field” high they won’t be charging an arm and a leg for a proper Zelda game.
if you consider BotW "a giant featureless grass field" then I don't believe that you are talking about the same game that everyone else is.
that BotW fails to handhold the player through Link's progression, is by far the game's greatest feature.
absolutely 0% of the overworld (excepting the four shrines of The Great Plateau) is required to beat the game. ok maybe 0.2% because you have to travel to the castle.
Breath of the Wild is as much of a game as you want. It is as much of an endless grind as you make it, no more, no less. BotW is as difficult as you make it, or as easy as you make it. Combat is as easy or as difficult as you choose.
it was extremely well received for good reasons.
is it perfect? absolutely not. when everything has a difficulty level that is actively determined by the player, as they play, the "game" kinda falls out of it, because rules become very fluid. you can eat everything you have in battle for effectively infinite life or you can choose to fight using only sticks and forbid yourself from healing. or you can fight with sticks then discover that your skills aren't where they need to be and you need to eat to stay alive. or you can stick to your guns and avoid healing and take the L if you want.
I'm trying to say that the game you want is probably in there, somewhere. it's up to you to enforce your own rules for progression on yourself, though. you can fight Ganon with three hearts or with 30. up to you.
don't want to grind? Don't.
I’m talking about the one where you wander pretty aimlessly through a big field picking up sticks and stuff and occasionally get ethered by those stone robot things on sight. It’s the one where instead of getting key items by beating many different dungeons as you progress, you get a small handful of magic powers in the first hour of gameplay and then set out to collect ingredients for soup or whatever.
> that BotW fails to handhold the player through Link's progression, is by far the game's greatest feature.
I don’t quite understand this. Did you feel like previous Zelda games “handheld” you through progression? Were you a fan of the games that came before BotW?
> absolutely 0% of the overworld (excepting the four shrines of The Great Plateau) is required to beat the game. ok maybe 0.2% because you have to travel to the castle.
Unlike every single other previous Zelda game! It’s almost like a game thats only connection to the Zelda series is the character model and name!
> it was extremely well received for good reasons.
I’m sure it was! “Universal appeal” isn’t one though, as that’s not a real thing.
> don't want to grind? Don't.
I don’t! I just uninstalled it lol
yes, absolutely, but the franchise definitely did not start out like that.
The original Legend of Zelda plopped you on the map and gave you nothing. zero guidance. I consider this very good.
Skyward Sword (the mainline release immediately prior to Breath of the Wild) was extremely linear and even gave you the solutions to puzzles so you never felt stuck. I consider this very awful.
prior to Breath of the Wild, this linear hand-holding style of Zelda game was apparently loved by the creators within Nintendo and was definitely not loved by players who considered themselves Zelda fans.
I remember reading how Nintendo doubted that Breath of the Wild would be well received because it was so much like the original Legend of Zelda, once you left the great plateau. zero guidance (almost) and complete freedom to go anywhere, if you could survive.
after a couple of months of extreme praise, Nintendo promised to continue the "open world" style of Zelda game going forward. this will change, no question.
I felt choked when I played Twilight Princess and Skyward Sword. you were Link on a rail, and you did what you were told. horrible.
> Were you a fan of the games that came before BotW?
extremely so very early on, and less and less as time went on, especially the last two or three 3D mainline games prior to BotW.
You literally can’t get far off the beach until you hit a specific milestone. And then the next milestone and so on. Zelda NES was very strictly linear, as was ALTTP, Ocarina, Majora, GC Wind Waker etc.
As for “handholding” I’ve never felt that way for a moment while playing e.g. Link’s Awakening or even the later titles like Oracle of Time/Seasons (Seasons was incredibly difficult but ultimately still linear!)
I personally did not find “But you can technically just go fight Ganon with a stick!” a plus. It’s about as much of a Zelda game as Zelda 2.
I'm talking about "zero guidance" mostly, but I'll switch to progress requirements since that seems to be what you're interested in.
in Breath of the Wild, you are free to go up against Ganon unarmed, if you choose. you will lose, but you can do it. in LoZ, you can't reach Ganon without meeting the prerequisites to gain entry. those are both gates to progress, but one is implicit and one is explicit. in both cases, the games give you very little help on how to proceed until you seek out that info yourself. I prefer when you are given the choice about how to proceed yourself.
in BotW, if I am a skilled player, I can make whatever weapons and food I have go much further than I could if I were an unskilled player.
in LoZ, the requirements are the same for everyone, even if you are capable enough as a player to kill him before you collect all the gear, you can't. you have to do it all. those are rails. rails are bad. it's not handholding, though, which is good, because handholding is also bad. to me.
I liked Zelda 2. A lot. you may choose to use that little factoid to dismiss all I've said, and that's your prerogative, but I also loved the first Zelda, and the third. and Ocarina of Time. and many others. it's when the game leads you by the nose to the end that I dislike things, and that's what Skyward Sword was, very much.
So every other Zelda game has rails, and rails are (to you) bad. Got it.
I personally find the “rails” (being a fundamental and defining feature that distinguishes the gameplay of every Zelda game) to be a good thing.
I’m a bit confused here. You’re a fan of the Zelda series, but the “rails” that are a fundamental mechanic in every other game are “bad”? Wouldn’t that mean that BotW is the first fundamentally “good” Zelda game from your perspective?
If so, that makes sense! We are in fact talking about two different definitions of what is “a Zelda game”! For me that’s a continuation of a very enjoyable and distinct game design style that began with the NES, for others it might be “the playable character is named Link”
I want new stuff. I want new things to do, and new ways to discover what is possible. I do not want to be led around by the nose like an ox.
I want to learn about the overall Hyrule lore, and the repeated battle between Ganon(dorf) and the forces of Good. I want to know more about this universe, even if... no, especially if I need to discover it myself, without the game outright telling me.
The best large element was probably the upgrade-nut (I forget what they were called) puzzles and a couple puzzley sidequests, but even those only had a few types, aside from a handful of (great!) one-offs.
Mostly, it made me dream of a world in which Bethesda uses that engine or one like it for the next Elder Scrolls.
Many tracks in Mario Kart are unplayable for example due to graphical corruption.
At the time we could get 2d games to boot through MoltenVK, but had issues with things like geometry shaders and so on.
Ryujinx managed to get fixes for those issues by having very clever graphics engineers resolve it.
Those vulkan/moltenVK pipeline hacks would have to be backported to Yuzu. Also, we did it through straight compilation of the ARM JIT (so it'd work on intel macs) but this doesn't exploit the hypervisor bypassing the JIT like Ryujinx does.
I think I've seen someone else doing the hypervisor trick in Yuzu but their fork wasnt submitted as a pull request.
TL;DR definitely possible, but as any good open source issue it's lacking the one person with the perfect mix of skills, motivation and free time to actually spend the hours doing it.
The engine is C++, the C# integration is bad, the new ECS translates C# to C++ (or some cpp like IR) before it runs, and the whole thing is closed source and openly hostile to open source (eg. package managers) that might damage their revenue from the asset store.
Don’t get me wrong; modern C# projects are pretty cool, but this is way cooler than Unity.
This makes me suspicious of your take seeing as IL2CPP has been part of Unity for years and years and not the ECS stack.
They also have a package manager now as well as custom/3rd party repo settings.
But on the whole, yes. Unity is not a shining example of C#. Although its an example of how far you can hack with it.
Burst and IL2CPP are different things. Burst is also a different “can’t believe it’s not c#” custom layer they invented, own and now have to maintain a separate fork of.
(Apparently just maintaining IL2CPP wasn’t keeping them busy enough)
Ie. no. It’s not done. No one knows when it’ll be done.
(1) - https://forum.unity.com/threads/unity-future-net-development...
If you’re really keen, just read that whole thread and you’ll get a really good understanding of how great things are, how happy with the c# support everyone is.
Tldr: netstandard 2.0 != .net 7 and nuget support.
Overall it tends to be better however.
The Switch has many great quality ports but somehow Nintendo’s first party titles are so bad, as if they don’t care at all (casue people buy the Pokemon games no matter what)
TPCi is owned in equal parts by Nintendo, Game Freak and somehow the manufacturers of the card game, Creatures Inc.
So you'd think Nintendo owns 33% of the Pokemon IP through TCPi, except they also have a significant amount of stock (not a majority of shares) in Game Freak. The exact amount isn't known but the result is that Nintendo most likely controls TCPi entirely.
Also, just to head it off - the anime (the other most popular Pokemon product after the video games and card games) is made by Studio OLM (which also did the 1997 Berserk adaptation as well as a truckload of other anime based on Japanese video games) and they have no controlling stake in TCPi whatsoever.
I think we have good evidence that Nintendo has very little control over the development of Pokémon games. They do not at all adhere to their quality standards. My assumption is that they agreed that their shares each get them specific benefits:
- Nintendo gets platform exclusivity for the games,
- Creatures gets exclusivity for any merchandise,
- Game Freak gets creative control over game design.
©2023 Pokémon. ©1995 - 2023 Nintendo/Creatures Inc./GAME FREAK inc. TM, ®Nintendo.
Aside from all the stuff you mentioned, they directly own at least some parts of it.
4k 60 fps for example https://www.youtube.com/watch?v=EEPzsoqqav4
https://github.com/Ryujinx/Ryujinx/wiki/Ryujinx-Setup-&-Conf...
Take that as you will.
There are >4k titles available for Switch? Wow
Strongly disagree. I'm a third party Nintendo developer and they do not just give out the Switch SDK to all devs like they did with 3DS/WiiU.
My understanding is that you must pitch an idea to corporate and get approval before they will ever let you see any tools or docs at all.
Also, for older consoles, do not try searching The Internet Archive for old roms.
https://boilingsteam.com/an-interview-with-gdkchan-creator-o...
Then, an IDE of your preference:
- VS Code: install C# extension and Roslynator (it adds useful analyzers)
- Rider: provides everything out of box, is more user-friendly (especially for people who used to big and fully-fledged solution) and has much superior debugging capabilities but is paid and has higher memory and battery consumption
And before someone says "that's impossible, even vanilla macOS development forces you to use Xcode", nope that's not true. You can compile macOS apps with clang just fine.
For the UI bit, I'd recommend Avalonia UI (which is what Ryujinx uses as well). It's cross platform, has been out forever (2013 - from their FAQ page) and even runs on embedded devices.
Rider (by JetBrains) has excellent Avalonia support via a plugin and is much better for other .NET stuff over Visual Studio for Mac.
Avalonia builds are, however, readily available with each release, and auto-update just like standard GTK+ builds.
See the project FAQ[1] for full details.
[1] https://github.com/Ryujinx/Ryujinx/wiki/FAQ-and-Troubleshoot...
It's pretty damn good, IMO. Been using it personally building some rather large projects.
The only time I miss Rider is when doing refactoring (Rider still much better for that) and code suggestions. Otherwise, VS Code is a great editor for C# IME.
I really wish this angle of thought would die. Stop parroting what the business fucks tell you.
The existence of those is a fig leaf for what Switch emulators are used in the vast majority of cases: piracy. There are much better ways to run homebrew than the Switch.
If you think piracy of currently sold games is in fact ethical, or if you simply don't care about copyright, than please say so explicitly!
When media is no longer available for sale or pulled from the market, piracy is ethical (there is literally no way to pay the creators)
When media you had legit access to is now unavailable because your account got stolen or you are otherwise locked out of some required online service, piracy is ethical (they won't do business with you)
When media requires something that was stolen from you, lost, or otherwise destroyed, piracy is ethical (you already paid for it)
When media uses DRM, piracy is ethical (doctrine of first sale stipulates you cannot control something after you have sold it, and one should not recognize any "license" for which have custody of the physical bits)
- Microtransactions
- Pay to win, punishing players for not having ample disposable income
- Lootboxes and the like ("baby's first casino")
- Blatant false advertising, especially coupled with preorders
Some of these predatory practices are actually illegal in some countries, but aren't prosecuted universally enough (or harshly enough) to be considered an issue by large corpos.If openly preying on your customers, — in no small part, children and teenagers, — for huge profits is considered ethical, then merely copying some files is downright angelic behavior, is it not?
Given the current laws you are correct, sure. (Whether to follow each and every law is a quite a personal choice...)
The majority of games for Switch aren't worked on by Nintendo, so that point seems tangential.
Yes emulators are unfortunately often used for pirating games. But they will also be the only way you get to enjoy your purchased games in 10-20 years when the vendor stops producing the hardware, cuts off online services and your device becomes a fancy paperweight either as a consequence of that or naturally.
Emulation is completely legal in the US. Its legality has been challenged in court and it won.
At the moment, there's a game compilation being sold on the Switch and other platforms called Disney Classic Games Collection. It contains emulators and ROMs stripped of the trademarks of their host systems, with the emulators created without the involvement of them too.
Nintendo can't do anything about third parties emulating their hardware without also threatening the legal status of software released by their partners, which include Disney, but that's just one example. Suffice to say that even if you argue that Yuzu/Ryujinx step over the line, the foundations for all this are fragile enough that no one wants to rock the boat.
Nintendo would have the authors assassinated if they weren't. They're about as harsh as you can get on homebrew devs.
Emulators are emulators. What they are mainly used for as absolutely no impact on their legality.
No, it's not the only use, it's also used play Nintendo Switch games without using a Nintendo Switch, which is a 2017 console with 2012 hardware but otherwise really, really good games.
I already prepurchased Zelda Tears of the Kingdom physical but I am debating whether I should just play it on my deck, as it will probably run better than on a Switch with all the features that come with an emulator.
So I use an emulator. It is such a good experience. Better quality, save states, I can backup and transfer save files. I can record and screenshots are easy to manage unlike the manual SD card shuffling required on the Switch.
Nintendo doesn't want to release a new one? Then don't mind me using Ryujinx instead. Hopefully the Nintendo ninjas will not kill me in my sleep because of th
For me personally the only reason to get a Switch would be for exclusive games, which IMHO is a bad reason to buy some specific hardware. I would much rather that people buy the hardware that suits their needs best (which may be a Switch for people who want mobile gaming) and games were largely available cross-device (resource requirements being the rare exception). I do understand the economic reason for exclusive contracts, but it is so consumer hostile.
The only thing I "pirate" are Pokemon games because I want to laugh at how unfinished they are, but I usually give up one hour in.
I know many games do drop frame rate at 1080p docked vs the 720p built-in display… so is this just getting back up to 60fps while running in 1080p on a 4K monitor?
[0] https://blog.ryujinx.org/introducing-resolution-scaling/
If you emulate on fast enough hardware, for games that emulate well you will hit whatever the game's framerate cap is (sometimes 30, sometimes 60) flawlessly where the native hardware struggles.
I know most people will use them for piracy but it's really shortsighted and I'm glad emulation is still legal.
Well, from a purely legal perspective that's not any different than "regular" piracy.
archive
place or store (something) in [a collection of historical documents or records providing information about a place, institution, or group of people]
If you were downloading roms in order to build your archive, that would be piracy, but the downloading roms is the issue there. One could argue that downloading roms is fine if you own the games in question as well, but I doubt anyone wants to test that in court.
These multi-billion dollar corporations cannot be trusted to maintain their digital storefronts or the ability to play games into the future. This has been shown time and time again as Nintendo et al. have shuttered eshops, dropped support for consoles, and removed titles from circulation. Video game history and its preservation fully depend on emulation efforts from the community.
No, while the emulation is pretty good, it's not perfect, and new titles won't always run out of the box. And things like online multiplayer naturally don't work. A Switch is a guaranteed-to-work way to play those titles, and arguably more convenient if you actually use the portability of it.
There are of course non-piracy ways to use them. I own a hackable Switch and have dumped the games I purchased so I can play them in an emulator on my Steam Deck. But not every title will run perfectly that way, so sometimes the Switch is the only portable way of actually playing them.
Online multiplayer won't work on a Switch either. It's a separate paid subscription service.
LAN play mostly exists to be able to reliably connect Switches to each other at tournaments and such (which is why you find it more frequently in competitive games). It doesn't connect to Nintendo's servers, it just looks for other devices on the same network for local play purposes. Its not the same thing as regular local multiplayer, that's a different feature.
You can somewhat trivially intercept this using DNS if you want to do long-distance co-op, but it's absurdly jank from my experience.
Also both Ryujinx and Yuzu support connecting with LDN_mitm which well, man-in-the-middles the LDN sysmodule on hacked Switch devices to enable the same thing as LAN play interception but then for titles that don't support LAN play.
can't Nintendo get a clue and make a retrocompatible newer model which does not have the processing power of a potato?
I don't personally care about copyright. I don't pirate video games because they are generally artistically as interesting as blockbuster movies which is to say not at all but I don't really have an issue with people denying profits to the entertainment industry.
Writing emulators is fun in and of itself by the way. I don't think most of the developers use them to play.
The fact that the system currently relies on copyright is not in itself a justification for it nor does it means it's a good system.
https://slatestarcodex.com/2014/08/14/beware-isolated-demand...
There is no way for you to, with the certainty you did, say what you said. You have absolutely no way of actually knowing what people use emulators for, and you're just pulling it out of your ass and pretending it's the absolute truth.
You are making a massive assumption based on nothing but your own beliefs, and you need to make it clear that the assumption is nothing more and certainly not the fact you are parroting it to be.
Some pirates may just want free shit, yes. But some pirates, especially modern ones, really are working more on a preservationist angle and intending to ensure that works aren't lost or destroyed. Rightsholders aren't forced to ensure that the public actually has access to a work once copyright expires, so the public must ensure that for themselves.
For me, the form factor counts for a lot. That is part of the experience. The Switch itself also makes a great emulation platform for gaming on the go.