I feel like I should upload my conversion directory, minus the stuff I can't. If nothing else, we'd all be on the same page then.
You know what, here. It's full of bat files, some written by me, some stolen from others. Enjoy.
http://www.mediafire.com/download/c82sc7gdw2e42zv/3DS_to_CIA_Package.rar
---------------------------------------------------------
Instructions
---------------------------------------------------------
Step 1)
Open the "padgen_v3" folder and drop your .3ds file on "ctrKeyGen.py". It will generate an "ncchinfo.bin".
Put this onto your bigSD card, and use your copy of PadGen v3 to create your xorpads.
Step 2)
Open 3DSExplorer, and right-click -> save to each of the main sectors of your backup ROM.3DS.
Save them as the following:
romfs.bin
exheader.bin
exefs.bin
Copy/move these files to "workdir".
Step 3)
Copy your newly generated xorpads from your bigSD card and place them in "workdir".
Rename them to the following:
romfs.xorpad
exheader.xorpad
exefs.xorpad
Step 4)
Run batch files 1, 3, and 4.
Now, in 3DSExplorer, with your ROM.3ds opened, select "PlainRegion" and look to the right ride window.
You'll see something like this:
Where it says [SDK+NINTENDO:Firmware-XX_XX], the "XX_XX" is your clue to the required SDK permissions.
As this one says "02_27", that's Firmware 2, so we can safely assume it uses firmware 2 and lower functions.
The SDK is also shown as SDK 1.2.0.200, so it may even run at Firmware 1, but we'll use 2 to be safe.
This will be needed for editing batch file 5.
Also, while still in 3DSExplorer, look at "NCCH (CTR-P-XXXX) 0". The value shown at "CTR-P-XXXX" is your game's product code. Add that to the cia.rsf in the Product code section.
Step 5)
Open the .rsf file.
It will look like this:
Code:
BasicInfo:
Title : "Cave Story - USA"
CompanyCode : "01"
ProductCode : "CTR-P-ACVE"
ContentType : Application # Application / SystemUpdate / Manual / Child / Trial
Logo : Nintendo # Nintendo / Licensed / Distributed / iQue / iQueForSystem
TitleInfo:
UniqueId : 0x04a1
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:
ExtSaveDataId: 0xb04a1 # same as UniqueId
SystemSaveDataId1: 0x0004a100 # plaintext exheader
SystemSaveDataId2: 0x0004a100 # plaintext exheader
OtherUserSaveDataId1: 0x4a100 # plaintext exheader
OtherUserSaveDataId2: 0x4a100 # plaintext exheader
OtherUserSaveDataId3: 0x4a100 # plaintext exheader
UseOtherVariationSaveData : false
SystemControlInfo:
SaveDataSize: 1M # plaintext exheader
RemasterVersion: 0 # plaintext exheader
StackSize: 0x00040000 # plaintext exheader
JumpId: 0x000400000004a100L # plaintext exheader (<full UniqueID>L)
Now, look inside "workdir" for your exheader.txt.
Open it, and search for the line "Program id: XXXXXXXXXXXXXXXX"
The unique ID is from the 5th last position to the 3rd last position.
If yours says, for example, "Program id: 000400000004a100", which is Cave Story USA, your unique ID would be "4a1".
Simply replace all the entries in the above "cia.rsf" that say "4a1" with your game's unique ID.
Also replace the title and product code information with the ones from your game.
Save and close your cia.rsf file, you're done with it for now.
Step 6)
right-click -> edit the "5-build-cia.bat" file, and look for the part that says "-desc app:2". Edit the "2" to the SDK version hinted at by the earlier check we made. For example, if it's SDK 4, make that say "-desc app:4", which would be used by, for example, LoZ-ALBW.
Save the edited batch file, and then run it. You should be presented with an "Install.cia" file. You can rename that to the name of your game now, and copy it to the root of your SD card.
Step 7)
Install the new "Install.cia" you generated with either DevMenu or over your network.
Done.