Homebrew yuzu Nintendo Switch emulator discussion

  • Thread starter Thread starter bunnei
  • Start date Start date
  • Views Views 411,025
  • Replies Replies 650
  • Likes Likes 103
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
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)
 
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)
Let me quote you

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

You're a damn hypocrite
 
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?
 
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.
 
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?
 
This great stuff to wake up to couldn't believe it. How long till the first ROM is even playable?
 
It's certainly fast. Curious to see what will come of this. :)

Literally got off my bike once I saw this, sat down on the grass with my jaw dropped. Not even kidding.

I look like an idiot in front of a major Street right now.
Erm...you were reading gbatemp while riding a bike? :unsure:
 
  • Like
Reactions: DaVince

Site & Scene News

Popular threads in this forum