ROM Hack [Release] ExInjector - Inject original exheaders into repacked roms

  • Thread starter Thread starter piratesephiroth
  • Start date Start date
  • Views Views 123,883
  • Replies Replies 343
  • Likes Likes 29
IT WORKED THANK YOU! I can't believe it did................. thank you so much. ^O^
Also I've noticed that everytime I compile, it produces a file with a different hash. Why is that?

For anyone who wants to avoid the troubles I've had, I made an archive with the whole package.

Two ways to use:

1. Drag and drop the .csu file over csu-cia.bat
OR
2. Rightclick .csu file - open with - browse to csu-cia.bat

A notepad is opened where you can change the unique id(give every app a different ID and Name), save then close it, it will continue compiling.

It will create a .cia with the same name in the same folder as the file you are converting.

i think your archive is corrupted, i can't extrat files
thanks
 
I noticed that the
Code:
makerom -target t -ccitocia MARIOTEST.cci -o MARIOTEST.cia
command crashes for the 1GB+ roms
if you want to fix it do instead :
Code:
mkdir temp
rom_tool -x temp %dsfile%.cci
cd temp
ren *APPDATA.cxi appdata.cxi
cd ..
makerom -f cia -o romname.cia -content temp/appdata.cxi:0:0
rmdir /s /q temp

(It's a little more complicated if you want to add the game manual)

Tested with Fantasy Life. Works fine. :)
 
I noticed that the
Code:
makerom -target t -ccitocia MARIOTEST.cci -o MARIOTEST.cia
command crashes for the 1GB+ roms
if you want to fix it do instead :
Code:
mkdir temp
rom_tool -x temp %dsfile%.cci
cd temp
ren *APPDATA.cxi appdata.cxi
cd ..
makerom -f cia -o romname.cia -content temp/appdata.cxi:0:0
rmdir /s /q temp

(It's a little more complicated if you want to add the game manual)

Tested with Fantasy Life. Works fine. :)
Ah didn't know that simpler command failed for big roms. I'll change it on the first post.
 
makerom -f cia -o %GameName%.cia -content appdata.cxi:0:0 -content manual.cfa:1:1

should work or?
 
makerom -f cia -o %GameName%.cia -content appdata.cxi:0:0 -content manual.cfa:1:1

should work or?

Yes, but only if you put the "-content manual.cfa:1:1" in the first command to, so in short

Code:
mkdir manual
rom_tool -x manual originalrom.3ds
cd manual
If exist *MANUAL.cfa ren *MANUAL.cfa manual.cfa
cd ..
If exist "manual\manual.cfa" makerom -f cci -target t -desc app:4 -content manual/manual.ca=fa:1:1 -rsf RSF.rsf -romfs xored_romfs.bin -exheader xored_exh.bin -code exefs/code.bin -icon exefs/icon.bin -banner exefs/banner.bin -alignwr -o rebuildrom.cci
If not exist "manual\manual.cfa"  makerom -f cci -target t -desc app:4 -rsf RSF.rsf -romfs xored_romfs.bin -exheader xored_exh.bin -code exefs/code.bin -icon exefs/icon.bin -banner exefs/banner.bin -alignwr -o rebuildrom.cci
exinjector -rom rebuildrom.cci -exheader xored_exh.bin -sd
mkdir temp
rom_tool -x temp rebuildrom.cci
cd temp
ren *APPDATA.cxi appdata.cxi
If exist *MANUAL.cfa ren *MANUAL.cfa manual.cfa
cd ..
makerom -f cia -o romname.cia -content temp/appdata.cxi:0:0
If exist "temp\manual.cfa" makerom -f cia -o finalcia.cia -content temp/appdata.cxi:0:0 -content temp/manual.cfa:1:1
If not exist "temp\manual.cfa" makerom -f cia -o finalcia.cia -content temp/appdata.cxi:0:0
rmdir /s /q temp
rmdir /s /q manual

(Adapt this to your own files of course)
 
Yes, but only if you put the "-content manual.cfa:1:1" in the first command to, so in short

Code:
mkdir manual
rom_tool -x manual originalrom.3ds
cd manual
If exist *MANUAL.cfa ren *MANUAL.cfa manual.cfa
cd ..
If exist "manual\manual.cfa" makerom -f cci -target t -desc app:4 -content manual/manual.ca=fa:1:1 -rsf RSF.rsf -romfs xored_romfs.bin -exheader xored_exh.bin -code exefs/code.bin -icon exefs/icon.bin -banner exefs/banner.bin -alignwr -o rebuildrom.cci
If not exist "manual\manual.cfa"  makerom -f cci -target t -desc app:4 -rsf RSF.rsf -romfs xored_romfs.bin -exheader xored_exh.bin -code exefs/code.bin -icon exefs/icon.bin -banner exefs/banner.bin -alignwr -o rebuildrom.cci
exinjector -rom rebuildrom.cci -exheader xored_exh.bin -sd
mkdir temp
rom_tool -x temp rebuildrom.cci
cd temp
ren *APPDATA.cxi appdata.cxi
If exist *MANUAL.cfa ren *MANUAL.cfa manual.cfa
cd ..
makerom -f cia -o romname.cia -content temp/appdata.cxi:0:0
If exist "temp\manual.cfa" makerom -f cia -o finalcia.cia -content temp/appdata.cxi:0:0 -content temp/manual.cfa:1:1
If not exist "temp\manual.cfa" makerom -f cia -o finalcia.cia -content temp/appdata.cxi:0:0
rmdir /s /q temp
rmdir /s /q manual

(Adapt this to your own files of course)
Is this a general script that can convert any 3ds game ROM(originalrom.3ds) into an installable .cia?
 
I tried TOMODOCHI EUR with this rsf


BasicInfo:
Title : "Tomodachi Life"
CompanyCode : "01"
ProductCode : "CTR-P-EC6P"
ContentType : Application # Application / SystemUpdate / Manual / Child / Trial
Logo : Nintendo # Nintendo / Licensed / Distributed / iQue / iQueForSystem

TitleInfo:
UniqueId : 0x008c4
Category : Application

Option:
UseOnSD : true # true if App is to be #installed to SD
EnableCompress : true # Compresses exefs code
FreeProductCode : true # Removes limitations on ProductCode
EnableCrypt : false # Enables encryption for NCCH and CIA
MediaFootPadding : true # If true CCI files are created with padding

AccessControlInfo:
UseExtSaveData : true
ExtSaveDataId : 0x008c4 # same as UniqueId
SystemSaveDataId1 : 0x00000000 # plaintext exheader
SystemSaveDataId2 : 0x00000000 # plaintext exheader
OtherUserSaveDataId1 : 0x0126b # plaintext exheader
OtherUserSaveDataId2 : 0x0126b # plaintext exheader
OtherUserSaveDataId3 : 0x00000 # plaintext exheader
UseOtherVariationSaveData : false

SystemControlInfo:
SaveDataSize : 4M # plaintext exheader
RemasterVersion : 0 # plaintext exheader
StackSize : 0x00040000 # plaintext exheader
JumpId : 0x000400000008c400L # plaintext exheader (<full UniqueID>L)

CardInfo:
MediaSize : 512MB # 128MB / 256MB / 512MB / 1GB / 2GB / 4GB #edit
MediaType : CARD2 # Card1 / Card2
CardDevice : None # NorFlash(Pick this if you use savedata) / None (Choose None if it's a card2 game)

and these commands:
tools\makerom.exe -f cci -target t -desc ecapp:3 -rsf files\rsf.rsf -romfs decrypted\romfs.bin -exheader decrypted\exheader.bin -code decrypted\exefs\code.bin -icon decrypted\exefs\icon.bin -banner decrypted\exefs\banner.bin -alignwr -o game.3ds

tools\exinjector.exe -sd -rom game.3ds -exheader decrypted\exheader.bin

tools\rom_tool.exe -x decrypted game.3ds

tools\makerom.exe -f cia -o game.cia -content decrypted\appdata.cxi:0:0
and i get an error message on boot (no 3ds logo) : remove sd card.

But if i build the cia with the old method , 3ds logo appears but it doesnt boot.
What did i make wrong ?
 
OK, updated again. Now please use makerom to generate NCCH files (cxi) becuase cci to cia conversion doesn't work with big roms.
Look at the posted bat example for tips.
 
Thx to everyone who helped to create this.

Here is my complete batch:
http://gbatemp.net/threads/release-...into-repacked-roms.373839/page-5#post-5152864

All you need is to do:

Fill slot0x25KeyX.bin with the key (not included)
Get your xorpads (you know how to do this)

Put your xorpads and .3ds into 3ds_to_cia directory,
drag n drop the 3ds @ make.bat and wait until cia is ready.

(no need to edit rsf)

To clean up, you can use clean.bat (it doesn't delete .3ds & .cia)
 
Thx to everyone who helped to create this.

Here is my complete batch:
http://www48.zippyshare.com/v/61419651/file.html

All you need is to do:

Fill slot0x25KeyX.bin with the key (not included)
Get your xorpads (you know how to do this)

Put your xorpads and .3ds into 3ds_to_cia directory,
drag n drop the 3ds @ make.bat and wait until cia is ready.

(no need to edit rsf)

To clean up, you can use clean.bat (it doesn't delete .3ds & .cia)
Nice job, does this include manual? also would it be possible to edit the icon file for region free?
 
Thx to everyone who helped to create this.

Here is my complete batch:
http://www48.zippyshare.com/v/61419651/file.html

All you need is to do:

Fill slot0x25KeyX.bin with the key (not included)
Get your xorpads (you know how to do this)

Put your xorpads and .3ds into 3ds_to_cia directory,
drag n drop the 3ds @ make.bat and wait until cia is ready.

(no need to edit rsf)

To clean up, you can use clean.bat (it doesn't delete .3ds & .cia)

You padxorer seems to be the original version that doesn't work with files bigger than 2GB.
Also your CTRtool is compiled for x64.

Here are the 2 files, fixed (I think) padxorer and x86 ctrtool.
 

Attachments

  • Like
Reactions: Margen67
I don't see use in edit icon becuz gw plays all regions, but you could add a single "pause" after extracting it for editing purpose.

Thx piratesephiroth
 
  • Like
Reactions: tjexp

Site & Scene News

Popular threads in this forum