ROM Hack Question About the main file in exefs folder

zellfy

Member
OP
Newcomer
Joined
Mar 8, 2019
Messages
22
Trophies
0
Age
33
XP
138
Country
China
Is there someone know how to edit the code in main file of exefs folder.
Or some tools to do it.
Please, I need to translate a game to another lanuage, so I have to rewrite the code so that I can set the path to my own font Atlas.
 

masagrator

The patches guy
Developer
Joined
Oct 14, 2018
Messages
6,340
Trophies
3
XP
12,185
Country
Poland
What you need:
> nx2elf & elf2nso for decompressing and compressing main file
https://github.com/shuffle2/nx2elf
https://github.com/switchbrew/switch-tools

In attachment i uploaded compiled binaries for this tools.
Decompress.bat will decompress main to main.elf
Compress.bat will compress main.elf to main.nso - just rename to main
Ignore errors if it will show something - it's still good to edit.

> IDA Pro 7 (not free version) with SwitchIDAProLoader or nxo64.py for deassembling (it's loading original main file, don't try to open with them decompressed main files)
https://github.com/reswitched/loaders/
https://github.com/pgarba/SwitchIDAProLoader

And just wait until app will show "idle" in left lower corner of app (it will play windows jingle). If you do something in IDA when it's deassembling code, it will slow down dramatically.
 

Attachments

  • nx2elf2nso.zip
    160.6 KB · Views: 956
Last edited by masagrator,

zellfy

Member
OP
Newcomer
Joined
Mar 8, 2019
Messages
22
Trophies
0
Age
33
XP
138
Country
China
What you need:
> nx2elf & elf2nso for decompressing and compressing main file
https://github.com/shuffle2/nx2elf
https://github.com/switchbrew/switch-tools

In attachment i uploaded compiled binaries for this tools.
Decompress.bat will decompress main to main.elf
Compress.bat will compress main.elf to main.nso - just rename to main
Ignore errors if it will show something - it's still good to edit.

> IDA Pro 7 (not free version) with SwitchIDAProLoader or nxo64.py for deassembling (it's loading original main file, don't try to open with them decompressed main files)
https://github.com/reswitched/loaders/
https://github.com/pgarba/SwitchIDAProLoader

And just wait until app will show "idle" in left lower corner of app (it will play windows jingle). If you do something in IDA when it's deassembling code, it will slow down dramatically.


upload_2019-3-19_11-2-29.png


It dosen't work bro.
 

Attachments

  • upload_2019-3-19_11-2-29.png
    upload_2019-3-19_11-2-29.png
    71 KB · Views: 276

Colmines92

Member
Newcomer
Joined
Sep 14, 2015
Messages
14
Trophies
0
Age
32
XP
584
Country
Cuba
Which redists are needed to run nx2elf?
I have installed c++ redist 2015-2022 for both x86 and x64 and it still doesn't launch because of missing the following files:
UCRTBASED.DLL
MSVCP140D.DLL
VCRUNTIME140D.DLL

Thanks in advance.
 

morarin

Well-Known Member
Newcomer
Joined
Jul 6, 2022
Messages
70
Trophies
0
XP
353
Country
Japan
What you need:
> nx2elf & elf2nso for decompressing and compressing main file
https://github.com/shuffle2/nx2elf
https://github.com/switchbrew/switch-tools

In attachment i uploaded compiled binaries for this tools.
Decompress.bat will decompress main to main.elf
Compress.bat will compress main.elf to main.nso - just rename to main
Ignore errors if it will show something - it's still good to edit.

> IDA Pro 7 (not free version) with SwitchIDAProLoader or nxo64.py for deassembling (it's loading original main file, don't try to open with them decompressed main files)
https://github.com/reswitched/loaders/
https://github.com/pgarba/SwitchIDAProLoader

And just wait until app will show "idle" in left lower corner of app (it will play windows jingle). If you do something in IDA when it's deassembling code, it will slow down dramatically.
I`m lost, what should I do?
Screenshot 2023-12-06 092757.png

Post automatically merged:

I used Il2CppDumper GUI 2.1.0 with main(.nso) and global-metadata.dat and got these files
Can I continue with main(.nso)?
Screenshot 2023-12-06 093512.png
 
Last edited by morarin,

morarin

Well-Known Member
Newcomer
Joined
Jul 6, 2022
Messages
70
Trophies
0
XP
353
Country
Japan
This "advise" is outdated as f.
For IDA use this, read readme

https://github.com/TSRBerry/nxo64

Then when loading original main it should detect by default that it's compatible with nxo64, don't change architecture
thank you so much :)
Post automatically merged:

I`ve never installed requirements.txt and got a few error messages and managed to solve ... done?

Screenshot 2023-12-06 171018.png


for someone like me
with command prompt
①pip install --upgrade pip
②install this https://aka.ms/vs/17/release/vs_BuildTools.exe

Post automatically merged:

This "advise" is outdated as f.
For IDA use this, read readme

https://github.com/TSRBerry/nxo64

Then when loading original main it should detect by default that it's compatible with nxo64, don't change architecture
after installing nxo64, I tried to open a plain main file and got this error message :(
what`s going on?
Screenshot 2023-12-07 130440.png
 
Last edited by morarin,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • DinohScene @ DinohScene:
    I've tried prime once
  • DinohScene @ DinohScene:
    I've had better tasting battery acid
    +1
  • A @ ATEMVEGETA:
    has anyone tried to move Pokemon save files from emulator to console?
  • DinohScene @ DinohScene:
    no, open up a thread in the forums for it
  • BigOnYa @ BigOnYa:
    He already asked earlier
  • A @ ATEMVEGETA:
    I am trying to find someone with knowledge on that willing to help me
  • BigOnYa @ BigOnYa:
    I and Hayato warned him not to, but he won't listen
  • A @ ATEMVEGETA:
    @BigOnYa,
    I don't listen? What didn't I listen at? I just want to know all the possible risks on that part
  • A @ ATEMVEGETA:
    Hayato even said it's dangerous to backup the save files to CFW
  • A @ ATEMVEGETA:
    how is this dangerous? A ton of people did this it's the most common thing to do with CFW
  • BigOnYa @ BigOnYa:
    Then do it
  • A @ ATEMVEGETA:
    dude, whatever
  • BigOnYa @ BigOnYa:
    Not trying to hate, I tried to help you in the switch noob thread by asking for you, but you don't want to accept the answers you got, so do whatever then.
  • K3Nv2 @ K3Nv2:
    Is that bigonya squeezing bulmas tiddies
    +1
  • A @ ATEMVEGETA:
    @BigOnYa, Man, first of all thanks for your willing to help, much appreciated. But, it's not that I "don't want to listen", rather than I need soemone to EXPLAIN to me how and why all these are risky.
  • K3Nv2 @ K3Nv2:
    Putting your dick in certain areas is always a risk
    +1
  • A @ ATEMVEGETA:
    For example, HOW is is risky to get banned if you extract the save files to the CFW?
  • A @ ATEMVEGETA:
    isn't this proccess be done while you're offline?
  • BigOnYa @ BigOnYa:
    We are not Nintendo, so we don't know exactly how/why/when they ban, but better to stay on the safe side and not do shady stuff, if you don't want to be banned. Hayato is one of the most knowledgeable ones here on the subject and I believe what he says.
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    300 bucks hmmm lol
  • A @ ATEMVEGETA:
    @BigOnYa, Yes ofc we don't know how Nintendo bans work, but if there are situations where a lot of people have tried safely then we can at least assume that this path is pretty much safe. To say don't try anything homebrew relative just to be safe forever is the easiest thing to say to someone. What I am trying to figure out here is with which cases and what actions got most of the people their bans for.
  • A @ ATEMVEGETA:
    Most things I can find resulting to a ban is save-editing reasons, like Pokehex, etc, and going online afterwards.
    A @ ATEMVEGETA: Most things I can find resulting to a ban is save-editing reasons, like Pokehex, etc, and going...