Stary2001 / godot

A port of Godot Engine to Nintendo Switch via homebrew tools.
https://godotengine.org
MIT License
361 stars 23 forks source link

Yuzu Emulator & C# support? #19

Closed Avellea closed 4 years ago

Avellea commented 4 years ago

Hey there. I've been working on a game for a while in C#, and I'm wondering if C# support is implemented into this. I wouldn't think so, but I also don't have the tools to try at the moment.

Theres also the fact that Yuzu emulator seems to not work with these builds. Running a small test application causes the emulator to freeze and stop responding on Windows. Crash logs are at this link. https://hastebin.com/eqedojovud.cs It would be amazing to get these features properly working so we can have some amazing homebrew games!

Stary2001 commented 4 years ago

Yuzu (afaik) has lots of issues with Mesa - it sometimes does things that commercial games don't, so they aren't handled properly. As for C# - I've been working on it but it's a lot of effort to port the Mono runtime, especially as HOS breaks a lot of assumptions made for Linux-y OSes (mmap doesn't exist, signals don't exist). Static linking imposes a few limitations with C#, so the dev experience might not be as good as other platforms.

Avellea commented 4 years ago

Thanks for the insight!

I understand Yuzu is definitely troublesome, it hardly even runs my little C++ tests on my Ryzen/Radeon system.

As for Mono and C#, I believe switch SDK was leaked somewhere online. Without using specific code examples for legal reasons, could you use some insight from that? The SDK does officially support unity which is also C#.

Stary2001 commented 4 years ago

I'm not going to look at the official Switch SDK. Doing that opens me up to legal trouble as it's either illegal to get it (as with the leaked version), or illegal to use outside of the NDA signed when obtaining it legitimately.

ImUrX commented 4 years ago

Yuzu (afaik) has lots of issues with Mesa - it sometimes does things that commercial games don't, so they aren't handled properly. As for C# - I've been working on it but it's a lot of effort to port the Mono runtime, especially as HOS breaks a lot of assumptions made for Linux-y OSes (mmap doesn't exist, signals don't exist). Static linking imposes a few limitations with C#, so the dev experience might not be as good as other platforms.

@Stary2001 isnt there a OpenBSD version for mono? shouldn't that be simpler to port?

Avellea commented 4 years ago

Stary2001 isnt there a OpenBSD version for mono? shouldn't that be simpler to port?

Totally forgot about this... Might experiment with porting some of my code to that in case someone needs some POC examples.

Stary2001 commented 4 years ago

Switch doesn't use FreeBSD - it's a custom microkernel. They ripped the network stack out of FreeBSD and put it into a sysmodule, which is why it appears in the copyright notices... a BSD port won't be too helpful with porting to Horizon.

Avellea commented 4 years ago

Going to go ahead and mark this as closed as further discussion is unnecessary.

ThatFinnDev commented 1 year ago

Wouldn't it be possible to compile to c# to intermediate language (IL) and then convert it to C++ (To use it with GDnative) like Unitys Il2CPP (Intermediate Language to C++)?