Homebrew WIP Experimental Switch emulator in C#

  • Thread starter Thread starter gdkchan
  • Start date Start date
  • Views Views 54,135
  • Replies Replies 117
  • Likes Likes 77
Nice! I will be following this thread. Quite excited to see progress in this.
 
Wish you the best , i heard on Discord that he or she helped the Yuzu Team to build stuff so its def something good here always nice to see progress
 
I might as well go ahead and share the Official site and Discord server (Since I have been working along side of gdkchan):

Discord: https://discord.gg/VkQYXAZ
Website: https://zoltx23.github.io/ryujinx-emu/

Anyone may join for general discussion; I hope to see you all there!

EDIT:

upload_2018-2-5_20-52-44.png

Loading NRO's and NSO's seems to be a finicky situation. Some work and some do not. Most Lib-transistor apps do not work.
 
Last edited by Dr.Hacknik,
That's an interesting approach to coding an emulator, I wonder if it'll be as fast as native code.
I'm a C# coder myself, so I find this pretty cool.
Good luck with your project, looking forward to seeing how it progresses.
It definitely can be, C#, .NET and relevant libraries have come a long way and the language allows you to do pretty low level stuff if you really want to by enabling unsafe operations. C# has gotten a bad rap from people just letting the GC take care of all data and how bad the early days GC was. But it's a pretty great language these days and absolutely can be used for high-performance code if you understand how to utilize it properly.
 
Holy shit, this is awesome. I've always been a huge proponent of targeting CIL for recompilation -- I'm excited to see someone else doing it too! Very nice job, and good luck going forward.
Thanks. Didn't know anyone tried to do a recompiler using CIL before (except for a PSP emulator in C#). The biggest disvantage right now is not being able to use x86 SSE/AVX instruction equivalents for the SIMD arm instructions. However .net is getting intrinsics support and that should be available on the next version, so in the future I will be able to call those intrinsic methods directly and have the JIT emit SSE/AVX and this should improve the performance a lot.

---

For anyone having problems running homebrew stuff, it's fine to open a issue, it seems to be mostly due to unimplemented instructions (a LOT of instructions are still not implemented) so I will work to implement them. If it errors executing the first instruction (the one at 0x08000000) then it means you have an old NRO, it only supports NROs from the new libtransistor.
 
This is impressive. I'm a C-Sharper myself lol but I'm a bit afraid this might be kind of a bottleneck in the end when every bit of performance is needed.
But I wish you good luck, it seems promising.
 
  • Like
Reactions: Deleted User
@gdkchan I think use can use SIMD instructions through System.Numerics since the latest update
Yes but System.Numerics is very limited, it will only use a couple of the simd instruction exposed through the Vector classes. Currently it only exposes basic operations like add, subtract, divide, multiply, negate and logical operations like and, or, xor... A lot of instructions aren't exposed this way, like all scalar operations using SSE registers (you can get those using some of the methods on the Math class, but then you need extract/insert the scalar elements from the vectors all the time), shifts, more involved operation like MultiplyAdd, Broadcast, Load/Store, and so on...

If you fired up Puyo Puyo Tetris, I'm curious on how this is handling game decryption.
Currently it only runs decrypted and extracted games. (So, no XCI or NCA support).
 
Is it possible to have this post pinned? I’d like to have it at the top for quick reference. Anyone else think that’s a good idea?
 
  • Like
Reactions: Dr.Hacknik
I hate Mac's...

Anyway have you tried using the CPU speed hack cheats just to see if it does anything on the performance?

Also can you use Nvidia cuda cores acceleration for C#???

that looks like a god damn lot of work and lot of conversions until it gets to machine code, what's your PC specs????


Ps: if it gets to a point where a crappy laptop could run all switch games I wouldn't even bother buying the switch :). I have a 11.6 inch I7 3rd gen laptop with GT650M which is pretty small
 
Last edited by guily6669,
  • Like
Reactions: Subtle Demise
So, let me see what Visual Studio packages I need to install:

  • Visual Studio 2017 Community (600MB)
  • Universal Windows Platform Development (Windows SDK 10.0 10586.0) (8.6GB)
  • .NET Desktop Development (???)
  • .NET Core Cross-Platform Development (???)
A total whopping of 26GB required.

Anything else?
 
So, let me see what Visual Studio packages I need to install:

  • Visual Studio 2017 Community (600MB)
  • Universal Windows Platform Development (Windows SDK 10.0 10586.0) (8.6GB)
  • .NET Desktop Development (???)
  • .NET Core Cross-Platform Development (???)
A total whopping of 26GB required.

Anything else?
Or you can just use the NET Core SDK and compile that way ;3
 

Site & Scene News

Popular threads in this forum