ROM Hack [Release] 3DS_CTR_Decryptor-VOiD

kyogre123

Mexican Pride
Member
Joined
Sep 23, 2013
Messages
2,920
Trophies
0
Age
34
XP
1,347
Country
Mexico
This works with any game, and the romfs can be any size. Here's an example: Mario Kart 7. I replaced DK's model with Metal Mario's (Who I haven't unlocked yet). I also created a backup folder in the character models directory to store DK's real models for later. That also got packed into the romfs, but it isn't being used for anything.

kW0YKn4.jpg

OH MY GOD! Please tell me how to repack the romfs into a rom. Share the rsf with us, please.
 

kyogre123

Mexican Pride
Member
Joined
Sep 23, 2013
Messages
2,920
Trophies
0
Age
34
XP
1,347
Country
Mexico
you have already been told in the group chat thing....its easy peasy
this made me laugh though, i only wrote hello to test editing the text and it kinda finished it off for me
IMG_20141030_205349.jpg

That thing about copying data from the exheader of the game sounds a bit confusing to me, so I want to go to the secured path. Even when rebuilding VC GBC with Makerom was supposedly eeasy, I got a hard time getting them to work and I don't even remember what I did later to fix it.
 

piratesephiroth

I wish I could read
Member
Joined
Sep 5, 2013
Messages
3,453
Trophies
2
Age
103
XP
3,233
Country
Brazil
That thing about copying data from the exheader of the game sounds a bit confusing to me, so I want to go to the secured path. Even when rebuilding VC GBC with Makerom was supposedly eeasy, I got a hard time getting them to work and I don't even remember what I did later to fix it.
We figured out that's not entirely necessary. Makerom can't set everyting up just by using the RSF file, so it relies on built-in setting templates.
You need to use the '-desc <apptype>:<fw> ' switch for setting up everything correctly. It will invoke one of the internal setting templates to be added into the exheader. Apptype can be 'app' or 'ecapp', and 'fw' goes from 1 to 8. Ecapp is an application that uses additional services.
NSMB2 is one of these cases, and we can use '-desc ecapp:3' to rebuild it.

These templates need to be signed too, so they require the '-target g' switch, to use Gateway's keys and certificates. (requires applestash's 'vandalized' revision)

Building is an easy task now. The only detail left for figuring out in the commandline is the logo, which is also easy do determine.
First extract the exefs's contents. If there's a logo inside, '-exefslogo' is necessary.
If there's no logo there, try to extract it from the rom. If there's a valid file, then you need to add it with '-logo logo.bin' for example.
But f the logo is just an empty file, then just leave it set to 'Nintendo' in the RSF file and add nothing to the command line.

This is a proper RSF for New Super Mario Bros2 USA, for example:
Code:
BasicInfo:
  Title                   : "BIGRED" #    'Name' from the exheader
  CompanyCode             : "01" #        'Company Code' from 3DSExplorer
  ProductCode             : "CTR-P-ABEE"  'Product code from 3DSExplorer
  ContentType             : Application # Application / SystemUpdate / Manual / Child / Trial
  Logo                    : Nintendo # Nintendo / Licensed / Distributed / iQue / iQueForSystem
 
#RomFs:
  # Specifies the root path of the file system to include in the ROM. It's also broken.
  #HostRoot               : "rom"
 
TitleInfo:
  UniqueId                : 0x07AE # final digits from 'Program id' except the last 2 zeros
  Category                : Application
 
CardInfo:
  MediaSize               : 512MB # 128MB / 256MB / 512MB / 1GB / 2GB / 4GB
  MediaType               : Card1 # Card1 / Card2
  CardDevice              : NorFlash # NorFlash(for Card1 with savedata) / None (for Card2)
 
Option:
  UseOnSD                 : false # true if App is to be installed to SD
  FreeProductCode         : true # Removes limitations on ProductCode
  MediaFootPadding        : false # If true CCI files are created with padding
  EnableCrypt             : true # Enables encryption for NCCH and CIA
  EnableCompress          : true # Compresses exefs code
 
ExeFs: # these are the program segments from the ELF, check your elf for the appropriate segment names
  ReadOnly:
  - .rodata
  - RO
  ReadWrite:
  - .data
  - RO
  Text:
  - .init
  - .text
  - STUP_ENTRY
 
PlainRegion: # only used with SDK ELFs
- .module_id
 
SystemControlInfo:
  SaveDataSize            : 128K # either K, M or KB, MB
  RemasterVersion         : 0
  StackSize               : 0x4000 # 'Code stack size' from the exheader
 
AccessControlInfo:
  ExtSaveDataId: 0x000007ae
  #SystemSaveDataId1: 0x00000000
  #SystemSaveDataId2: 0x00000000
  #OtherUserSaveDataId1: 0x00000
  #OtherUserSaveDataId2: 0x00000
  #OtherUserSaveDataId3: 0x00000
  #UseOtherVariationSaveData : true
  #UseExtendedSaveDataAccessControl: true
  #AccessibleSaveDataIds: [0x101, 0x202, 0x303, 0x404, 0x505, 0x606]
  FileSystemAccess:
  #- Boss
  #- CardBoard
  #- CategoryFileSystemTool
  #- CategoryHardwareCheck
  #- CategoryHomeMenu
  #- CategorySystemApplication
  #- CategorySystemSettings
  #- Core
  #- CtrNandRo
  #- CtrNandRoWrite
  #- CtrNandRw
  #- Debug
  #- DirectSdmc
  #- DirectSdmcWrite
  #- ExportImportIvs
  #- SaveDataMove
  #- Shell
  #- Shop
  #- SwitchCleanup
  #- TwlCardBackup
  #- TwlNandData

And it can be rebuilt using this command line
Code:
..\makerom -f cci -target g -desc ecapp:3 -rsf NSMB.rsf -romfs xored_romfs.bin -exheader xored_exh.bin -code exefs/code.bin -icon exefs/icon.bin -banner exefs/banner.bin -alignwr -o NSMB.3DS
 

Huntereb

Well-Known Member
Member
Joined
Sep 1, 2013
Messages
3,234
Trophies
0
Website
lewd.pics
XP
2,446
Country
United States
Building is an easy task now. The only detail left for figuring out in the commandline is the logo, which is also easy do determine.
First extract the exefs's contents. If there's a logo inside, '-exefslogo' is necessary.
If there's no logo there, try to extract it from the rom. If there's a valid file, then you need to add it with '-logo logo.bin' for example.
But f the logo is just an empty file, then just leave it set to 'Nintendo' in the RSF file and add nothing to the command line.


Yeah, I figured that out with a few other games. Is it possible that the logo is only needed for card2 type games?
 

Reisyukaku

Onii-sama~
Developer
Joined
Feb 11, 2014
Messages
1,534
Trophies
2
Website
reisyukaku.org
XP
5,422
Country
United States
Crazy hair bug :0
(ill fix it tomorrow)

PdQLOy6.jpg



Very nice! Just a model swap, I presume? :yay:

I was about to try editing that one, but didn't get to it. I ended up decrypting Smash Brothers, but to my disappointment, all the data is stored in this huge single file that I have no idea how to access. Oh well...
pretty much
 
  • Like
Reactions: gamesquest1

KazoWAR

Well-Known Member
Member
Joined
Aug 12, 2008
Messages
1,952
Trophies
1
Age
35
Location
Winter Haven
XP
2,125
Country
United States
I don't understand why no one here is getting creative... We've got the tools to do incredible things!


nice I really want to work on a Rom hack for XY but i dont have the tools to do so(4.5 3ds and gateway). something simple like all 721 Pokemon in the wild, harder trainers, removal of trade evolutions, and ORAS Megas.
 

einstein95

Well-Known Member
Member
Joined
Aug 31, 2013
Messages
230
Trophies
0
Age
29
XP
312
Country
New Zealand
Very nice! Just a model swap, I presume? :yay:

I was about to try editing that one, but didn't get to it. I ended up decrypting Smash Brothers, but to my disappointment, all the data is stored in this huge single file that I have no idea how to access. Oh well...

https://github.com/comex/smash-stuff
Use dtls.py to extract files.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    BakerMan @ BakerMan: @salazarcosplay yeah cod's still up