Tutorial  Updated

How to combine updates with your game

Before we begin, very important note:

  1. This tutorial is for firmware <=9.2
    However, if you're able to get the romfs and exefs decrypted from other sites, it'll serve your purpose.
  2. The example I'm using is for Pokemon
  3. If you set HANs to a different region from your 3DS, you won't be able to connect online :(
  4. This is primarily for game-breaking patches, rather than online use.
  5. Make sure you're using the newest of newest HANs, the one that allows eshop use for uses under FW10.

Other tutorials you'll need to refer to:

Decrypting and extracting CIA
Decrypting and extracting Rom


Step 1:
Decrypt and extract the Update CIA. (you can find it on a certain site, don't ask)
Make sure you extract the exefs/code.bin option and get a .code.bin file. (it is gonna be around 5312 KB)

Rename this .code.bin from the Update file as <Title ID>.code
Example: 0011C500.code

You're also going to need the extracted romfs folder from the update file.

Step 2:
Extract the romfs from the game.

Step 3:
Paste the romfs from the update file into the romfs of the game.
When it prompts, replace everything.

Step 4:
Rebuild romfs as a single file.
Name it as <Title ID>.romfs
Example: 0011C500.romfs

Step 5:
Create a hans folder on the root of your SD card.
(Example sd:/hans DO NOT TOUCH THE HANS FOLDER IN THE 3DS FOLDER)

Step 6:
Copy both the .code and .romfs file into the sd:/hans

Step 7:
Launch the game in HANs,
Set the region to be same region as your 3DS
Set the code -> SD and romfs -> SD to Yes

Proof (of sorts)
VpH9h90.png

IFhYZPC.png


Don't ask me why Jeff is a female; not my cartridge.


Enjoy!
(such a pity, I wanted to connect to Korean Pokemon Wifi; probably won't work because Secureinfo mismatch)

Special thanks:
Everyone who found and exploited the exploits
Gudenaurock's Layered FS guide that gave me the idea
Asia81's tutorial allowed for me to do the test.
 
Last edited by Queno138,

Asia81

Yuri Lover ~
Member
Joined
Nov 15, 2014
Messages
6,658
Trophies
3
Age
29
XP
3,506
Country
France
I just merged my Alpha Sapphire romfs with update 1.4 romfs, and placed 0011C500.code on hans folder, as well as 0011C500.romfs. Can't connect to internet, Error 002-0120. Even though on file select screen it says Version 1.4
Do you have 1.4 on your main menu?
 

Ekaitz

Redhead Believer
Member
Joined
Jun 13, 2010
Messages
608
Trophies
0
XP
441
Country
France
Small question. Is it possible to merge an update with a romhack?

See, I would like to play Rutile Ruby because I want to start Pokemon Ruby again but the game was really too easy, it's time for a challenge mode. But I would like to play online and it would need the 1.4 update... I have it but as HANS doesn't care about updates, the best way would be to merge both the hack and the update.

I suppose that it is possible but would it keep all the rom modifications? 'cause if we lost the main part of the hack, there wouldn't be a real interest.

It's for my 9.9 n3DS but I can use an 9.2 o3DS if I've got to decrypt some files.
 
  • Like
Reactions: ~Poke~

plushifoxed

I wanna talk more about kawaii stuff!
Member
Joined
Mar 14, 2015
Messages
189
Trophies
0
Location
Kamihama City
Website
roxie.nyc
XP
507
Country
United States
Small question. Is it possible to merge an update with a romhack?

See, I would like to play Rutile Ruby because I want to start Pokemon Ruby again but the game was really too easy, it's time for a challenge mode. But I would like to play online and it would need the 1.4 update... I have it but as HANS doesn't care about updates, the best way would be to merge both the hack and the update.

I suppose that it is possible but would it keep all the rom modifications? 'cause if we lost the main part of the hack, there wouldn't be a real interest.

It's for my 9.9 n3DS but I can use an 9.2 o3DS if I've got to decrypt some files.
This is effectively what I'm trying to do with the Smash update data that Asia81 is going to upload. Take original RomFS, apply update files, then apply my custom music NUS3BANK files. Hopefully it'll work; if not, I'll take a different tack.
 

WiseHorror

Well-Known Member
Newcomer
Joined
Sep 12, 2009
Messages
77
Trophies
0
Age
30
Location
Lisbon, Portugal
XP
289
Country
Portugal
So I don't know :huh:
Maybe I'm doing something wrong?

What I did was:
- Use braindump to dump my cartridge;
- Use ctrtool to extract romfs and exefs;
- Copy everything in the Update romfs to my cartridge romfs and clicked replace everything when prompted;
- Renamed the code.bin from the Update to 0011C500.code, as well as the romfs to 0011C500.romfs and placed them inside hans folder in SD root;
- Launched HANS with options:
~ Region: EUR
~ Language: --
~ FW Spoof: tried both Yes and No
~ Code: Yes
~ Romfs: Yes

The game launches, when I get to select save file screen, it says Version 1.4 on bottom screen.
I enter the game, try to connect to internet and get Error 002-0120. It says I need to update my game.
 

TheZoroark007

Well-Known Member
Member
Joined
Apr 2, 2014
Messages
611
Trophies
0
Age
25
XP
1,648
Country
Germany
I decrypted a .cia of the update for Pokemon Omega Ruby (Eu) update with Decrypt 9 and I was able to to extract the romfs. But how do I get the Decrypted code.bin?
 
Last edited by TheZoroark007,

WiseHorror

Well-Known Member
Newcomer
Joined
Sep 12, 2009
Messages
77
Trophies
0
Age
30
Location
Lisbon, Portugal
XP
289
Country
Portugal
idk, idk how to use hans for now, never checked
The hans part isn't the most important, because I can quickly try every option.

I've never seen actual confirmation that this works for users on >=9.3 so I'm just assuming this method simply doesn't work for those firmwares, at least for Pokemon.

Guess we just have to wait for a new hans version that supports game updates.
 
Last edited by WiseHorror,

~Poke~

Well-Known Member
Member
Joined
Aug 18, 2015
Messages
260
Trophies
0
XP
144
Country
Small question. Is it possible to merge an update with a romhack?

See, I would like to play Rutile Ruby because I want to start Pokemon Ruby again but the game was really too easy, it's time for a challenge mode. But I would like to play online and it would need the 1.4 update... I have it but as HANS doesn't care about updates, the best way would be to merge both the hack and the update.

I suppose that it is possible but would it keep all the rom modifications? 'cause if we lost the main part of the hack, there wouldn't be a real interest.

It's for my 9.9 n3DS but I can use an 9.2 o3DS if I've got to decrypt some files.
I got this working! EDIT: No I didn't.
To do this you want 3 files: vanilla code.bin, update code.bin and hack code.bin.
You can extract the vanilla code.bin from your exefs.bin with the Hacking Toolkit in Asia81's Pack Hack.
Then you want to download an IPS patcher (I used Lunar IPS). Create a patch with the vanilla code.bin as a base and the hack code.bin as the change. Then apply this IPS patch to the update's code.bin.

I've been playing for about half an hour and it's stable, I've got both the 1.4 on the titlescreen and the really cheap pokeballs so I'm pretty sure it's worked! I don't have online things yet so I can't say if they work, though if gign's problems are anything to go by I suspect they won't. (I was just looking for the stability in the updates though, so I don't really mind!)

Edit: No I don't have the 1.4 on the titlescreen. But the fact that it boots at all on the update's romfs means it worked, because vanilla/ss code won't do that. I guess Star Sapphire's changes to the titlescreen overrode that.

Edit again: Nope, can't go online. So if that's all you're looking for there's no point doing this. Once I go beat the elite four I'll know whether the update's stability helped :P

Edit for the last time: Just noticed your post didn't mention anything about merging the romfs. That's the easy bit, just chuck all the unpacked files into the same place. I merged game and update first, hack next so it had higher priority but it'd probably work the same the other way.
 
Last edited by ~Poke~,

Acryt

Well-Known Member
Member
Joined
Aug 22, 2015
Messages
310
Trophies
0
XP
169
Country
United States
I got this working!
To do this you want 3 files: vanilla code.bin, update code.bin and hack code.bin.
You can extract the vanilla code.bin from your exefs.bin with the Hacking Toolkit in Asia81's Pack Hack.
Then you want to download an IPS patcher (I used Lunar IPS). Create a patch with the vanilla code.bin as a base and the hack code.bin as the change. Then apply this IPS patch to the update's code.bin.

I've been playing for about half an hour and it's stable, I've got both the 1.4 on the titlescreen and the really cheap pokeballs so I'm pretty sure it's worked! I don't have online things yet so I can't say if they work, though if gign's problems are anything to go by I suspect they won't. (I was just looking for the stability in the updates though, so I don't really mind!)

Edit: No I don't have the 1.4 on the titlescreen. But the fact that it boots at all on the update's romfs means it worked, because vanilla/ss code won't do that. I guess Star Sapphire's changes to the titlescreen overrode that.

Edit again: Nope, can't go online. So if that's all you're looking for there's no point doing this. Once I go beat the elite four I'll know whether the update's stability helped :P

Edit for the last time: Just noticed your post didn't mention anything about merging the romfs. That's the easy bit, just chuck all the unpacked files into the same place. I merged game and update first, hack next so it had higher priority but it'd probably work the same the other way.
I think I can tell you why I think this worked for you. Pokeballs price data is contained in the romfs, and not code.bin, so you've probably overwritten the rutile ruby romfs. You can check the prices with PK3DS and see that in the item stats. I too wanted to use the RR code.bin for the better item shop setups, but realized the prices hadn't been transferred.
 
Last edited by Acryt,

~Poke~

Well-Known Member
Member
Joined
Aug 18, 2015
Messages
260
Trophies
0
XP
144
Country
I think I can tell you why I think this worked for you. Pokeballs price data is contained in the romfs, and not code.bin, so you've probably overwritten the rutile ruby romfs. You can check the prices with PK3DS and see that in the item stats. I too wanted to use the RR code.bin for the better item shop setups, but realized the prices hadn't been transferred.
Oh, really? Huh. I remembered reading that what the shop sells was stored in code, so figured that prices were too... I guess not.
Still... it boots, so I guess that's something? Pretty sure using update + hack for romfs and just the hack's code didn't boot, so I've got something happening. But yeah now you mention it, Oldale and Petalburg are both selling antidotes which I think were meant to be removed... so I guess all I really know about what I've made is it includes the 1.4 patch and doesn't put it on the titlescreen.


Kinda surprised this half-worked, I expected it to either be perfect or not boot at all. I guess what's left is to brute force it, and figure out what all the changes made were and make them again myself on the new code.
 
Last edited by ~Poke~,

Acryt

Well-Known Member
Member
Joined
Aug 22, 2015
Messages
310
Trophies
0
XP
169
Country
United States
Oh, really? Huh. I remembered reading that what the shop sells was stored in code, so figured that prices were too... I guess not.
Still... it boots, so I guess that's something? Pretty sure using update + hack for romfs and just the hack's code didn't boot, so I've got something happening. But yeah now you mention it, Oldale and Petalburg are both selling antidotes which I think were meant to be removed... so I guess all I really know about what I've made is it includes the 1.4 patch and doesn't put it on the titlescreen.


Kinda surprised this half-worked, I expected it to either be perfect or not boot at all. I guess what's left is to brute force it, and figure out what all the changes made were and make them again myself on the new code.
Honestly, i'm not sure if you used the update romfs if you managed to replace the Rutile Ruby shops. I don't believe the update romfs updates the shop at all. When I had the update romfs merged at all, the game simply wouldn't even go to title screen.
 

~Poke~

Well-Known Member
Member
Joined
Aug 18, 2015
Messages
260
Trophies
0
XP
144
Country
Honestly, i'm not sure if you used the update romfs if you managed to replace the Rutile Ruby shops. I don't believe the update romfs updates the shop at all. When I had the update romfs merged at all, the game simply wouldn't even go to title screen.
I merged the base romfs with the update, then that with Star Sapphire. This romfs includes the update so it only boots with the update's code (vanilla or hack code just black screen), and it seems like my attempt at merging the codes didnt really work well - I think I have hacked shop prices (from ss romfs you say, so meaningless), but the item choice looks vanilla since antidote is available.
I'm surprised that my code merge boots at all since I don't get how it could fail to replace the right things but still be stable? idk... not showing the version makes it distinct from just using the update's code though.

Either way, IPS patches are probably not the way to merge these things, since it relies on everything being in exactly the same location... and is only really reliable on the same file rather than moving things around (I figured it was possible, since it's the exact same file size... but it seems like a no.) I haven't looked at PK3DS so hopefully when I get around to that, there'll be a magical export button that makes this work perfectly :P

(Just now I loaded up Star Sapphire without any updates merged in and the antidote is replaced with a full heal so yeah, definitely doing something wrong here.)
 

Acryt

Well-Known Member
Member
Joined
Aug 22, 2015
Messages
310
Trophies
0
XP
169
Country
United States
I merged the base romfs with the update, then that with Star Sapphire. This romfs includes the update so it only boots with the update's code (vanilla or hack code just black screen), and it seems like my attempt at merging the codes didnt really work well - I think I have hacked shop prices (from ss romfs you say, so meaningless), but the item choice looks vanilla since antidote is available.
I'm surprised that my code merge boots at all since I don't get how it could fail to replace the right things but still be stable? idk... not showing the version makes it distinct from just using the update's code though.

Either way, IPS patches are probably not the way to merge these things, since it relies on everything being in exactly the same location... and is only really reliable on the same file rather than moving things around (I figured it was possible, since it's the exact same file size... but it seems like a no.) I haven't looked at PK3DS so hopefully when I get around to that, there'll be a magical export button that makes this work perfectly :P

(Just now I loaded up Star Sapphire without any updates merged in and the antidote is replaced with a full heal so yeah, definitely doing something wrong here.)
Items in shops are defined by the code.bin, meaning it's replaced that section. Item prices howevers, are in romfs. You can see for sure by looking @ the output in PK3DS in GARC, and manually set them aside if you want to try to repack them in.

You got further than me though, because my game didn't load with or without a code.bin, and all I did was repack the update into an original game. Might be some region issues with the update despite all the claims that it's region free (NA using EUR update is what I did)
 
Last edited by Acryt,
  • Like
Reactions: ~Poke~

Eskuero

Well-Known Member
Newcomer
Joined
Mar 20, 2015
Messages
97
Trophies
0
XP
179
Country
United States
I've tried replacing the files from the updates uploaded by Asia81 onto my romfs Alpha Saphire dump and it booted all correctly, it even showed the number 1.4 on select screen. However actually I got the error 001-0811 which means Nintendo servers are under maintenance.
I actually checked and this is true, Nintendo servers crashed like 30 mins ago and are still down x)
Waiting for them to recover to give my feedback, but if it still says I need to update to play online maybe is because we need replace those other files from extracted exefs and not just .code as maybe the exheader thing. Have no idea about what those files do so just asking.

PD: Servers are up again so I just confirmed this shit still asks me to update the game in order to use online functions.
 
Last edited by Eskuero,

Acryt

Well-Known Member
Member
Joined
Aug 22, 2015
Messages
310
Trophies
0
XP
169
Country
United States
I've tried replacing the files from the updates uploaded by Asia81 onto my romfs Alpha Saphire dump and it booted all correctly, it even showed the number 1.4 on select screen. However actually I got the error 001-0811 which means Nintendo servers are under maintenance.
I actually checked and this is true, Nintendo servers crashed like 30 mins ago and are still down x)
Waiting for them to recover to give my feedback, but if it still says I need to update to play online maybe is because we need replace those other files from extracted exefs and not just .code as maybe the exheader thing. Have no idea about what those files do so just asking.

PD: Servers are up again so I just confirmed this shit still asks me to update the game in order to use online functions.
Yeah, I don't think this works. The update more than likely has to be ran like the legit update it seems. Someone who knows a lot more about Pokemon on the 3DS like @Kaphotics might know why it's not going to work, or how to possibly get it to work.

Has anyone tried having the legit updates installed from the shop, on top of packing the update ROMFS into the romhacks?
 
Last edited by Acryt,

WiseHorror

Well-Known Member
Newcomer
Joined
Sep 12, 2009
Messages
77
Trophies
0
Age
30
Location
Lisbon, Portugal
XP
289
Country
Portugal
Yeah, I don't think this works. The update more than likely has to be ran like the legit update it seems. Someone who knows a lot more about Pokemon on the 3DS like @Kaphotics might know why it's not going to work, or how to possibly get it to work.

Has anyone tried having the legit updates installed from the shop, on top of packing the update ROMFS into the romhacks?
If you mean having the update on normal Home Menu, I do, as well as updated romfs and code.bin. Still gives me error 002-0120 saying I need to update when launching with hans.
 

supercarotte

Well-Known Member
Member
Joined
May 21, 2015
Messages
691
Trophies
0
Age
30
XP
938
Country
France
If you mean having the update on normal Home Menu, I do, as well as updated romfs and code.bin. Still gives me error 002-0120 saying I need to update when launching with hans.

I'm not able to connect either with the update romfs merged, but I get 003-2103 or 001-0502 errors so it might be my internet connection being shitty here^^ Anyway, if anyone has managed to access XYORAS online using HANS, I'd really apreciate that person to explain what trick she used^^
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    DinohScene @ DinohScene: ahh nothing beats a coffee disaronno at work