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.
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.
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?
For emulators that intend to run games at full speed, the sorts of shortcuts and tricks needed to achieve high level emulation (which can sometimes fall short of emulation in a strict sense) are often incompatible with writing a plugin or extension to an emulation framework that focuses on accuracy.
In the case of the Switch, it's not necessary to emulate the whole device or even processor, especially if the intention is to run Switch games on a computer. Rather, high level emulation is more than sufficient — anticipate what the software depends on the actual hardware to do and redirect it to do the same using what the computer has available.
There is one emulator currently that does do that, the "XQEMU" emulator for the original Xbox https://xqemu.com/
It's in its infant stages at the moment according to the "Emulation General" wiki and focuses heavily on "accuracy" over performance
Other emulators such as CXBX-Reloaded have made larger strides, currently emulating roughly 10% of the software library
It's also worth stating, while the Xbox seems like an "easy" target, being based on an ia-32 (Pentium III) PC with an Nvidia GeForce chip (somewhere between a Geforce 2 and 3 at the time) it is an absolutely monstrous beast with minimal documentation about its hardware and numerous "gotchas"
It also has a very small library of 'exclusive' content which detracts from gaining many developers
Potentially a couple devices. But for most of the hardware, probably not.
Regardless they might—I would—find QEMU harder to hack on, harder to extend, because it is written in C. C is of course the lowest level of all high level languages.
> 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?
> if it's running on an ARM processor does it just run the instructions directly?
You can't just run random instructions like that. That code is compiled with the assumption that there's the Switch's OS and hardware underneath, which means it will do all kinds of things, like calling directly into the kernel and assuming a particular address space layout, that would crash it under a different OS.
ARM has hardware virtualization. If the host OS supports it, you should be able to make use of it.
The current ARMeilleure seems to emit x86 instructions directly and execute them, so never really using the intermediate representation of Jit compiler of the .Net runtime.
However the previous cpu emulator apparently emitted .Net byte code and used RyuJIT (the .Net jit) to emit the final native code.
> if it's running on an ARM processor does it just run the instructions directly?
So maybe? There are some passes in between but one would think it would at least result in very similar instructions.
>Rest assured, this is in our long term plan. Initially, we'll be bringing up ARM support as a dynamic code translation target architecture in the short term, as this is a relatively straightforward thing to add to our existing JIT. This work is already underway.
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.
Unfortunately, Nintendo has not made any friends within the emulation/homebrew community especially as of late(or ever), so the common consensus seems to be "we don't care, as long as you don't do illegal things on our front porch".
This is purely an observation, however these things have tradition within the Nintendo hacking community and most members of the community are very passionate about their projects - the Wii is comparatively hard to emulate, which is why Dolphin is still struggling with certain things after a long time, while Switch emulators can run a lot of games nearly perfectly after less than half a decade.
It sucks, doesn’t it? Developers deserve to get paid, but I’m glad I didn’t have to wait a decade to see Breath of the Wild in 4K.
I wish there was an easier way to run legitimately purchased cartridges. I don’t know how many people ever did it, but PCSX2, for instance, has always been able to run PS2 discs right off a standard PC optical drive.
If buying games can be made easier than piracy, lots of people will probably do that. But if piracy is way easier, then that’s what 99.9% of users will do.
Incidentally, around 20 years ago I purchased a copy of Bleem! at a Fry's electronics and some games to play on it (playstation was still a current-gen console at the time). I would not have purchased nor played the games if I had not purchased the emulator. This was probably not a typical thing to do but I don't see it as a fundamental thing that existence of emulators has to hurt software sales for a current-gen console.
I also think steam has proved that the way to beat piracy is to offer a better experience than piracy offers. I get headaches playing 3d content at 30 fps, I would pay double the cost per game to run first-party nintendo games on my PC at an unlocked resolution and frame rate.
These emulators are usually useless for piracy until after the console has reached its end of life. People start working on them as soon as possible but they don't work well for years. The switch is almost at the end now and there still isn't an emulator which works very well.
When the competition for emulators is buying a hackable switch and running dumped games natively with 0 bugs or slowdowns. I doubt switch emulators have prevented the sale of a single switch game.
There are many reasons to use an emulator. You could play your own games on a new platform, or without having to pay for the hardware (a gaming PC which can run an current-gen emulator is expensive enough!). You could use it to play or develop homebrew software, or to research commercial software. You can use it to bypass region locks, which I would argue are quite unethical in their own right.
Even with all of that said, I support piracy. Information wants to be free, and games are made of information. No one has lost anything when a game is copied.
> 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).
Do you differentiate between games being “made” and “sold”? If not, which consoles specifically are thinking of as ethical to emulate? Nintendo still sells NES, SNES, N64, etc. games via Virtual Console.
I think consoles are great devices to make gaming accessible to the masses, requiring little to no effort to get up and running. Where I draw the line is console exclusives.
I will not purchase a console that forces me to buy hardware I do not need because they ban experiences from other platforms to try gain a competitive edge. I feel this is damaging to the industry as games with incredible experiences are blocked behind a paywall (and often restricted quality).
Consoles should compete on experience and features, not exclusive games that you can't play without buying into the ecosystem.
I only just got around to finishing Bloodborne (at 20-30 fps) and it's a game I have wanted to play since I saw the trailer back in 2013. It's so sad that they limit this game's IP to only PS4 owners. I would love to see the lore expanded upon in sequels (that run at an unlocked, variable frame rate), but if demon souls is anything to go by, we won't.
If it were available for PC, I would buy it. If it were available via emulation, I would buy it.
People who pirate games do so because they can't afford them, and there is nothing less affordable than having to buy an entire device to play a game.
Emulation does complicate this somewhat because piracy is a necessity to the experience, something that could be addressed by the hardware vendors themselves.
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).
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.
Ryujinx isn't actually the only Switch emulator; between Ryujinx and Yuzu, you can emulate basically everything the Switch can do and play most of the games it can.
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.
I don't anticipate it would make much real difference. The trick with console emulators is usually making the graphics, audio, and game-specific quirks sing well on commodity hardware rather than the specialised hardware the console has. Getting ARM code to run on Intel isn't the hard bit — so getting ARM code to run on ARM may well be more performant than running it on Intel – but rather the trick is getting all the other precise console-specific hardware to sing with available cross-platform frameworks for audio and video.
I worked on Jpcsp a long time ago, PSP emulator in Java. It was the first emulator to manage to run a large amount of games. We had some crazy devs on it who even wrote a MIPS to Java bytecode JIT. It worked great... sometimes. We ended up running into lots of JIT issues as some patterns were unusual and not always properly handled by hotspot. Fun times!
There were a slew of older JITing PSP emulators when it came out using C# that had modern architectures. It's a cute technique to bootstrap a JIT, using a JIT runime that people already can be expected to have.
pspplayer might have been the first? I could be wrong there
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)
Why would you see this emulator in particular getting DMCAed?
There's not really good precedent for this that I'm aware of - Nintendo did DMCA the repo for a GBA emulator a while ago, but it came with Nintendo game ROMs in the browser.
molticrystal|5 years ago
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.
-----------------------
[0] https://github.com/Ryujinx/Ryujinx/pull/1481dt3ft|5 years ago
MegaDeKay|5 years ago
https://yuzu-emu.org/entry/yuzu-progress-report-feb-2021/
edoceo|5 years ago
zapzupnz|5 years ago
In the case of the Switch, it's not necessary to emulate the whole device or even processor, especially if the intention is to run Switch games on a computer. Rather, high level emulation is more than sufficient — anticipate what the software depends on the actual hardware to do and redirect it to do the same using what the computer has available.
IntelMiner|5 years ago
It's in its infant stages at the moment according to the "Emulation General" wiki and focuses heavily on "accuracy" over performance
Other emulators such as CXBX-Reloaded have made larger strides, currently emulating roughly 10% of the software library
It's also worth stating, while the Xbox seems like an "easy" target, being based on an ia-32 (Pentium III) PC with an Nvidia GeForce chip (somewhere between a Geforce 2 and 3 at the time) it is an absolutely monstrous beast with minimal documentation about its hardware and numerous "gotchas"
It also has a very small library of 'exclusive' content which detracts from gaining many developers
orra|5 years ago
I mena, in principle, presumably.
> that QEMU already does
Potentially a couple devices. But for most of the hardware, probably not.
Regardless they might—I would—find QEMU harder to hack on, harder to extend, because it is written in C. C is of course the lowest level of all high level languages.
whoisthemachine|5 years ago
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?
grishka|5 years ago
You can't just run random instructions like that. That code is compiled with the assumption that there's the Switch's OS and hardware underneath, which means it will do all kinds of things, like calling directly into the kernel and assuming a particular address space layout, that would crash it under a different OS.
ARM has hardware virtualization. If the host OS supports it, you should be able to make use of it.
calaphos|5 years ago
However the previous cpu emulator apparently emitted .Net byte code and used RyuJIT (the .Net jit) to emit the final native code.
> if it's running on an ARM processor does it just run the instructions directly?
So maybe? There are some passes in between but one would think it would at least result in very similar instructions.
molticrystal|5 years ago
>Rest assured, this is in our long term plan. Initially, we'll be bringing up ARM support as a dynamic code translation target architecture in the short term, as this is a relatively straightforward thing to add to our existing JIT. This work is already underway.
brundolf|5 years ago
Edit: "cracking" -> "piracy", for clarity
meibo|5 years ago
This is purely an observation, however these things have tradition within the Nintendo hacking community and most members of the community are very passionate about their projects - the Wii is comparatively hard to emulate, which is why Dolphin is still struggling with certain things after a long time, while Switch emulators can run a lot of games nearly perfectly after less than half a decade.
Wowfunhappy|5 years ago
I wish there was an easier way to run legitimately purchased cartridges. I don’t know how many people ever did it, but PCSX2, for instance, has always been able to run PS2 discs right off a standard PC optical drive.
If buying games can be made easier than piracy, lots of people will probably do that. But if piracy is way easier, then that’s what 99.9% of users will do.
matthewrobertso|5 years ago
I also think steam has proved that the way to beat piracy is to offer a better experience than piracy offers. I get headaches playing 3d content at 30 fps, I would pay double the cost per game to run first-party nintendo games on my PC at an unlocked resolution and frame rate.
foobar33333|5 years ago
When the competition for emulators is buying a hackable switch and running dumped games natively with 0 bugs or slowdowns. I doubt switch emulators have prevented the sale of a single switch game.
ddevault|5 years ago
Even with all of that said, I support piracy. Information wants to be free, and games are made of information. No one has lost anything when a game is copied.
cdubzzz|5 years ago
Do you differentiate between games being “made” and “sold”? If not, which consoles specifically are thinking of as ethical to emulate? Nintendo still sells NES, SNES, N64, etc. games via Virtual Console.
Cypher|5 years ago
unknown|5 years ago
[deleted]
joshgoldman|5 years ago
[deleted]
andy_ppp|5 years ago
nix23|5 years ago
That would be truly terrible!! Making a copy of your owned games is a capital crime.
apatheticonion|5 years ago
I will not purchase a console that forces me to buy hardware I do not need because they ban experiences from other platforms to try gain a competitive edge. I feel this is damaging to the industry as games with incredible experiences are blocked behind a paywall (and often restricted quality).
Consoles should compete on experience and features, not exclusive games that you can't play without buying into the ecosystem.
I only just got around to finishing Bloodborne (at 20-30 fps) and it's a game I have wanted to play since I saw the trailer back in 2013. It's so sad that they limit this game's IP to only PS4 owners. I would love to see the lore expanded upon in sequels (that run at an unlocked, variable frame rate), but if demon souls is anything to go by, we won't.
If it were available for PC, I would buy it. If it were available via emulation, I would buy it.
People who pirate games do so because they can't afford them, and there is nothing less affordable than having to buy an entire device to play a game.
Emulation does complicate this somewhat because piracy is a necessity to the experience, something that could be addressed by the hardware vendors themselves.
yc-kraln|5 years ago
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).
edflsafoiewq|5 years ago
tester756|5 years ago
maybe that's the case here
GlitchMr|5 years ago
The_rationalist|5 years ago
aksss|5 years ago
nicetryguy|5 years ago
caslon|5 years ago
smaudet|5 years ago
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.
huachimingo|5 years ago
saagarjha|5 years ago
unknown|5 years ago
[deleted]
royalghost|5 years ago
azinman2|5 years ago
zapzupnz|5 years ago
andi999|5 years ago
Cyph0n|5 years ago
p1necone|5 years ago
Orphis|5 years ago
monocasa|5 years ago
pspplayer might have been the first? I could be wrong there
pjmlp|5 years ago
https://hackaday.com/2018/08/07/even-the-playstation-2-cant-...
jb775|5 years ago
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)
klyrs|5 years ago
It looks like that might be deliberate?
emodendroket|5 years ago
177tcca|5 years ago
DC1350|5 years ago
barbazoo|5 years ago
Maybe I should try Witcher 3.
miguelmurca|5 years ago
mappu|5 years ago
Copyright infringement is a civil offense, but there's none here.
bri3d|5 years ago
There's not really good precedent for this that I'm aware of - Nintendo did DMCA the repo for a GBA emulator a while ago, but it came with Nintendo game ROMs in the browser.
mdgrech23|5 years ago
politelemon|5 years ago
https://news.ycombinator.com/item?id=26445101
brundolf|5 years ago
geswit2x|5 years ago