ROM Hack Question Saving edits to an exefs file

Amethyst-szs

New Member
OP
Newbie
Joined
Jul 7, 2020
Messages
2
Trophies
0
Age
24
XP
46
Country
United States
Hey! I've been doing some work in Ghidra & Ghidra Switch Loader in order to modify a game's exefs file. I've gotten to the point that I have an uncompressed exefs file that I can get the assembly and C code. However, Ghidra Switch Loader doesn't have the ability to export as an exefs main file. I'm able to get a binary but that's something completely different and not very helpful. I've been working on this for ages and it would be really helpful if anybody could help me out. Even if you have a super tedious method, it's better then nothing at all for me.

The image shows my original main file, the decompressed main file, and the not working binary bin file that Ghidra gives me.
Capture.PNG
 

hippy dave

BBMB
Member
Joined
Apr 30, 2012
Messages
9,890
Trophies
2
XP
29,446
Country
United Kingdom
I haven't used ghidra and don't know if there are any more direct methods. If you know what changes you're making to the code in terms of assembly instructions, you can translate them to hex numbers either manually or with some tool, and change the relevant bytes in a copy of the uncompressed main file. Then you can make an IPS patch of the changes, or use the modified main via layeredfs.
 

Amethyst-szs

New Member
OP
Newbie
Joined
Jul 7, 2020
Messages
2
Trophies
0
Age
24
XP
46
Country
United States
I haven't used ghidra and don't know if there are any more direct methods. If you know what changes you're making to the code in terms of assembly instructions, you can translate them to hex numbers either manually or with some tool, and change the relevant bytes in a copy of the uncompressed main file. Then you can make an IPS patch of the changes, or use the modified main via layeredfs.
.
That sounds like it would work. I'm not sure how to find the bytes in a hex editor though. Ghidra has the bytes for an assembly instruction on the side. If you take these into a hex editor, it doesn't find them.
Capture.PNG
Capture2.PNG
 

switcherjoe

Well-Known Member
Newcomer
Joined
Nov 29, 2021
Messages
50
Trophies
0
Age
54
XP
278
Country
Armenia
Hey! I've been doing some work in Ghidra & Ghidra Switch Loader in order to modify a game's exefs file. I've gotten to the point that I have an uncompressed exefs file that I can get the assembly and C code. However, Ghidra Switch Loader doesn't have the ability to export as an exefs main file. I'm able to get a binary but that's something completely different and not very helpful. I've been working on this for ages and it would be really helpful if anybody could help me out. Even if you have a super tedious method, it's better then nothing at all for me.

The image shows my original main file, the decompressed main file, and the not working binary bin file that Ghidra gives me.
View attachment 216481
1) uncompress main with the nx2elf.exe
2) load main.elf in Ghidra
3) patch the main.elf within Ghidra
4) compress the modified main.elf with elf2nso.exe
5) use IPS patches or layered FS

It's far easier though to use EdiZon-SE instead of IPS/layered FS patching, so instead of steps 3-5 you can just use the offset and the ASM code changes as a cheat.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • AncientBoi @ AncientBoi:
    eeewww
  • K3Nv2 @ K3Nv2:
    I thought it was the toilet
  • AncientBoi @ AncientBoi:
    okies. Time to go watch YT paranormal ghost things. L8er my luvs :D
    +1
  • K3Nv2 @ K3Nv2:
    I got a massive clue
  • BakerMan @ BakerMan:
    this mf def ain't watching ghost shit, he boutta beat his meat fr
    +1
  • K3Nv2 @ K3Nv2:
    Nah he's about to be the ghost in your bedroom
    +1
  • Xdqwerty @ Xdqwerty:
    @K3Nv2, and leave ectoplasm all over the place
  • BakerMan @ BakerMan:

    this is him being described
    +2
  • Xdqwerty @ Xdqwerty:
    Sigh
  • Xdqwerty @ Xdqwerty:
    Yawn
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, I dislike the kind of drm where you have to play single player games online all the time bc of some verification bs
    +1
  • SylverReZ @ SylverReZ:
    @Xdqwerty, Don't use games that have Easy Anti-Cheat as its been exploited many times.
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, my PC can't run most AAA games so i wont
    +1
  • Xdqwerty @ Xdqwerty:
    Most of the modern AAA games
    +1
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, I also heard one of the Prince of Persia games was so unfinished that it required the "24/7 online" drm so a puzzle could be done and the game could be finished. And that when the Ubisoft servers were closed the (cracked) game was impossible to finish or something like that
  • SylverReZ @ SylverReZ:
    @Xdqwerty, That's extra scummy. Ubisoft nowadays ship out incomplete games like Skull and Bones which was being worked on for nearly a decade now.
    +1
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, i think they have been doing that since late 2000s
    +1
  • Xdqwerty @ Xdqwerty:
    Either that or their old games were unfinished aswell but we can't notice it
  • Psionic Roshambo @ Psionic Roshambo:
    I like that games can be fixed after the fact, hate that it's being abused via beta tests... And DLC... I was a 7800 owner back in the day and loved Impossible Mission, turns out I couldn't beat it because it was actually impossible lol
  • Psionic Roshambo @ Psionic Roshambo:
    I never knew about it at the time but a fixed version was available but you had to mail in your broken copy lol
  • Psionic Roshambo @ Psionic Roshambo:
    So that version is semi rare
  • Xdqwerty @ Xdqwerty:
    @Psionic Roshambo, I have a rom of the ds version of impossible mission
    Xdqwerty @ Xdqwerty: @Psionic Roshambo, I have a rom of the ds version of impossible mission