Homebrew yuzu Nintendo Switch emulator discussion

gdkchan

Well-Known Member
Member
Joined
Jul 8, 2015
Messages
181
Trophies
0
Age
26
XP
425
Country
Brazil
I have written my own minimal dynamic linker... So no rtld for me.
But I have found the code of rtld of FreeBSD : https://svnweb.freebsd.org/base/sta...lf/aarch64/reloc.c?view=markup&pathrev=317189

static void
188 reloc_tlsdesc(Obj_Entry *obj, const Elf_Rela *rela, Elf_Addr *where)
189 {
190 if (ELF_R_SYM(rela->r_info) == 0) {
191 where[0] = (Elf_Addr)_rtld_tlsdesc;
192 where[1] = obj->tlsoffset + rela->r_addend;
193 } else {
194 where[0] = (Elf_Addr)_rtld_tlsdesc_dynamic;
195 where[1] = (Elf_Addr)reloc_tlsdesc_alloc(obj, rela);
196 }
197 }
I have a rela->r_info which leads to a symbol with ST_TYPE=6 (that is, a TLS symbol). I have copied the address of the function to my equivalent of where[0]. But I don't know what is exactly where[1]. It seems to be NSO dependant (the obj). From what I have understand, the function generates an unique offset number to the TLS storage. And where[1] is the place for the argument to the function???


Sorry to have said "garbage", but their code really appears to me as a copy/paste from the citra code..., and it also emulates nothing...! I think a lot of people will said "Yeah, it's super, I can play SMO on my PC", and be deceived just after trying to emulate a homebrew...
I have started my project from scratch, and I think it's clearly better to understand everything (I must admit have copied some code from Mephisto, for the system calls).

I don't see why you're trying to do the relocation yourself, also freebsd's rtld won't be of much help since the Switch is different. The rtld if part of the ExeFS so every game contains the rtld code, and the right thing to do is running it and leting it do the relocation/calling nnMain. It also needs to call nnInitializeSdkModule (or something like this) before it calls nnMain, and a bunch of other initialization code. Trying to replicate what rtld does on your emulator is just not worth it.

Anyway, I don't think this thread is the place to talk about those technical details. Why don't you join the yuzu discord channel, we can share knowledge there so everyone benefits, you can also reach me on discord if you want and I can try explaining what rtld does in more detail.
 
  • Like
Reactions: hurrz and DaVince

Edgy_Edge

Well-Known Member
Member
Joined
Apr 2, 2017
Messages
186
Trophies
0
XP
313
Country
Uganda
Great job guys! But I think you should give Nintendo at least a small chance to make money on the console. With this emulator we'll never see Metroid Prime 5, because you'll f@cking kill Nintendo)
 

Edgy_Edge

Well-Known Member
Member
Joined
Apr 2, 2017
Messages
186
Trophies
0
XP
313
Country
Uganda
Let me quote you

"My body is ready. If it lets me play Switch roms."

You're a damn hypocrite
Roms on my Switch yes. Because piracy is inevitable. maybe piracy will boost the sales of Switch. But with emulator it'll totally kill it. Or you that kind of person who anyway buys GBA even if you have mGBA on a smartphone?
 

masaki88

Well-Known Member
Member
Joined
Dec 9, 2014
Messages
292
Trophies
0
Age
35
Location
Bor, Novgorodskaya Oblast',
Website
www.youtube.com
XP
213
Country
Russia
Great job guys! But I think you should give Nintendo at least a small chance to make money on the console. With this emulator we'll never see Metroid Prime 5, because you'll f@cking kill Nintendo)
Calm dawn. No one kill switch or nintendo. Emulator still cannot run games and if its happen i realy don t think its will be playable in this year. People who want to play normaly - buy switch. Realy, better play on release great games than wait year or two for free playing thorough emulator. I buy switch and not dissapointed. Switch great console with great games. In future many great games came out and better buy switch to play it. Emulation is good when you cannot buy console but if you have money but wait for emulator its i think shame. Good games cost good moneys and its fair.
 

ShadowOne333

QVID PRO QVO
Editorial Team
Joined
Jan 17, 2013
Messages
12,227
Trophies
2
XP
34,537
Country
Mexico
Roms on my Switch yes. Because piracy is inevitable. maybe piracy will boost the sales of Switch. But with emulator it'll totally kill it. Or you that kind of person who anyway buys GBA even if you have mGBA on a smartphone?
Well Citra didn't stop Nintendo from putting games in it consistenly, did it?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • Quincy @ Quincy:
    Usually when such a big title leaks the Temp will be the first to report about it (going off of historical reports here, Pokemon SV being the latest one I can recall seeing pop up here)
  • K3Nv2 @ K3Nv2:
    I still like how a freaking mp3 file hacks webos all that security defeated by text yet again
  • BigOnYa @ BigOnYa:
    They have simulators for everything nowdays, cray cray. How about a sim that shows you playing the Switch.
  • K3Nv2 @ K3Nv2:
    That's called yuzu
    +1
  • BigOnYa @ BigOnYa:
    I want a 120hz 4k tv but crazy how more expensive the 120hz over the 60hz are. Or even more crazy is the price of 8k's.
  • K3Nv2 @ K3Nv2:
    No real point since movies are 30fps
  • BigOnYa @ BigOnYa:
    Not a big movie buff, more of a gamer tbh. And Series X is 120hz 8k ready, but yea only 120hz 4k games out right now, but thinking of in the future.
  • K3Nv2 @ K3Nv2:
    Mostly why you never see TV manufacturers going post 60hz
  • BigOnYa @ BigOnYa:
    I only watch tv when i goto bed, it puts me to sleep, and I have a nas drive filled w my fav shows so i can watch them in order, commercial free. I usually watch Married w Children, or South Park
  • K3Nv2 @ K3Nv2:
    Stremio ruined my need for nas
  • BigOnYa @ BigOnYa:
    I stream from Nas to firestick, one on every tv, and use Kodi. I'm happy w it, plays everything. (I pirate/torrent shows/movies on pc, and put on nas)
  • K3Nv2 @ K3Nv2:
    Kodi repost are still pretty popular
  • BigOnYa @ BigOnYa:
    What the hell is Kodi reposts? what do you mean, or "Wut?" -xdqwerty
  • K3Nv2 @ K3Nv2:
    Google them basically web crawlers to movie sites
  • BigOnYa @ BigOnYa:
    oh you mean the 3rd party apps on Kodi, yea i know what you mean, yea there are still a few cool ones, in fact watched the new planet of the apes movie other night w wifey thru one, was good pic surprisingly, not a cam
  • BigOnYa @ BigOnYa:
    Damn, only $2.06 and free shipping. Gotta cost more for them to ship than $2.06
    +1
  • BigOnYa @ BigOnYa:
    I got my Dad a firestick for Xmas and showed him those 3rd party sites on Kodi, he loves it, all he watches anymore. He said he has got 3 letters from AT&T already about pirating, but he says f them, let them shut my internet off (He wants out of his AT&T contract anyways)
  • K3Nv2 @ K3Nv2:
    That's where stremio comes to play never got a letter about it
  • BigOnYa @ BigOnYa:
    I just use a VPN, even give him my login and password so can use it also, and he refuses, he's funny.
  • BigOnYa @ BigOnYa:
    I had to find and get him an old style flip phone even without text, cause thats what he wanted. No text, no internet, only phone calls. Old, old school.
  • Psionic Roshambo @ Psionic Roshambo:
    @BigOnYa, Lol I bought a new USB card reader thing on AliExpress last month for I think like 87 cents. Free shipping from China... It arrived it works and honestly I don't understand how it was so cheap.
    Psionic Roshambo @ Psionic Roshambo: @BigOnYa, Lol I bought a new USB card reader thing on AliExpress last month for I think like 87...