ROM Hack romfs redirection and disassembly question

  • Thread starter Thread starter Bastani
  • Start date Start date
  • Views Views 2,768
  • Replies Replies 6

Bastani

Well-Known Member
Newcomer
Joined
Mar 13, 2016
Messages
77
Reaction score
62
Trophies
0
Age
30
XP
267
Country
Canada
Is it hard to write code to the code.bin to make it access the romfs from the update instead of the game itself? how do you even begin to mount it?

I've seen different code for games but they already initialized their own update patch directory.
The game itself has a dlc that has a romfs but to just compile all the contents together seems like a real pain.

Also are there any programs there that can convert the code.bin into assembly code or anywhere that I can check to see the assembly functions for the 3DS so I can translate the functions? Maybe then I can figure out how to mount a second romfs.
 
according to 3dbrew:
https://www.3dbrew.org/wiki/Filesystem_services#ArchiveResource:
The raw FS image for the main CXI RomFS(for the current app this is accessible via archiveid 0x3) can be accessed via an all-zero 0xc-byte binary file-lowpath. The update RomFS for the current app can be accessed with the first u32 in the binary file-lowpath being set to 0x5. This allows access to the raw level-3 IVFC image: the user process must handle parsing the filesystem used in this image itself.

As far as making the game mount and utilize it goes, you may have to study the differences between the code.bin from a game and the code.bin from an update to see how to make that work.
 
according to 3dbrew:


As far as making the game mount and utilize it goes, you may have to study the differences between the code.bin from a game and the code.bin from an update to see how to make that work.

Do you think it's possible to take something like layeredfs and make it run from the code.bin and either get it to read from the romfs or the SD itself?
 
Also are there any programs there that can convert the code.bin into assembly code or anywhere that I can check to see the assembly functions for the 3DS so I can translate the functions?
Use the latest version of IDA Pro. Start it up, open code.bin and select ARM (Little-Endian) as the processor type. Then press "edit" on the toolbar and then select all. Then, click on the little thing on the toolbar that says "code" and then "force". It'll take a while, but when its done you'll have some ARM Assembly code that you can copy into a file for safe keeping.
 
  • Like
Reactions: DesuIsSparta

Site & Scene News

Popular threads in this forum