ROM Hack [Tutorial] How to Rebuild a Custom Update for Pokémon XY/ORAS

Asia81

Yuri Lover ~
OP
Member
Joined
Nov 15, 2014
Messages
6,658
Trophies
3
Age
29
XP
3,503
Country
France
With this tutorial, you will be able to rebuild a custom update for Pokemon X/Y, OmegaRuby/AlphaSapphire.

If you decrypt and use the latest update as a base, you will also can go online, such as GTS :)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​

Summary:

-Prerequisites
- Decrypt your Update
- Edit your Update
- Rebuild your Update​

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​

Prerequisites

Download and install my PackHack:
http://pastebin.com/A1s8cmsD

Install the new SetupUS.exe of HackingToolkit3DS as a common tool:


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​

Decrypt your Update

First, you need to decrypt your Update.cia with Decrypt9WIP.
For more infos, and the tutorial, go here:
https://gbatemp.net/threads/tutorial-how-to-decrypt-extract-and-rebuild-a-cia.388677/

Once your update is extracted, your folder should be something like this:
1460327629-updateextracted.png


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​

Edit your Update

Part 1 - Prepare your Custom RomFS:

For now, you can just edit/inject GARC files and the sound folder.
Don't touch other files/folders (GARC are files without extension).

First Way : Edit a GARC already in the update

Extract your GARC with GARC Tool.
Edit what you want.
Rebuild the GARC with GARC Tool.

You can also take a GARC from your full game, and put it in the same path, by deleting the same/old GARC from your update.

Second Way: Inject a GARC which is not in the Update
For this example, I will use the AlphaSapphire's Title Banner (GARC a/1/5/2).

For add a new GARC in your update, you need to know the A path.
And make a new folder in the romfs folder of your update.

Now, you need to rename this new folder by the A letter and the first number of the GARC path.
In my case, I need to name the folder a1. In this a1 folder, I will make another folder, name it 5, and in this 5 folder, I will put my GARC "2".

Look, you will understand:
1434927236-folderacustom.png

You can also see it in video, if you always don't understand.
I'm sure you'll can understand with it:


Once your custom A folder and your GARC are ready, you need to edit the .code.bin file to tell him that you want to load the GARC from the update, and not the game.

You need a decompressed code.bin file!

Open HackingToolkit3DS, write pppt.
Pokemon Patch Pointer Tool is now open.

With it, target and open the decompressed code.bin from your update.
In the tool, write the path after the A:
1460385195-pppt1.png

Do the same for all other GARC you injected.

And press the Patch button :
1460385195-pppt2.png

Third Way: Inject a Sound folder
For this, you need first to extract your full game.

Take the following folders from your full game:
Code:
sound
sounddebug

And replace sound by sons:
Code:
sound become sons
sounddebug become sonsdebug

Now put your both folder from your full game and renamed, in the romfs of your update.
Open .code.bin (Decompressed, I recall) in an hexadecimal editor. HxD is highly recommended.

Search and Replace the following string:
Code:
72 6F 6D 3A 2F 73 6F 75 6E 64 2F 73 61 6E 67 6F 5F 73 6F 75 6E 64 2E 62 63 73 61 72

By:
Code:
72 6F 6D 32 3A 2F 73 6F 6E 73 2F 73 61 6E 67 6F 5F 73 6F 75 6E 64 2E 62 63 73 61 72

Part 2 - Rebuild your Custom RomFS:

Open HackingToolkit3DS, write RFSB.
RomFS Builder is now open.
With it, open your ExtractedRomFS folder (in PackHack).
Click GO. Wait and save it named CustomRomFS.bin.
Done !


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​

Rebuild the Update

1460384537-ppb1.png
1460384537-ppb2.png


Open HackingToolkit3DS, write ppb.
Write if you want rebuild your update for X/Y, OmegaRuby/AlphaSapphire (x/y/or/as)

Wait until the full rebuild, now you should have a new Patch.CIA in this folder.

Try to install it, and run the game.
See if it's working.

Enjoy.

This is a Proof Of Working showing the installation of CIAs created in the Part 1 of my video, you will can see the installation, then the in-game banner as expected:


1460384677-gbalphatitlebannerus.jpg
1460384679-neoxtitlebannerus.png


Credits:
CTRTool : Neimod
ctrulib : Smealum
Makerom : 3dsguy
3DS Multi Decryptor (CtrKeyGen) : Relys
Padxorer : xerpi
RomFS Builder : SciresM
RomFS Extractor : SciresM
3DS Builder : SciresM
Decrypt9 : Archshift
Decrypt9 (3DSX and python scripts) : d0k3 & Shadowtrance
3DSFAT16Tool : d0k3
Brahma2 : delebile
3DS Simple CIA Converter : Riku
Patch RomFS Pointer Tool : AHP_Person
HackingToolkit3DS : Asia81 / Mizoré
CleanTool : Asia81 / Mizoré

Thanks to:
Megadrifter
Stratovarius
Reisyukaku
Weby
Guitoh
Apache Thunder
Ericzander
BullyWiiPlaza​
 
Last edited by Asia81,

KazoWAR

Well-Known Member
Member
Joined
Aug 12, 2008
Messages
1,952
Trophies
1
Age
35
Location
Winter Haven
XP
2,126
Country
United States
ill give it a shot. but i was rebuilding the cias pretty much the same way(from the spoofed 1.2 update source)

*EDIT 1*Still same thing, if i leave romfs alone, it works, but if i touch romfs(even repacking untouched files) it broken, this is with the v1.5 update BTW, let me test with v1.2

*EDIT 2* v1.2 not working either. what the fuck.

*EDIT 3* Turns out I was using an old version of RomFS Builder :(
 
Last edited by KazoWAR,

DJPlayer

Banned!
Banned
Joined
May 21, 2015
Messages
542
Trophies
0
Age
46
XP
429
Country
Netherlands
I used you PackHack so I wrote it in this thread

Not sure but could your RomFS-extractor have Problems with japanese filenames?
I'm not sure if the FIlenames should be really like "#0.bch.lz" and some foldernames like: #######_###

I decrypted and extracted Fire Emblem If and want to rebuilt it.
But the filesize of the rebuilt romfs.bin is ~ 85MB smaller?

Not sure if the RomFS extractor extracted all files correctly.
here's a example of some foldernames:
65a084c38f.png
 

Asia81

Yuri Lover ~
OP
Member
Joined
Nov 15, 2014
Messages
6,658
Trophies
3
Age
29
XP
3,503
Country
France
ill give it a shot. but i was rebuilding the cias pretty much the same way(from the spoofed 1.2 update source)

*EDIT 1*Still same thing, if i leave romfs alone, it works, but if i touch romfs(even repacking untouched files) it broken, this is with the v1.5 update BTW, let me test with v1.2

*EDIT 2* v1.2 not working either. what the fuck.

*EDIT 3* Turns out I was using an old version of RomFS Builder :(

If you want, i can make a tutorial vidéo ?

--------------------- MERGED ---------------------------

I used you PackHack so I wrote it in this thread

Not sure but could your RomFS-extractor have Problems with japanese filenames?
I'm not sure if the FIlenames should be really like "#0.bch.lz" and some foldernames like: #######_###

I decrypted and extracted Fire Emblem If and want to rebuilt it.
But the filesize of the rebuilt romfs.bin is ~ 85MB smaller?

Not sure if the RomFS extractor extracted all files correctly.
here's a example of some foldernames:
65a084c38f.png

RomFS Extractor is from SciresM, not me.

Use my batch > partition > romfs
 

DJPlayer

Banned!
Banned
Joined
May 21, 2015
Messages
542
Trophies
0
Age
46
XP
429
Country
Netherlands
If you want, i can make a tutorial vidéo ?

--------------------- MERGED ---------------------------



RomFS Extractor is from SciresM, not me.

Use my batch > partition > romfs

I used your batch...
I wrote my own DUmp-TOol. That worked fine
 

KazoWAR

Well-Known Member
Member
Joined
Aug 12, 2008
Messages
1,952
Trophies
1
Age
35
Location
Winter Haven
XP
2,126
Country
United States
If you want, i can make a tutorial vidéo ?

--------------------- MERGED ---------------------------



RomFS Extractor is from SciresM, not me.

Use my batch > partition > romfs
i got it working, i was using a older version of romfs builder and it was making bad romfs.
 

Stoned

Well-Known Member
Member
Joined
Mar 26, 2014
Messages
2,763
Trophies
2
Age
45
XP
4,389
Country
Germany
2 Quick Question.
I have Changed my Box Layouts whit Ohana3ds.
I Have Saved the new Layouts and repack the Garc file.

1. Question must i delete the .garc or not? Example 123.garc to 123?
2. When i Link the Boxlayouts to the Patch Exampe Folder a1 Folder 0 and 3.garc than build the romfs and the Patch i become a Blackscreen when i Enter the Pc
What can i Do?

@Edit: Works. :D
My Problem was i have the garc extracted whit ohana and Repacked whit Garctool. :D
 
Last edited by Stoned,

Asia81

Yuri Lover ~
OP
Member
Joined
Nov 15, 2014
Messages
6,658
Trophies
3
Age
29
XP
3,503
Country
France
@Stoned

1) Yeah. Delete the .garc. Test.garc become Test (For example).
So your 3.garc should be 3. (a/1/0/3 ?)

2) With Patch RomFS Pointer Tool.exe, have you target 1 0 3 ? :
http://image.noelshack.com/fichiers/2015/26/1435482527-patchbuilder1.png

And put your garc like here: ?
http://image.noelshack.com/fichiers/2015/26/1435482877-patchbuilder2.png

Now you need to rebuild the update romfs.
Then take the romfs.bin, code.bin, icon.bin, DecryptedExHeader.bin (rename it exheader.bin) (all from the update)
And puts these files in the AS folder (or OR). and use my batch > as / or and wait.
 

Stoned

Well-Known Member
Member
Joined
Mar 26, 2014
Messages
2,763
Trophies
2
Age
45
XP
4,389
Country
Germany
New Problem.
When i Put the 0/0/8 to a0/0/8 and Point whit the pointer Tool, it´s doesnt work Ingame.
By rebuild the update become i a Message whit not cxikey found or so
What make i Wrong?
 

Stoned

Well-Known Member
Member
Joined
Mar 26, 2014
Messages
2,763
Trophies
2
Age
45
XP
4,389
Country
Germany
What am I doing wrong ?

I try to Inject the Overworld data romfs a0 2 1 (buildet to romfs.bin
 

Attachments

  • Unbenannt.PNG
    Unbenannt.PNG
    12.2 KB · Views: 714

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: Playing the Judge Dredd arcade game prototype lol I can see why they didn't finish it but at the...