Live data from Hacker News

RyujinX – Open Source Nintendo Switch Emulator

ryujinx.org

31–40 of 215 posts

Re: RyujinX – Open Source Nintendo Switch Emulator

#31

I wouldn't have guessed C# would be a good fit for something like this, but neat to see!

I believe Ryujinx actually translates the ARM code to .NET IL, which is then JIT compiled to machine code by .NET. As far as I know it’s a pretty innovative approach to emulation!

And on Apple Silicon, it just runs the Switch’s Arm64v8 instructions natively using a hypervisor! [1]

[1] https://blog.ryujinx.org/the-impossible-port-macos/

Re: RyujinX – Open Source Nintendo Switch Emulator

#32
post #19

Earlier quoted context omitted.

Yes, just hacking nights and weekends. I've done my fair share of console reverse engineering, developing software for console devices (mostly GBA and NDS development, but a fair bit of SMS and Genesis reverse engineering), etc, and it's seriously some of the most fun I've had as a developer. But it takes an enormous amount of tenacity to push through the inevitable challenges.

This 1000X ! I'm currently working on emulating the Apple 2+ speaker better. It's been a 2-3 spare time hours a week for about a year now :-) But the joy of working on a machine that's part of your life, without the need to please end users (which is cool too but sometimes induce pressure), well, that's basically coding like when I was a kid. Except that now I have a TON more knowledge to work with ! And, while worki…

Absolutely.

And the other thing I love about it is the communities are typically super open and collaborative. I remember back when I first got into GBA development, there was a ton of docs, tools, libraries, and other things that folks had put together and then shared with one another. It's a lot of very passionate people sharing some very niche interests, which can be incredibly fun (of course it can also be a drama filled nightmare but such is life with passionate people).

Re: RyujinX – Open Source Nintendo Switch Emulator

#33

Earlier quoted context omitted.

Yes, just hacking nights and weekends. I've done my fair share of console reverse engineering, developing software for console devices (mostly GBA and NDS development, but a fair bit of SMS and Genesis reverse engineering), etc, and it's seriously some of the most fun I've had as a developer. But it takes an enormous amount of tenacity to push through the inevitable challenges.

where do you start learning reverse engineering things? I'm also curious, as a software eng focusing on web stuff and api, it's getting quite boring. These things excites me but i never got to start

This is a good place to start. Named "the ultimate game boy talk" dives into the CPU used, the instruction set(s) used by the CPU, how the video instruction sets work(ed) etc. The game boy from 1989 is a pretty simple device to start learning from. From there you can look at how various people emulated the system.

https://www.youtube.com/watch?v=HyzD8pNlpwI

Re: RyujinX – Open Source Nintendo Switch Emulator

#34
post #27

Earlier quoted context omitted.

What's the average FPS?

Dont know OP, but I am playing pokemon scarlet on it, m1 max macbook 15, and its pinned at 30fps. Don't know if the game just wants to run at 30fps, or if my macbook can't go any faster. But since its stable at exactly 30, I assume it's the game

From my experience with yuzu and ryujinx, in order to exceed 30fps, most games need to be modded. Almost all popular games have a mod available though.

Re: RyujinX – Open Source Nintendo Switch Emulator

#35

Earlier quoted context omitted.

Yes, just hacking nights and weekends. I've done my fair share of console reverse engineering, developing software for console devices (mostly GBA and NDS development, but a fair bit of SMS and Genesis reverse engineering), etc, and it's seriously some of the most fun I've had as a developer. But it takes an enormous amount of tenacity to push through the inevitable challenges.

where do you start learning reverse engineering things? I'm also curious, as a software eng focusing on web stuff and api, it's getting quite boring. These things excites me but i never got to start

So, to be clear, I spent my time reverse engineering software rather than the hardware itself. That said, my observation is that a lot of hardware reverse engineering is software reverse engineering since the software helps you understand how the hardware works (the Asahi guys literally built a hypervisor so they could watch macOS interact with hardware).

And software reverse engineering is just grunt work. I'd start with a very well known existing hardware platform with a very simple CPU design--the GBA is actually a really nice platform as the ARM has a very sane ISA and it's all memory mapped I/O--and get a devkit and start experimenting by writing software to run in an emulator so you can get a feel for how the hardware works.

Re: RyujinX – Open Source Nintendo Switch Emulator

#37

I wouldn't have guessed C# would be a good fit for something like this, but neat to see!

I believe Ryujinx actually translates the ARM code to .NET IL, which is then JIT compiled to machine code by .NET. As far as I know it’s a pretty innovative approach to emulation! And on Apple Silicon, it just runs the Switch’s Arm64v8 instructions natively using a hypervisor! [1] [1] https://blog.ryujinx.org/the-impossible-port-macos/

I wonder if wasm would be another good target for this sort of thing in the future.

Re: RyujinX – Open Source Nintendo Switch Emulator

#38
post #13

i gotta ask, what kind of career path does one have to have to figure out how to make this sort of thing? just hacking nights and weekends for 2 years straight? because i dont know how anyone gets paid to do this and yet there is so much incredible depth to learn that is probably undocumented because of legal issues

"This sort of thing" is actually really simple to get started with. You just read a few docs about the object-code format and instruction-set of the device you want to emulate, and then start writing a simple interpreter loop that reads and executes instructions from any arbitrary existing program ROM. Compare and contrast the results of running it on your emulator with running the same thing on real hardware (or on some other emulator.)

As soon as you get one well-known program working and displaying something on the screen — congratulations, you've made "an emulator"! Now all that's left is "just" debugging the inevitable compatibility issues that your emulator will encounter with every other program ever compiled for the target architecture. It's like Test Driven Development, but your test suite is "the complete game library of the console"!

(And then, once you've got 100-ish percent compatibility, maybe you can spare some time to optimize performance!)

If you've never done this before, it can be great fun! I'd recommend starting with a Z80 (Gameboy) emulator — it's an extremely well-documented architecture, fairly simple (no weird concepts like clipping masks or MMU mapper chips), fast to get to the "rewarding" point where you've got something displaying on-screen, and so low-powered that on modern hardware it'll run at full speed even with the most naive implementation.

Re: RyujinX – Open Source Nintendo Switch Emulator

#39

Is there any way to play games (legally) on this if you don't have a Switch to dump them from? Is it possible to buy Switch games through a web browser?

This must depend on your jurisdiction.

But if you own the game, does it matter how you got the ROM?

Re: RyujinX – Open Source Nintendo Switch Emulator

#40
post #13

i gotta ask, what kind of career path does one have to have to figure out how to make this sort of thing? just hacking nights and weekends for 2 years straight? because i dont know how anyone gets paid to do this and yet there is so much incredible depth to learn that is probably undocumented because of legal issues

I've worked on large projects for almost 10 years before I started working in the field, though perhaps not as complex as an emulator.

I dropped out of college due to medical reasons and was given the "opportunity" to receive disability benefits for the rest of my life. I accepted this and just continued my hobby doing programming. In that time I met many hobby programmers online who didn't seem to work or were temporarily taking breaks from studying to eventually find a job.

Eventually I felt a bit lonely not knowing anyone in real life who were interested in programming, so I found the meetup website and started going to events to get to know people. The friends I met there told me I should try working professionally as a programmer, so I tried and now I've been 5 years in the field and really enjoy it.

In retrospect being outside of the professional field, I knew it existed but it never crossed my mind that I could be part of this as it was for educated and highly experienced programmers only. Because of this maybe I never bothered to even try.

One issue for me entering the field was that I was highly specialized, but the field required me to be more general and perhaps specialize more in other things. Luckily for me I found the right people from the start with similar interests (game engine development, graphics rendering, etc) to help me understand the professional landscape.

I still find it satisfying to work on hobby projects in my spare time. I don't have as much time as before because of work and family, but I do manage to find the time now and then. :)

Post reply on HN