Any good tutorial for ExeFS editing?

fvig2001

Well-Known Member
OP
Member
Joined
Aug 21, 2006
Messages
951
Trophies
1
XP
3,059
Country
Philippines
Hi

I am trying to edit the ExeFS of a game to fix an issue. I looked at:

https://luminescent.team/rom-hacking/exefs/guide

I know what function to change/fix. However, the problem is the guide uses a Pokemon specific tool to make the patch.

Can anyone guide me to make the edited ExeFS main? Like I've already edited it in Ghidra but the output file is like 3x the size and it's not an ELF (can't be compressed back to NS format).

Thank you.
 

masagrator

The patches guy
Developer
Joined
Oct 14, 2018
Messages
6,407
Trophies
3
XP
12,307
Country
Poland
Ghidra is not for editing the end file. It's for understanding the file. Dunno what you outputted with it, but it's definitely not something you can convert back to working executable.

Usual way is to create IPS patch from those changes. I am doing this all manually and most people can't comprehend it this way, so I guess you should:
- decompress main with hactool,
- make a copy of uncompressed one,
- edit one of them with Hex editor
- and use a tool that makes IPS patches by comparing those two, and as a name for IPS file use 32 bytes from main file at offset 0x40, with no spaces.

Dunno what is the best tool to do that. Remember that standard IPS patch has limit of executable 16 MB, you should seek the one supporting IPS32 format if uncompressed main is bigger than that.

Difference between what you see in Ghidra and uncompressed main offsets is that you should take lowest 8 digits of address, add 0x100 and this is your offset in hex editor
 
Last edited by masagrator,
  • Like
Reactions: fvig2001

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    The Real Jdbye @ The Real Jdbye: :tpi: