gcmtool

gcmtool is the main program in the project. It's used for working directly with .gcm files. To see its full-usage, call it with the -? argument: $ gcmtool -? GCMTool 0.2.4- A utility for working with Nintendo GameCube DVD images. gcmtool.sourceforge.net Usage: gcmtool [ options ] Use -? for extended usage. Options: -e <source> <dest_dir> Extracts the file from <source> (in the GCM) to <dest_dir> (local filesystem)

. . . . . .

Its most basic use, it takes one argument; a gcm:

$ gcmtool d3-thug.iso Filename: d3-thug.iso System ID: G (Gamecube) Game ID: TD Region: E (USA/NTSC) Maker Code: 52 (Activision) Game Name: Tony Hawk's Underground DOL offset: 125760 Apploader: 9280 ApploaderSize: 6452 FST: 3159456 File count: 2165

The first handful of fields are self explanitory. The rest are just for general info if you're gonna do some more low-level hacking.

Basic Usage

Verbose Output

The -v (or --verbose) option is used to enable verbosity. Useful for figuring out what's going wrong or why it seems like gcmtool isn't working right (ie- shows each file as it's being added or extracted).

Listing The Filesystem

the -l option (or --list) will list the filesystem of hte GCM. You can include extra options (such as +i (or --full-info) or +p (or --full-paths) to get even more information about the files). An example:

$ gcmtool --list --full-info d3-thug.iso Filename: d3-thug.iso System ID: G (Gamecube) Game ID: TD Region: E (USA/NTSC) Maker Code: 52 (Activision) Game Name: Tony Hawk's Underground DOL offset: 125760 Apploader: 9280 ApploaderSize: 6452 FST: 3159456 File count: 2165 (2164) / (0) anims/ (25) customparks/ 19145 custom1.prk 15000 custom10.prk 15000 custom11.prk 15000 custom12.prk 15000 custom13.prk 15000 custom14.prk 15000 custom15.prk 15000 custom16.prk 15000 custom17.prk 15000 custom18.prk 15000 custom19.prk
. . . .

The numbers that precede each file are the sizes, in bytes, for files, or the number of children for directories.

Extraction

Files

Now that you can view the filesystem of a GCM, you're ready to extract. You can extract the entire filesystem by typing:

$ gcmtool -e / . some_game.gcm

That will create a directory called "some_game.gcm.FILES" and put the filesystem in there. You can also specify a file or directory in the GCM to extract and where to put it.

Sections

There are several commands for extracting various portions of a GCM, for either backup purposes or to encapsulate your work on them:

-edh, --extract-disk-header [ +f <filename> ] Extract the disk header (boot.bin) -edhi, --extract-disk-header-info [ +f <filename> ] Extract the disk header info (bi2.bin) -eal, --extract-apploader [ +f <filename> ] Extract the apploader (appldr.bin) -ed, --extract-boot-dol [ +f <filename> ] Extract the main executable DOL (boot.dol)

These commands take an optional +f <filename> parameter where you can specify a location to save them. If the parameter is omitted, it uses a default filename in your current, working directory.

See the documentation at gc-linux.org for detailed explanations of said sections.

You may think "Oh man, I can extract a game's DOL?!?! sweet!" but in actuality, it's not very useful. The DOL itself calls on files in the GCM's filesystem, so you can't just use PSUL to load the DOL and play your game. In fact, the game may even seem to start, but hang with a black screen.

Injection

Files

You can't inject a single file due to the sheer amount of data shifting that needs to be done, and there's really no reason to just put one in. Also, it's not like you don't have 2 minutes to spare whilst the thing rebuilds the entire filesystem, so suck it up.

To rebuild the filesystem use the -rfs <path> argument:

GOTTA ADD THIS...

Sections

You can inject several sections of a GCM with the following commands.

-idh, --inject-disk-header [ +f ] Inject the disk header -idhi, --inject-disk-header-info [ +f ] Inject the disk header info -id, --inject-boot-dol [ +f ] Inject the main executable DOL

Currently, you can't inject the apploader due to limitations of the knowlege of GCM files (there's some data that comes after the apploader that may cause strange results if shifted).

Also, newly added to 0.2.4 is the ability to rebuild the filesystem of a GCM. It works by replacing the filesystem in its entirety.

$ gcmtool -rfs some_files my_game.gcm

Good for when you need to modify a large quantity of files, delete files, or add files. Also very useful for reducing the size of a GCM, since it doesn't write all of the zeros that are usually used as padding in retail games. Future versions of gcmtool may support adding the padding.