ROM Hack [Question] Modifying Exefs

thane98

Well-Known Member
OP
Member
Joined
Apr 23, 2016
Messages
617
Trophies
0
XP
1,339
Country
United States
I'm aware of the processes for creating and running modifications to a game's romfs, but I haven't done anything with the exefs. I haven't been able to find answers to some questions I have about modifying it, so I thought that I'd go ahead and ask here.

Is is possible to run exefs modifications through an NTR plugin? I know that HANS offers a method for running code.bin changes, but I'd like to avoid dealing with HANS if possible. If nothing can be done using NTR, is there an alternative for running exefs (or at the least, code.bin) changes?

I also have some questions about the file structure of the code.bin in exefs if anyone has experience working with that kind of file. Obviously, code will vary greatly from game to game, but I'm wondering if there's any sort of defined structure to the compiled code. Knowing about that before trying to make changes could save a lot of headaches. Also, if I wanted to add bytes to the file, what steps would I need to take in order to have the code still load correctly? Do I need to make changes elsewhere if I expand the file size?

Apologies for all of the questions. Any information on making edits to an exefs would be very helpful.
 

Ningyoplug

Well-Known Member
Member
Joined
Mar 10, 2016
Messages
257
Trophies
0
Age
28
Location
Gayland
Website
ningyo.tumblr.com
XP
352
Country
Italy
Seconding all your questions. I'd like to know more (especially about the code.bin structure) as well, but no one ever seems to talk about it...
It would be nice if someone could shed some light on the exefs.

PS: I'd like to add one more question: does anyone know where the info on S supports being locked to 1 person only is situated in the code.bin? It would help me greatly.
 

thane98

Well-Known Member
OP
Member
Joined
Apr 23, 2016
Messages
617
Trophies
0
XP
1,339
Country
United States
SaltySD just uses Luma3DS's code override. Just modify the code.bin and stick it at /luma/code_sections/<TID>.bin. I usually end up testing by shipping all my patches as a bunch of w32s over RPC anyhow though.
Thank you, that sounds like exactly what I was looking for. I didn't know that Luma offered that sort of functionality. Do you know if that method allows for expanded code.bin files? That'd be my only other concern.
 

shinyquagsire23

SALT/Sm4sh Leak Guy
Member
Joined
Nov 18, 2012
Messages
1,970
Trophies
0
Age
24
Location
Las Vegas
XP
3,638
Country
United States
Thank you, that sounds like exactly what I was looking for. I didn't know that Luma offered that sort of functionality. Do you know if that method allows for expanded code.bin files? That'd be my only other concern.
Don't think so, but I also don't think that would work anyhow since code.bin is the .text, .rodata and .data lumped into one blob, and that's how they are in memory. Best bet is finding unused code tbh. Sm4sh has an entire libpng library imported which is never used.
 

thane98

Well-Known Member
OP
Member
Joined
Apr 23, 2016
Messages
617
Trophies
0
XP
1,339
Country
United States
Don't think so, but I also don't think that would work anyhow since code.bin is the .text, .rodata and .data lumped into one blob, and that's how they are in memory. Best bet is finding unused code tbh. Sm4sh has an entire libpng library imported which is never used.
Yeah, that might be a better option - I guess that I might as well jump in and see what can be done. Thank you for your help!
 

thane98

Well-Known Member
OP
Member
Joined
Apr 23, 2016
Messages
617
Trophies
0
XP
1,339
Country
United States
SaltySD just uses Luma3DS's code override. Just modify the code.bin and stick it at /luma/code_sections/<TID>.bin.
Sorry to bug you again - I'm having some trouble getting my modified code.bin to load. I took a decompressed code.bin, modified it, renamed it to use the Fates Special Edition TID (0004000000179800), and left it on my SD card using the path sd:/luma/code_sections/0004000000179800.bin. However, I'm noticing no changes in game - it looks like Luma's not loading the modified code at all. I went ahead and updated luma to the latest hourly build to make sure that wasn't the issue, though that didn't fix things. Is there some step that I'm missing here?
 

shinyquagsire23

SALT/Sm4sh Leak Guy
Member
Joined
Nov 18, 2012
Messages
1,970
Trophies
0
Age
24
Location
Las Vegas
XP
3,638
Country
United States
Sorry to bug you again - I'm having some trouble getting my modified code.bin to load. I took a decompressed code.bin, modified it, renamed it to use the Fates Special Edition TID (0004000000179800), and left it on my SD card using the path sd:/luma/code_sections/0004000000179800.bin. However, I'm noticing no changes in game - it looks like Luma's not loading the modified code at all. I went ahead and updated luma to the latest hourly build to make sure that wasn't the issue, though that didn't fix things. Is there some step that I'm missing here?
It could possibly be using the update TID, if there's a game update installed.

EDIT: Actually it doesn't seem that's the case, not sure what it could be then.
 
Last edited by shinyquagsire23,

You may also like...

General chit-chat
Help Users
  • M4x1mumReZ @ M4x1mumReZ:
    @ZeroT21, It's best to be together for many years until you finally make the decision.
    +1
  • K3N1 @ K3N1:
    Most that stay together just do it for their kids
    +1
  • K3N1 @ K3N1:
    I have had ex's that made everything to be my fault though and end up breaking up with other boyfriends
    +1
  • ZeroT21 @ ZeroT21:
    @M4x1mumReZ Beats the purpose of getting married then, if it was that easy
    +1
  • M4x1mumReZ @ M4x1mumReZ:
    Kids are a bitch to take care of. You got to feed them, look after them, pay for child support, education, health care, etc.
  • K3N1 @ K3N1:
    Nah they don't want to cause emotional damage to their kids mind so they try to hide it from them
    +1
  • M4x1mumReZ @ M4x1mumReZ:
    There's that too.
  • ZeroT21 @ ZeroT21:
    Just my personal thoughts, no offense, I think kids can be cute and fun sometimes if they behave, but can be absolute devils worse than criminals
    +1
  • K3N1 @ K3N1:
    Point is just try to know you can take care of yourself first
    +1
  • ZeroT21 @ ZeroT21:
    I just feel I need riot gear to deal with kids
    +1
  • K3N1 @ K3N1:
    It's the norm for most adults to have kids in their 30s or 40s so still a lot of thinking time
    +1
  • ZeroT21 @ ZeroT21:
    Guess the most helpfull tool to keep kids away is a console, tablet... or ducktape

    :glare:
    +1
  • M4x1mumReZ @ M4x1mumReZ:
    Give them an iPad with YT Kids
  • K3N1 @ K3N1:
    I got permission from two different dad's to put them in the dumpster if they get on my nerves
    +2
  • M4x1mumReZ @ M4x1mumReZ:
    Whenever I go on a train, visit a restaurant, or enter a shop, there maybe a chance that there is some kid in their pram holding an iPad infront of their face watching Cocomelon.
  • ZeroT21 @ ZeroT21:
    And there goes the ''Dad of the Year'' award
    +1
  • K3N1 @ K3N1:
    Nah that's what gets them the award
    +1
  • M4x1mumReZ @ M4x1mumReZ:
    These iPads deserve to be trashed.
  • ZeroT21 @ ZeroT21:
    Maybe only old senoirs would have loved to hear noisy kids
    +1
  • ZeroT21 @ ZeroT21:
    But then again, I see kids as a health hazza

    rd
    +1
  • M4x1mumReZ @ M4x1mumReZ:
    Their ears would have troubles hearing their loud screeches that they can sleep in peace.
    +1
  • M4x1mumReZ @ M4x1mumReZ:
    @ZeroT21, They lack any common sense because their brain hasn't been fully developed.
  • K3N1 @ K3N1:
    If old people learned how to use tablets more we might get them off the road :tpi:
    +1
  • M4x1mumReZ @ M4x1mumReZ:
    Anyways, I'm off for tonight. See you all later.
    +1
    M4x1mumReZ @ M4x1mumReZ: Anyways, I'm off for tonight. See you all later. +1