ROM Hack Can you make a ROM hack load automatically?

mashers

Stubborn ape
OP
Member
Joined
Jun 10, 2015
Messages
3,837
Trophies
0
Age
40
Location
Kongo Jungle
XP
5,074
Country
Call me old fashioned, but I like to have my games on cart. I do have some eShop purchases, but only for games that aren't available on cart.

I've made a ROM hack for MK7 (to replace the princesses) but I still want to play the game from my cart. I realise I can boot HBL and use HANS to run the game with romfs redirected to SD card, but I'm wondering if it is possible through CFW to do this automatically from the home menu. Ideally, I would like to be able to boot the cart as normal and CFW detects the title ID, checks for an SD-based romfs for that title, and if it exists, use it instead of the romfs on the cart.

Is any of this possible? If it matters I am on a New 3DS with A9LH and Luma 5.something.

TIA!

Edit - before anyone suggests it, I know I could just package up the romfs to a CIA and install that on the home menu, but I don't want to do that. I want to use the cart.
 

The Real Jdbye

*is birb*
Member
Joined
Mar 17, 2010
Messages
23,207
Trophies
4
Location
Space
XP
13,733
Country
Norway
Call me old fashioned, but I like to have my games on cart. I do have some eShop purchases, but only for games that aren't available on cart.

I've made a ROM hack for MK7 (to replace the princesses) but I still want to play the game from my cart. I realise I can boot HBL and use HANS to run the game with romfs redirected to SD card, but I'm wondering if it is possible through CFW to do this automatically from the home menu. Ideally, I would like to be able to boot the cart as normal and CFW detects the title ID, checks for an SD-based romfs for that title, and if it exists, use it instead of the romfs on the cart.

Is any of this possible? If it matters I am on a New 3DS with A9LH and Luma 5.something.

TIA!

Edit - before anyone suggests it, I know I could just package up the romfs to a CIA and install that on the home menu, but I don't want to do that. I want to use the cart.
NTR-CFW does this with LayeredFS.
 

ihaveahax

Well-Known Member
Member
Joined
Apr 20, 2015
Messages
6,069
Trophies
2
XP
7,805
Country
United States
you could create custom update data. since MK7 already has an update, you can decrypt/extract the existing update, add/replace files, and rebuild it.
 
  • Like
Reactions: cearp

mashers

Stubborn ape
OP
Member
Joined
Jun 10, 2015
Messages
3,837
Trophies
0
Age
40
Location
Kongo Jungle
XP
5,074
Country
NTR-CFW does this with LayeredFS.
Thanks! Would I need to run Boot NTR first, or can I have NTR launched when I boot the console? I did search for this but couldn't find an answer.

you could create custom update data. since MK7 already has an update, you can decrypt/extract the existing update, add/replace files, and rebuild it.
That's also a really good idea. So, do 3DS game updates just replace the romfs of the cart? Or at least have one which maps over the top of the one in the cart to replace the files present in the update?
 

ihaveahax

Well-Known Member
Member
Joined
Apr 20, 2015
Messages
6,069
Trophies
2
XP
7,805
Country
United States
That's also a really good idea. So, do 3DS game updates just replace the romfs of the cart? Or at least have one which maps over the top of the one in the cart to replace the files present in the update?
the way updates work (I think) is that if the game tries to access a file and it exists in the update's romfs, it uses that instead, otherwise from the original romfs. that's why you don't have updates that are the size of the entire game :P
 

The Real Jdbye

*is birb*
Member
Joined
Mar 17, 2010
Messages
23,207
Trophies
4
Location
Space
XP
13,733
Country
Norway
Thanks! Would I need to run Boot NTR first, or can I have NTR launched when I boot the console? I did search for this but couldn't find an answer.


That's also a really good idea. So, do 3DS game updates just replace the romfs of the cart? Or at least have one which maps over the top of the one in the cart to replace the files present in the update?
No way to run it at boot that I know of. Luma seems to be aiming to replace NTR-CFW so in the future it probably won't be needed at all (for now you can only redirect code.bin to SD with Luma I think, and not romfs)
 

mashers

Stubborn ape
OP
Member
Joined
Jun 10, 2015
Messages
3,837
Trophies
0
Age
40
Location
Kongo Jungle
XP
5,074
Country
the way updates work (I think) is that if the game tries to access a file and it exists in the update's romfs, it uses that instead, otherwise from the original romfs. that's why you don't have updates that are the size of the entire game :P
That sounds ideal. Is custom update data already a thing I can look into, or is it uncharted territory? I'm guessing it would involve downloading the update in CIA format, extracting the romfs, making the changes, repacking the CIA and then installing it. Would that be the process?

No way to run it at boot that I know of. Luma seems to be aiming to replace NTR-CFW so in the future it probably won't be needed at all (for now you can only redirect code.bin to SD with Luma I think, and not romfs)
Thanks. Hopefully Luma will add the LayeredFS support at some point. For now I'll look into @ihaveamac's suggestion.
 

ihaveahax

Well-Known Member
Member
Joined
Apr 20, 2015
Messages
6,069
Trophies
2
XP
7,805
Country
United States
That sounds ideal. Is custom update data already a thing I can look into, or is it uncharted territory? I'm guessing it would involve downloading the update in CIA format, extracting the romfs, making the changes, repacking the CIA and then installing it. Would that be the process?
custom update data is not exactly new, but I don't think many people do it. it's *almost* the same as rebuilding a game CIA, except I probably wouldn't use rsf files (last time I did, the game would hang the system if I closed it and started another one), instead extract the existing update and build on that. if you can give me the changed files somewhere I can give it a shot. if you use discord/steam/something that would be good (or just PMs :P)?
 
Last edited by ihaveahax,

mashers

Stubborn ape
OP
Member
Joined
Jun 10, 2015
Messages
3,837
Trophies
0
Age
40
Location
Kongo Jungle
XP
5,074
Country
custom update data is not exactly new, but I don't think many people do it. it's *almost* the same as rebuilding a game CIA, except I probably wouldn't use rsf files (last time I did, the game would hang the system if I closed it and started another one), instead extract the existing update and build on that. if you can give me the changed files somewhere I can give it a shot. if you use discord/steam/something that would be good (or just PMs :P)?
Thanks buddy! I'd like to give it a go myself as I'll probably have a few changes I want to make. I'll google around for some info on how to locate, extract and decrypt the existing update data. I'll post back with updates and inevitable questions :P
 

ihaveahax

Well-Known Member
Member
Joined
Apr 20, 2015
Messages
6,069
Trophies
2
XP
7,805
Country
United States
Thanks buddy! I'd like to give it a go myself as I'll probably have a few changes I want to make. I'll google around for some info on how to locate, extract and decrypt the existing update data. I'll post back with updates and inevitable questions :P
I have my own work in progress guides here: https://github.com/ihaveamac/3DS-rom-tools/wiki
not complete but should work fine, if you can use the terminal. probably better than trying to use tools that do things for you (e.g. packhack)
 

cearp

瓜老外
Developer
Joined
May 26, 2008
Messages
8,721
Trophies
2
XP
8,471
Country
Tuvalu
That sounds ideal. Is custom update data already a thing I can look into, or is it uncharted territory?
custom updates have been made, i'm not sure how many though. i don't really care much for rom hacks or follow them but i think the first i remember was actually a while a go, at least a year i think.
a monster hunter 4g update that lets you manipulate items.

so, yeah it's not just possible, but people have done it
 

mashers

Stubborn ape
OP
Member
Joined
Jun 10, 2015
Messages
3,837
Trophies
0
Age
40
Location
Kongo Jungle
XP
5,074
Country
I have my own work in progress guides here: https://github.com/ihaveamac/3DS-rom-tools/wiki
not complete but should work fine, if you can use the terminal. probably better than trying to use tools that do things for you (e.g. packhack)
Oh, nice! Thanks mate! Terminal is my preferred method actually. I've had a look through and can't see any info about extracting the game updates. I also had a look through the options in D9 but couldn't see anything in there. Do you know how do extract the game updates?
 

ihaveahax

Well-Known Member
Member
Joined
Apr 20, 2015
Messages
6,069
Trophies
2
XP
7,805
Country
United States
Oh, nice! Thanks mate! Terminal is my preferred method actually. I've had a look through and can't see any info about extracting the game updates. I also had a look through the options in D9 but couldn't see anything in there. Do you know how do extract the game updates?
you can extract game updates the same way as games. they are probably rebuilt the same way too, if you rebuild w/ NCCH header and things.
 

mashers

Stubborn ape
OP
Member
Joined
Jun 10, 2015
Messages
3,837
Trophies
0
Age
40
Location
Kongo Jungle
XP
5,074
Country
custom updates have been made, i'm not sure how many though. i don't really care much for rom hacks or follow them but i think the first i remember was actually a while a go, at least a year i think.
a monster hunter 4g update that lets you manipulate items.

so, yeah it's not just possible, but people have done it
Good to know it's been done. I'm working on it! (I really hate those princesses)

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

you can extract game updates the same way as games. they are probably rebuilt the same way too, if you rebuild w/ NCCH header and things.
Ok, so is it just a case of finding out the title ID of the update and dumping with braindump?
 
  • Like
Reactions: cearp

ihaveahax

Well-Known Member
Member
Joined
Apr 20, 2015
Messages
6,069
Trophies
2
XP
7,805
Country
United States
Ok, so is it just a case of finding out the title ID of the update and dumping with braindump?
braindump does not dump updates so you need to get a CIA of it. download the update for Mario Kart 7 EUR (0004000e00030700) from Nintendo's CDN (like FunKeyCIA, or my own crappy script that doesn't need make_cdn_cia). you need to get the encrypted titlekey somewhere (there's a site full of these), and get the encrypted titlekey for 0004000e00030700.

decrypt the CIA using the 3DS, extract it (including NCCH header), make your changes in the RomFS, rebuild it.

I honestly have not thoroughly tested my guides yet (especially updates), but they should be good enough. I might be able to answer any questions you have.
 
  • Like
Reactions: zoogie

mashers

Stubborn ape
OP
Member
Joined
Jun 10, 2015
Messages
3,837
Trophies
0
Age
40
Location
Kongo Jungle
XP
5,074
Country
braindump does not dump updates so you need to get a CIA of it. download the update for Mario Kart 7 EUR (0004000e00030700) from Nintendo's CDN (like FunKeyCIA, or my own crappy script that doesn't need make_cdn_cia). you need to get the encrypted titlekey somewhere (there's a site full of these), and get the encrypted titlekey for 0004000e00030700.
Ahh ok, so you can't dump the update, right? You have to download from Nintendo's server directly? Ok, I can do that and work with the CIA.

Do I have to bump the version number or anything before I install the modified CIA?

I honestly have not thoroughly tested my guides yet (especially updates), but they should be good enough. I might be able to answer any questions you have.
I'll let you know if it worked ;)
 

ihaveahax

Well-Known Member
Member
Joined
Apr 20, 2015
Messages
6,069
Trophies
2
XP
7,805
Country
United States
Ahh ok, so you can't dump the update, right? You have to download from Nintendo's server directly? Ok, I can do that and work with the CIA.
that, or find the CIA online. getting it from CDN is the easiest (and fastest) method though.
Do I have to bump the version number or anything before I install the modified CIA?
probably doesn't matter all that much when you're testing, but when you're finished you might want to add "-ver 1040" to makerom to match the title version of the original update (so you can play online, if that works)
 

cearp

瓜老外
Developer
Joined
May 26, 2008
Messages
8,721
Trophies
2
XP
8,471
Country
Tuvalu
Do I have to bump the version number or anything before I install the modified CIA?
yes, mario kart has a 1.1 update, unless you are using it from eshop (and have redownloaded, after they commmbined that update to the game) - or using a revised cart -> yes, bump up the version in the update, it can't hurt.
i guess any update will be used for a game, and the version number is not important.
it's not like we can have multiple update patches for a game at the same time, and that the latest one is the only one used. - we can only have one.
 
Last edited by cearp,

mashers

Stubborn ape
OP
Member
Joined
Jun 10, 2015
Messages
3,837
Trophies
0
Age
40
Location
Kongo Jungle
XP
5,074
Country
that, or find the CIA online. getting it from CDN is the easiest (and fastest) method though.
... if bloody python works. None of the versions I've got on my Mac work (they all result in syntax errors for both FunkeyCIA and your script). That's with python 2.6, 2.7, 3 and 3.5. I fucking hate python.

probably doesn't matter all that much when you're testing, but when you're finished you might want to add "-ver 1040" to makerom to match the title version of the original update (so you can play online, if that works)
So the version number of the modified update should be the same as the most recent genuine update, right? Will it override the real update if it's installed, or should I remove the genuine one first?

yes, mario kart has a 1.1 update, unless you are using it from eshop (and have redownloaded, after they commmbined that update to the game) - or using a revised cart -> yes, bump up the version in the update, it can't hurt.
i guess any update will be used for a game, and the version number is not important.
it's not like we can have multiple update patches for a game at the same time, and that the latest one is the only one used. - we can only have one.
Ahh I think that answers my question above. So I remove the official update, then install mine, right?
 

ihaveahax

Well-Known Member
Member
Joined
Apr 20, 2015
Messages
6,069
Trophies
2
XP
7,805
Country
United States
... if bloody python works. None of the versions I've got on my Mac work (they all result in syntax errors for both FunkeyCIA and your script). That's with python 2.6, 2.7, 3 and 3.5. I fucking hate python.
you could try installing it with brew. what syntax errors do you get? my script uses 3.5.
So the version number of the modified update should be the same as the most recent genuine update, right? Will it override the real update if it's installed, or should I remove the genuine one first?
I don't think it matters but you might want to remove the current update.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    LeoTCK @ LeoTCK: yes for nearly a month i was officially a wanted fugitive, until yesterday when it ended