Live data from Hacker News

Experimental Nintendo Switch Emulator written in C#

github.com

121–130 of 172 posts

Re: Experimental Nintendo Switch Emulator written in C#

#121

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

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…

Only problem is, if while doing the work the developers were told their work isn't going to be entirely paid for they would have chosen to do something else.

You write a book and would be paid by the word. After toiling away for 2 years, 30% of your work will not be paid for because the publishers feel this is just information. You have been decived.

When labor is carried out with certain promises of compensation and after the work is completed if the fruits of the labor are not compensated to the person company doing the effort then it's fraud / stealing.

Broadly your argument sounds like 'knowledge work is not real work' because it doesn't produce tangible assets.

Re: Experimental Nintendo Switch Emulator written in C#

#122

What made C# a good choice for this?

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.

C++ interop?

Re: Experimental Nintendo Switch Emulator written in C#

#123
post #59

Earlier quoted context omitted.

For game dev (and emulators!), the non-deterministic behavior of GCs can cause a lot of trouble, mainly because you have a fixed frame budget. That’s why it’s usually easier to just use a language where you can finely control when and where allocations take place. I’m sure there are techniques to work around this, but you’d then usually have to leave behind the “idiomatic” area of the language you’re using.

Yes, In C# you have to leave the idiomatic side somewhat to get the most performance. Though this is getting better in latter versions of C#, in which you get more low level coding features. But for me the fun part is doing exactly that. Coding as close to the metal as possible, leaving the "safe" side of C# but still using the Quality of Life features that C# offers compared to C++. That for me makes C# my favorite…

I like C# and use it a lot, but for performance sensitive apps I need SIMD. Microsoft is making improvements, but not enough, still a long way to be comparable to C++. Currently, they don't support NEON on 32-bit ARM, and have performance issues in the JIT: https://github.com/dotnet/runtime/issues/13811

Re: Experimental Nintendo Switch Emulator written in C#

#124

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

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 co…

If I remember correctly bleem! Could only play disc games so it was specifically aimed at people buying playstation games to play them on PC.

Re: Experimental Nintendo Switch Emulator written in C#

#125

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

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…

The problem is not about free distribution of knowledge or not.

The problem is, in compensation of the people involved in doing the work.

For example if someone sponsored content 'x' and made it free to the public it would be fine to copy it around. Think govt funded research. This has its own problems. The people that commission these works and the general public may not share the same tastes.

The risks of selling to a patron and selling to a yet unknown audience are vastly different. This is why the compensation varies wildly between the two. Its possible that one game may take enormous resources and then not give back any returns resulting in a loss and another one makes massive profits.

The positive ones cover up for the failing ones. If you only look at the positive ones it's easy to be dismissive and say they are getting compensated undeservedly. In the broader picture it is the massive successes that allow for variety in the market place, it is an essential mechanism. If you cap off the upper limits of getting paid, people will be unwilling to make newer / different types of things. The market is essentially funding innovation, variety and a buffer for failures - it serves as a direction mechanism for knowing what people want.

Knowing what to make that people will buy is a very hard and expensive problem to answer. People that can answer it correctly get paid a lot of money deservedly.

Re: Experimental Nintendo Switch Emulator written in C#

#126
post #9

This is great to see. It would be nice to play switch games on something at least as powerful as a modern phone

Are you implying that the Switch hardware isn't good enough for its games? I have yet to play a game that doesn't run well. Maybe I should try Witcher 3.

Zelda will start to go wonky with what looks like 10 fps when you go to a very dense place with lots of 3D models like the 'korok forest'.

Re: Experimental Nintendo Switch Emulator written in C#

#127

Earlier quoted context omitted.

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.

C++ interop?

C++ interop is not supported in modern .NET out of the box, but wasn't too hard to implement as a library: https://github.com/Const-me/ComLightInterop

Re: Experimental Nintendo Switch Emulator written in C#

#128

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

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 prob…

>I don’t know how many people ever did it

It's been many years, but I tried this to play FFIX. Turned out it was one of the few games that still had game-breaking issues at the time. I wonder if it works now.

Re: Experimental Nintendo Switch Emulator written in C#

#129
post #15

Earlier quoted context omitted.

>But emulating something whose games can still be bought new would tend to encourage cracking, imo. That would be truly terrible!! Making a copy of your owned games is a capital crime.

When people refer to "cracked" games/apps there's usually an implication of "pirated". I'll edit my wording.

Good, because i make a big distinction between cracking and pirated.

Re: Experimental Nintendo Switch Emulator written in C#

#130

Earlier quoted context omitted.

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.
Post reply on HN