ROM Hack Testers wanted for 3DS ROM Patcher

evandixon

PMD Researcher
OP
Developer
Joined
May 29, 2009
Messages
1,725
Trophies
0
Website
projectpokemon.org
XP
2,313
Country
United States
Applying ROM hacks isn't the easiest of things to do. First you have to unpack everything, then play around with files, then repack everything, and if you're going to use HANS, you have to trim the first 0x1000 bytes.

I plan to simplify the process. I've been working on a ROM editor of sorts that outputs a distributable ROM patcher. This patcher can patch decrypted .3DS ROMs and romfs.bin files outputted by braindump. It can output to Gateway compatible .3DS files or to hans. Cia support might come in the future.

The patcher works for me, but things always tend to go wrong when someone else uses it. So, I've made patchers for Pokemon Rutile Ruby and Pokemon Star Sapphire by @Dio_Vento. I'm looking for people with either a Gateway or the ability to use HANS to try either patcher, and let me know if things break. Be sure to make regular backups. I'm not liable if your computer explodes.

In order to use this, you must have the .Net Framework 4.6 installed. Also, ctrtool needs msvcr120.dll, which comes with the Visual C++ Redistributable for Visual Studio 2013.

Instructions:
-Download your choice of zip. Don't forget to unblock it (Right-click > Properties > General > Security > Unblock.
-Extract the zip using your favorite archive tool.
-Run DSPatcher.exe
-Choose a ROM. 3DS, CXI, and romfs.bin are supported. If you choose romfs.bin, an exefs.bin file will be used if it is in the same directory as romfs.bin.
-Press patch.
-Wait. Sorry about the UI hanging, I'll fix this sometime before an official, non-alpha/beta release.
-If you're using a .3DS file, you'll be given the option to output to Hans or .3DS. Braindump users will only be able to output to Hans. If you're using a .CXI file made using Braindump, select Hans, because if you choose .3DS, it will not run.
-Choose an output path. Either a .3DS file (for gateway), or the root of your SD card (for Hans)
-Wait until the progress bar says "Ready".
-Try the game out, see if it works.

Downloads:
Star Sapphire 2.0 - Legit Build (Patcher Alpha 4)
Star Sapphire 2.0 - Leveled Build (Patcher Alpha 4)
Star Sapphire 2.0 - 679 Build (Patcher Alpha 4)
Star Sapphire 1.3 (Patcher Alpha 4)
Rutile Ruby 1.2 (Patcher Alpha 3)
Star Sapphire 1.2 (Patcher Alpha 3)

The crossed out ones are older, but should properly output Gateway compatible ROMs.


Credits:
@SciresM for writing 3DS Builder, which I modified to add command-line argument support.
Neimod, for writing ctrtool.
Joshua MacDonald, for writing xdelta.

If you're curious, the "alpha 3" in the filename is the version of the patcher. It will be changed to "alpha 4" or higher if I update the patcher.

[Edit 4/5/16 (that's m-d-yy format btw)]
I've released a newer version of the Star Sapphire patcher which should resolve issues with the newer version of Hans. Additionally, it should preserve the source game's private header if it has one.
This is a newer version of the patcher included with Sky Editor 4 Beta 2, but it should also have better Hans compatibility. Please try it out and let me know if it works. I think this could make making ROM hacks significantly easier in the future, so help me help you help us all.

[Edit 4/7/16]
Added new modpacks for each build of Star Sapphire 2.
 
Last edited by evandixon,

Boogieboo6

@realDonaldTrump
Member
Joined
Jul 30, 2015
Messages
965
Trophies
1
Age
23
XP
807
Country
United States
After I pressed No so it would output to a 3ds or CIA file, it pulled up a 3ds builder tool. Finding the romfs and exheader were a pain but I found them and got those areas filled in. Both of the exefs folders are "missing something essential" according to the tool. One has nothing in it and one has 3 xdelta files inside. I can't progress any more. Also, when I choose the save location, nothing is filled in in the save as type box, nor is there anything in the drop down box.
 

evandixon

PMD Researcher
OP
Developer
Joined
May 29, 2009
Messages
1,725
Trophies
0
Website
projectpokemon.org
XP
2,313
Country
United States
After I pressed No so it would output to a 3ds or CIA file, it pulled up a 3ds builder tool. Finding the romfs and exheader were a pain but I found them and got those areas filled in. Both of the exefs folders are "missing something essential" according to the tool. One has nothing in it and one has 3 xdelta files inside. I can't progress any more. Also, when I choose the save location, nothing is filled in in the save as type box, nor is there anything in the drop down box.
That's strange. 3DS Builder shouldn't have been shown. It's supposed to run in the background, doing everything for you. Maybe the command line args are being weird. Where did you extract the zip, and where did you save the .3DS file?

And if you want to do it manually, the proper folders are in Tools/ndstemp. The xdelta files are only used to patch the files in Tools/ndstemp.
 

Boogieboo6

@realDonaldTrump
Member
Joined
Jul 30, 2015
Messages
965
Trophies
1
Age
23
XP
807
Country
United States
That's strange. 3DS Builder shouldn't have been shown. It's supposed to run in the background, doing everything for you. Maybe the command line args are being weird. Where did you extract the zip, and where did you save the .3DS file?

And if you want to do it manually, the proper folders are in Tools/ndstemp. The xdelta files are only used to patch the files in Tools/ndstemp.
I extracted the zip to a new folder on my desktop named "Rom Hack". The original 3ds file (Omega Ruby) was on the desktop. I set the one it should have made to the desktop too. I just tried to use the files you said in Tools/ndstemp and it said it was missing something essential. I'm dumping my own exefs right now with Braindump.

EDIT: The exefs files that I dumped with braindump don't work with the tool either, they're "missing something essential".
 
Last edited by Boogieboo6,

evandixon

PMD Researcher
OP
Developer
Joined
May 29, 2009
Messages
1,725
Trophies
0
Website
projectpokemon.org
XP
2,313
Country
United States
I extracted the zip to a new folder on my desktop named "Rom Hack". The original 3ds file (Omega Ruby) was on the desktop. I set the one it should have made to the desktop too. I just tried to use the files you said in Tools/ndstemp and it said it was missing something essential. I'm dumping my own exefs right now with Braindump.

EDIT: The exefs files that I dumped with braindump don't work with the tool either, they're "missing something essential".
I tested it out on a Windows 7 x86 VM, and found that the issue is probably Tools/ctrtool.exe. Try running it to see if you get a message about missing msvcr120.dll. If so, installing this should fix it:
https://www.microsoft.com/en-us/download/details.aspx?id=40784

Adding that to the list of requirements in the OP.
 

Boogieboo6

@realDonaldTrump
Member
Joined
Jul 30, 2015
Messages
965
Trophies
1
Age
23
XP
807
Country
United States
I tested it out on a Windows 7 x86 VM, and found that the issue is probably Tools/ctrtool.exe. Try running it to see if you get a message about missing msvcr120.dll. If so, installing this should fix it:
https://www.microsoft.com/en-us/download/details.aspx?id=40784

Adding that to the list of requirements in the OP.
That worked ok. I played around a bit after successfully making a hans compatible game. During the process of making the hans game, I had to move a romfs folder from one part of the extracted files to another. Your shortcut immediately crashed and loading through hans was no better. (I copied the Rruby romfs and renamed them into 0011c400.romfs so hans would load them.)
 

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,648
Country
France
There are versions of ctrtool for 32bit, but there were so much self builds from different users that it was hard follow who did what and I think nobody made an easy place to find these different builds.

Xdelta works fine on XP.

There's no way to run .Net 4.5 on XP, it's 4.0 max.
A lot of 4.5 .net application works fine on 4.0, it's just that developers don't change the "min ver" value, but it usually doesn't use exclusive 4.5 functions.
I don't know if this app require 4.5 function, I'm just saying it's usually a compilation value to change to support XP.
PS: I'm searching where I read that, for sources and to help users. (because maybe I mixed it with Visual Studio, not netframework)
edit :
I don't know if it helps, I found only this : http://blogs.msdn.com/b/vcblog/archive/2012/10/08/10357555.aspx
it's for visual studio (I guess you are using that to compile C# ?)
 
  • Like
Reactions: cvskid

evandixon

PMD Researcher
OP
Developer
Joined
May 29, 2009
Messages
1,725
Trophies
0
Website
projectpokemon.org
XP
2,313
Country
United States
That worked ok. I played around a bit after successfully making a hans compatible game. During the process of making the hans game, I had to move a romfs folder from one part of the extracted files to another. Your shortcut immediately crashed and loading through hans was no better. (I copied the Rruby romfs and renamed them into 0011c400.romfs so hans would load them.)
Why did you have to move a romfs folder? Was there an error message?
 

Boogieboo6

@realDonaldTrump
Member
Joined
Jul 30, 2015
Messages
965
Trophies
1
Age
23
XP
807
Country
United States
Why did you have to move a romfs folder? Was there an error message?
I ran the installer again just now, I had to move the romfs folder again because it wasn't there to begin with. A .net framework box tells me that part of the file path is missing in ndstemp/romfs. After moving it so I could complete an installation, I looked inside the folder again and the romfs were gone yet again from ndstemp.
 

evandixon

PMD Researcher
OP
Developer
Joined
May 29, 2009
Messages
1,725
Trophies
0
Website
projectpokemon.org
XP
2,313
Country
United States
I ran the installer again just now, I had to move the romfs folder again because it wasn't there to begin with. A .net framework box tells me that part of the file path is missing in ndstemp/romfs. After moving it so I could complete an installation, I looked inside the folder again and the romfs were gone yet again from ndstemp.
Try running just ctrtool in the Tools directory. See if an error dialog is shown. Since the romfs directory is not being made, it might be ctrtool's fault.
 

Ridge

they/them
Member
Joined
Sep 10, 2015
Messages
389
Trophies
0
Age
28
Location
Virtual Reality
Website
twitter.com
XP
401
Country
Norway
This seems really promising! I'd give it a go if I had either ORAS game... Just a question tho, since I use HANS and Braindump, what exactly would it help me with? Just trimming the first 0x1000 bytes and replacing data in a .romfs?
 
Last edited by Ridge,

Boogieboo6

@realDonaldTrump
Member
Joined
Jul 30, 2015
Messages
965
Trophies
1
Age
23
XP
807
Country
United States
Try running just ctrtool in the Tools directory. See if an error dialog is shown. Since the romfs directory is not being made, it might be ctrtool's fault.
There was no error message when I ran ctrtool, just a command prompt window that flashed for a split second.
 

evandixon

PMD Researcher
OP
Developer
Joined
May 29, 2009
Messages
1,725
Trophies
0
Website
projectpokemon.org
XP
2,313
Country
United States
This seems really promising! I'd give it a go if I had either ORAS game... Just a question tho, since I use HANS and Braindump, what exactly would it help me with? Just trimming the first 0x1000 bytes and replacing data in a .romfs?
It will unpack your romfs (and exefs if you have one), apply patches to certain files, repack the romfs, trim the first 0x1000 bytes, copy it to your SD, and create a shortcut to it in the homebrew menu. It also reduces the distribution download from ~60MB to ~4MB.

If you want to try it out with another ROM Hack, just give me a link to it, and I can make another patcher.
There was no error message when I ran ctrtool, just a command prompt window that flashed for a split second.
What version of Windows are you running? Also, is it 32 bit or 64 bit?
 
Last edited by evandixon,
  • Like
Reactions: Ridge

Boogieboo6

@realDonaldTrump
Member
Joined
Jul 30, 2015
Messages
965
Trophies
1
Age
23
XP
807
Country
United States
It will unpack your romfs (and exefs if you have one), apply patches to certain files, repack the romfs, trim the first 0x1000 bytes, copy it to your SD, and create a shortcut to it in the homebrew menu. It also reduces the distribution download from ~60MB to ~4MB.

If you want to try it out with another ROM Hack, just give me a link to it, and I can make another patcher.

What version of Windows are you running? Also, is it 32 bit or 64 bit?
Windows 10 64 bit
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    realtimesave @ realtimesave: I get a mig switch in the mail today