Homebrew WIP Experimental Switch emulator in C#

BullyWiiPlaza

Nintendo Hacking <3
Member
Joined
Aug 2, 2014
Messages
1,932
Trophies
0
XP
2,467
Country
Germany
That's very interesting. I distinctly remember you complaining that C++ can only be used for shitty command line Linux programs.
False. Would you stop spreading lies? Obviously most game engines and emulators are written in C++. What I said was that most Linux tools are command line tools written in C when people could use managed languages already hence the tools crash sometimes due to bugs and they don't use GUIs which makes them "shitty" overall. It's also a fact that Linux has poor game and graphics engine support. So, this obviously has nothing to do with the language alone if you look at Windows or gaming consoles but have a nice day, troll. Apparently not such a good memory after all (This was a Linux topic, not a C++ topic). But now don't bother continuing to derail as usual, thanks. :rolleyes:
 
Last edited by BullyWiiPlaza,

Dr.Hacknik

Ashley | Developer | Trans
Member
Joined
Mar 26, 2014
Messages
1,773
Trophies
1
Age
24
Location
inside your fridge
Website
dochacknik.keybase.pub
XP
2,219
Country
United States
False. Would you stop spreading lies? Obviously most game engines and emulators are written in C++. What I said was that most Linux tools are command line tools written in C when people could use managed languages already hence the tools crash sometimes due to bugs and they don't use GUIs which makes them "shitty" overall. It's also a fact that Linux has poor game and graphics engine support. So, this obviously has nothing to do with the language alone if you look at Windows or gaming consoles but have a nice day, troll. Apparently not such a good memory after all (This was a Linux topic, not a C++ topic). But now don't bother continuing to derail as usual, thanks. :rolleyes:
Ahem, explain how I can get more fps in Solus when it comes to games than Windows? Especially with a 1050 Ti? I'm really starting to question your logic.
 

Kakkoii

Old fart
Member
Joined
Sep 14, 2007
Messages
631
Trophies
0
XP
586
Country
Canada
Ahem, explain how I can get more fps in Solus when it comes to games than Windows? Especially with a 1050 Ti? I'm really starting to question your logic.
Pretty sure that's because the Linux environment has a hell of a lot less overhead and abstraction than Windows. Game is compiled from the same damn code for either platform.

Anyways, C# and relevant compilers have evolved over the years. C# is very much viable for developing high performance code on. It just takes someone knowledgeable enough with how the code gets compiled and the features available to you to do it.

 
  • Like
Reactions: Dr.Hacknik

punderino

aka Big-PeePee Swinger
Member
Joined
Jan 5, 2016
Messages
1,247
Trophies
0
Age
32
Location
Kansas City, Missouri
Website
www.anus.trade
XP
2,490
Country
United States
Linux has shit video driver support. In some games optimized directly for Linux you could, with a lot of work from the dev, get the same or more FPS than Windows, if it were more. It'd probably be because there's no shit running in the background. But I'm not gonna have spent as much as I did on my video card and not get to use it to its full potential just for Linux.

Anyways, nice emulator! Glad a lot of these are showing up
 

guily6669

GbaTemp is my Drug
Member
Joined
Jun 3, 2013
Messages
2,291
Trophies
1
Age
34
Location
Doomed Island
XP
2,050
Country
United States
I guess I am "anyone", so here it goes...

Ok. I don't.

Nope, I haven't.

I have no Nvidia hardware, so no, I can't.

Oh, which PC?... I guess I could look at the specs of the one I am using right now, let me see,
core i5 - 5200, 8GB RAM, Intel IGP.... It's a toaster, what a PoS.

Quite convinced it won't happen.
I wanted more the dev of this emulator to have answered :P

But anyway my laptop even though it's old is not that crappy for a 2012 11.6 inch laptop...

The I7 on it has close performance to my desktop I7 2600K though I have it at 4.9ghz so it goes way far ahead of the 3rd gen I7 on the laptop.

And the GT650M probably can play BF1 at like medium settings, BF4 run around high with a few things off...

Anyway a better Switch emulator might appear in the long future, though it would probably be pointless at that time when a new Nintendo comes out lool

Even on my I7 at 4.9ghz with huge single thread performance close to 7700k at stock clocks and a RX480 with 580 bios and clocks it's still hard to play Zelda on Cemu, though I haven't tried the latest version yet :(.

Ps: never had much luck with emulators :( unless old ones like mame32, NeoGeo, when I was a kid I played thousands of hours in them. Neo Bomberman is still the best :P
 
Last edited by guily6669,

Cid2mizard

Well-Known Member
Member
Joined
Aug 16, 2007
Messages
401
Trophies
1
Age
43
Location
Maubeuge
XP
2,412
Country
France
It's strange, I get an image inverted horizontally !
 

Attachments

  • reverse.png
    reverse.png
    37.6 KB · Views: 524
Last edited by Cid2mizard,

emmauss

Well-Known Member
Member
Joined
May 12, 2014
Messages
522
Trophies
0
Age
28
Location
Accra, Ghana
XP
2,457
Country
Ghana
Btw, which visual studio is recommended to build Ryujinx? VS2015 or VS2017 (will both community edition do well)?
VS is not necessary to build and run ryujinx. just the .net core sdk is enough. but for debugging and development, use vs 2017. the latest public version is VS 2017 15.5.7
 
  • Like
Reactions: AdamN

Cid2mizard

Well-Known Member
Member
Joined
Aug 16, 2007
Messages
401
Trophies
1
Age
43
Location
Maubeuge
XP
2,412
Country
France
for now when i push A on Ryujinx with read-controls example, Down, Held & Up panic. there seems to be a problem with the response of commands.
 

AdamN

Active Member
Newcomer
Joined
Jul 29, 2011
Messages
39
Trophies
0
Location
On the Net
Website
Visit site
XP
216
Country
Indonesia
Anyone managed to boot Puyo Puyo Tetris to logo (like shown by OP)?
I tried using the binary from auto-build but i only gets blank screen running at 60 FPS (the FPS doesn't feels right since my PC spec is kindda low, AMD A6-6400K 2-cores @ 3.9Ghz, 8GB RAM, Radeon R270 2GB VRAM), and i don't see any error in the console

ss-ryujinx-puyo-puyo.png
 
Last edited by AdamN,

Furoryan

Active Member
Newcomer
Joined
Feb 23, 2017
Messages
35
Trophies
0
Age
39
XP
98
Country
France
Hello,
I tried to read your code, but I'm not a C# dev, so there are some stuff with events I don't understand (the notation ?.Invoke).
My questions :
- where do you map the SharedMem for Hid? (offset location) Does it need to be mapped before giving the control to rtld or not?
- I get stuck with my own emu on a null pointer dereferencing in the struct nn::am::g_Interfaces (with Puyo puyo). Do you have already encounter this problem?
Thanks if you can help me!
 

gdkchan

Well-Known Member
OP
Member
Joined
Jul 8, 2015
Messages
181
Trophies
0
Age
26
XP
425
Country
Brazil
Hello,
I tried to read your code, but I'm not a C# dev, so there are some stuff with events I don't understand (the notation ?.Invoke).
My questions :
- where do you map the SharedMem for Hid? (offset location) Does it need to be mapped before giving the control to rtld or not?
- I get stuck with my own emu on a null pointer dereferencing in the struct nn::am::g_Interfaces (with Puyo puyo). Do you have already encounter this problem?
Thanks if you can help me!
You don't need to map the HID shared memory right aways, only when the game asks for it. Basically, it will call CreateAppletResource on the HID service, this will return an IAppletResourceInterface. Then it calls GetSharedMemoryHandle on the IAppletResource interface to get the handle for the HID shared memory. After that, it uses svcMapSharedMemory into a memory region on the process address space. The game can then read inside the HID mapped address to read input data.

About your problem with nn::am::g_Interfaces, no I don't remember having such a problem.

Also we have a discord if you want to join. Link is on the readme of the github page .
 

Furoryan

Active Member
Newcomer
Joined
Feb 23, 2017
Messages
35
Trophies
0
Age
39
XP
98
Country
France
You don't need to map the HID shared memory right aways, only when the game asks for it. Basically, it will call CreateAppletResource on the HID service, this will return an IAppletResourceInterface. Then it calls GetSharedMemoryHandle on the IAppletResource interface to get the handle for the HID shared memory. After that, it uses svcMapSharedMemory into a memory region on the process address space. The game can then read inside the HID mapped address to read input data.

About your problem with nn::am::g_Interfaces, no I don't remember having such a problem.

Also we have a discord if you want to join. Link is on the readme of the github page .
Thanks for your response. I think I forgot something to initialize but I don't know what.
Here is the last opcodes executed for Puyo puyo, it loads offset 72 (decimal) from nn::am::g_Interfaces. Zelda ends in a similar manner, but in fonction nn::am::GetSelfController(), with a different offset in structure g_Inerfaces. I don't think I have any more problems in my interpreter, but I really think I'm forgetting something to init.
Loading on the rom is done in the same way than you:
- rtld @0x8000000
- empty page for args after rtld
- page rounded up to next 0x1000
- no guard pages between nso
- execution starting at 0x8000000
Only TSL page and Main stack are not mapped like you (I don't think it will change anything).
Do I need to load anything else before giving the control to rtld?

[FUNCTION _ZN2nn2am23GetApplicationFunctionsEv]
Executing 0x196603c8 inst 0xf81e0ff3 STR X19, [X31, #-32]!
mmu::write64 @0x19e4fcf0[aka stack pid 00] value=0x1a80a
X31=0x19e4fcf0
Executing 0x196603cc inst 0xa9017bfd STP X29, X30, [X31, #16]
mmu::write64 @0x19e4fd00[aka stack pid 00] value=0x19e4fd20
mmu::write64 @0x19e4fd08[aka stack pid 00] value=0x196c354c
Executing 0x196603d0 inst 0x910043fd ADD X29, X31, #16
X29=0x19e4fd00
Executing 0x196603d4 inst 0xd0002fe8 ADRP X8, 6283264
X8=0x19c5e000
Executing 0x196603d8 inst 0xf942c908 LDR X8, [X8, #1424]
Symbol : _ZN2nn2am12g_InterfacesE
mmu::read64 @0x19c5e590 value=0x19c3b8e8
X8=0x19c3b8e8
Executing 0x196603dc inst 0xf9402513 LDR X19, [X8, #72]
mmu::read64 @0x19c3b930 value=0x0
X19=0x0
Executing 0x196603e0 inst 0xb4000133 CBZ X19, 36
Executing 0x19660404 inst 0xa9417bfd LDP X29, X30, [X31, #16]
mmu::read64 @0x19e4fd00[aka stack pid 00] value=0x19e4fd20
mmu::read64 @0x19e4fd08[aka stack pid 00] value=0x196c354c
X29=0x19e4fd20
Executing 0x19660408 inst 0xaa1303e0 MOV X0, X19
X0=0x0
Executing 0x1966040c inst 0xf84207f3 LDR X19, [X31], #32
mmu::read64 @0x19e4fcf0[aka stack pid 00] value=0x1a80a
X19=0x1a80a X31=0x19e4fd10
Executing 0x19660410 inst 0xd65f03c0 RET X30
Executing 0x196c354c inst 0xf9400008 LDR X8, [X0]
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    SylverReZ @ SylverReZ: @salazarcosplay, Morning