ROM Hack 3DS ROM Tool: rom_tool

Spzjulien

Well-Known Member
Member
Joined
Sep 8, 2012
Messages
329
Trophies
1
XP
625
Country
France
i try normal trim and super trim on new super mario2 and mario land 3D, but when i try both game, they dont work on my Gateway 1.1
 

3DSGuy

No longer in scene
OP
Member
Joined
May 22, 2012
Messages
345
Trophies
0
XP
467
Country
United States
of course yes working great :)
What do you mean by not work? And which release where those ROMs?

NSM2 and marioland 3D was not working for me with 1.0 ... now working great .... with 1.1
mario and luigi dreamland 5.1 too ... amazing .. good job
Sounds to me like NSM2 and marioland 3D are problematic in them selves.
 

Spzjulien

Well-Known Member
Member
Joined
Sep 8, 2012
Messages
329
Trophies
1
XP
625
Country
France
game freeze when start ....

ah !! trim rom New_Super_Mario_Bros_2_USA_3DS-VENOM working now :)

New.Super.Mario.Bros.2.EUR.3DS-CONTRAST not working well trim or not

gona try again mario land 3d
 
  • Like
Reactions: 3DSGuy

umdking

Active Member
Newcomer
Joined
Jul 11, 2013
Messages
28
Trophies
0
Age
42
XP
43
Country
Finland
now mario land 3d trim working ... after 3 try, this time game worked :)

really nice program ... good work :)

Probably your TF card(or something related to it, likely the card reader)caused the problem,i guess,not the trimming.

These situations indicate TF card abnormal.
1 Stuck/freeze/blackscreen when loading,even with a untrimmed rom.
2 The problems could be suddenly fixed after writing the rom image to TF several times.

A few of my friends encounted the similar issues but after they replaced the TF with new one,all issues have gone.

i don't know the mechanism of these TF related issues,GW says something like the fragments in the TF or SD caused the problems.i think the fragments are some corrupted data which are generated in the writing process,so once loaded by the console,problems occur.
 

placebooooo

Well-Known Member
Member
Joined
Aug 9, 2013
Messages
817
Trophies
0
Age
28
Location
Philadelphia
XP
1,141
Country
United States
I'm having trouble actually starting the trimmer program. I downloaded both the automatic and manual downloads from filetrip but i cant get them to work. I would appreciate the help.
 

3DSGuy

No longer in scene
OP
Member
Joined
May 22, 2012
Messages
345
Trophies
0
XP
467
Country
United States
I'm having trouble actually starting the trimmer program. I downloaded both the automatic and manual downloads from filetrip but i cant get them to work. I would appreciate the help.
Are you using command prompt, the program can't be launched by double clicking on it. Put rom_tool.exe in the same directory as your 3DS ROMs and press 'shift' and 'right click' at the same time in the current directory. You have an option to "Open command window here", click on it and it will open a cmd window in your ROM directory. Now you can use rom_tool.
 

placebooooo

Well-Known Member
Member
Joined
Aug 9, 2013
Messages
817
Trophies
0
Age
28
Location
Philadelphia
XP
1,141
Country
United States
Are you using command prompt, the program can't be launched by double clicking on it. Put rom_tool.exe in the same directory as your 3DS ROMs and press 'shift' and 'right click' at the same time in the current directory. You have an option to "Open command window here", click on it and it will open a cmd window in your ROM directory. Now you can use rom_tool.
Thanks! Got it to work fine I just also had to rename the rom to Test.3ds for some reason. I just have a simple question: for example the super mario 3d land rom is 512 mb. So if I trim it I'll be able to use it fine, no problem on a 512 mb micro sd card, true? Lol and Its just hard to believe that trimmed roms are exactly the same as untrimmed roms, That is correct I believe?
 

Coto

-
Member
Joined
Jun 4, 2010
Messages
2,979
Trophies
2
XP
2,564
Country
Chile
http://3dbrew.org/wiki/NCSD


The only way the decrypt the NCCH partitions is with the AES key the NCCH was encrypted with.


No, the keys are stored in two parts(scrambled), one part is known by the 3DS, the other part is calculated from the NCCH header of the NCCH file. Then the two parts are descrambled by a hardware AES engine, and the actual key is written by the AES engine to a register to which only the AES engine can read. So even with kernel level control you won't ever get the final key which is used to decrypt the NCCH.

yes, from some findings I found those are sent as 64 bit strings from ARM11 to aes engine, plus unknown opcodes. (ala r4 card update routines that send SPI commands directly to onboard SPI flash interface )
 
  • Like
Reactions: 3DSGuy

3DSGuy

No longer in scene
OP
Member
Joined
May 22, 2012
Messages
345
Trophies
0
XP
467
Country
United States
Thanks! Got it to work fine I just also had to rename the rom to Test.3ds for some reason. I just have a simple question: for example the super mario 3d land rom is 512 mb. So if I trim it I'll be able to use it fine, no problem on a 512 mb micro sd card, true? Lol and Its just hard to believe that trimmed roms are exactly the same as untrimmed roms, That is correct I believe?
Great, but you shouldn't have to rename the rom to test.3ds. In regards to your question, yes if you trim it with "rom_tool.exe -t test.3ds" on a 512 mb rom, it should now fit on a 512 mb micro SD card. How well the game runs will depend on the quality and speed of your micro SD card.

Lol and Its just hard to believe that trimmed roms are exactly the same as untrimmed roms
When developers create 3DS games, the final ROM is rarely the same size of the chip which it is written to. The chips in 3DS cards aren't made to fit each game which is made, instead game ROMs are written to a chip which is larger than the ROM. 3DS ROM dumps, are dumps of the entire 3DS game card chip, even the unused parts.

What the rom_tool does when you use "-t" is detect how much of the ROM is used by the game, and removed the unused parts.

When you use "-s" rom_tool does the same as it does when "-t" is selected, but it also removes the update partition. ROMs trimmed with the "-s" command only work with 3DSs which have game card update checks patched, like GW Mode v1.1.
 

GameBarHome

New Member
Newbie
Joined
Aug 23, 2013
Messages
2
Trophies
0
Age
43
XP
51
Country
Switzerland
WHAT IS "rom_tool" ?
"rom_tool" is a tool I wrote in light of the recently announced Gateway 3DS. It has three main features:
  1. Read 3DS ROMs, and print information about them, including actual ROM file size, and minimum required 3DS FW etc.
  2. Accurately trim 3DS ROMs, and be able to restore them again.
  3. Extract the partitions from 3DS ROMs (and other NCSD Images, such as NAND Dumps)
ROM trimming and un-trimming is tested(to trim and un-trim correctly), and works with all 3DS ROM sizes, large(4GB) and small(128MB).


NOTE: In release v2.6 and onwards, there exists a feature called "Super Trim". This works by removing the update partition(in addition to unused bytes) from the ROM. This has been tested by Devin, and works with Gateway-3DS. However as this is removing used data from the ROM, the removed update partition CANNOT be restored, and the ROM is PERMANENTLY altered. As update partitions are approximately 30MB in size, Super Trimming offers little advantage over regular trimming when dealing with large ROMs. So Super Trimming a ROM should only be done when space is scarce.

NOTE: Super Trimmed ROMs are only compatible with Gateway Version 1.1 and above.

HOW TO USE
This is a command line tool, so you have to use cmd :O .

View ROM/NAND Dump Info:
rom_tool -i Test.3ds

Extract ROM Partitions:
rom_tool -x <prefix for extracted files> Test.3ds

Trim ROM:
rom_tool -t Test.3ds

Super Trim ROM (Permanently remove update partition):
rom_tool -s Test.3ds

Restore ROM (Untrim):
rom_tool -r Test.3ds

DOWNLOAD(WINDOWS) : FileTrip (v2.7 Released: 23/8/13)

SOURCE CODE : GITHUB
Note the source code was written to be compatible with both Windows and Linux. When compiling on Windows, use MinGW, success not guaranteed with any other Windows developing environment.


Hello!

romtool 2.7

USE command
rom_tool -x test.3ds
Not extracted

-----------------------
Must use the <name>
rom_tool -x <name> text.3ds
but,romtool 2.6
use command
rom_tool -x test.3ds
Can be extracted
 

3DSGuy

No longer in scene
OP
Member
Joined
May 22, 2012
Messages
345
Trophies
0
XP
467
Country
United States
romtool 2.7

USE command
rom_tool -x test.3ds
Not extracted
That happens because that is an incorrect use of arguments. See the usage details on how to use rom_tool.


Must use the <name>
rom_tool -x <name> text.3ds
but,romtool 2.6
use command
rom_tool -x test.3ds
Can be extracted
That behavior of rom_tool in 2.6 was unintentional. When I extract data I expect to be able to choose the name of output. The behavior of rom_tool 2.7 is aligned with that ideal.
 

chris mather

New Member
Newbie
Joined
Sep 7, 2013
Messages
4
Trophies
0
Age
51
XP
51
Country
I get the following erros when trying to trim from the command line us -t option

[+] Trimming ROM
[!] Invalid File handle
[!] Failed to trim ROM
[!] Failed

-i works fine just seems to be the writing of the file. Admin writes seem fine also.
Any ideas?
 

3DSGuy

No longer in scene
OP
Member
Joined
May 22, 2012
Messages
345
Trophies
0
XP
467
Country
United States
I get the following erros when trying to trim from the command line us -t option

[+] Trimming ROM
[!] Invalid File handle
[!] Failed to trim ROM
[!] Failed

-i works fine just seems to be the writing of the file. Admin writes seem fine also.
Any ideas?
I'm going to need more information than that to diagnose the problem. Where is the ROM on your computer, where are you running rom_tool from, what is your operating system, is is 32 or 64 bit?
 

chris mather

New Member
Newbie
Joined
Sep 7, 2013
Messages
4
Trophies
0
Age
51
XP
51
Country
Thanks for quick reply!!!
Rom is on c:\
Romtool is in same root dir
Os is windows 7 32 bit on mac. (Tried using fusion and a complete reboot into native windows using boot camp)
It may be a mac / pc compatibilty problem but running windows natively using boot camp (should) be exactly the same as running on any window pc.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    LeoTCK @ LeoTCK: hmm