1.4 File systems and operations

This section will detail the tools and general methods of operation of said tools to pull apart/unpack/extract ROM images. It will probably also be the only section to cover systems other than the GBA and DS in any real detail. The general form of this section is device name, name of method by which hacked code can be run and whether it can be emulated, the names/extensions/types of binaries, any hardware documentation and finally techniques to parse file systems. For additional information or information on systems not covered here then the main sources of hardware information and such like are typically homebrew developers, those wishing to run various flavours of Linux on consoles and emulator authors.

1.4.1 Non filesystem devices

Method - usually flash carts of various forms which may not exist in an up to date form or be quite expensive if they do exist. Emulation is usually available and very high grade if you want it to be and beyond that everything up to the late 16 bit era and slightly beyond can usually be emulated on newer consoles and handhelds at some level.

As the GBA is a focus of this guide it gets a proper section but in general devices that are older than the DS or do not use optical media will tend not to have a filesystem, this means you get to employ various techniques covered in the GBA section below. They are frequently directly accessible in memory but other than the GBA often have quirks you have to address (mappers in the NES, hirom and lorom in the SNES and Memory Bank Controllers on the original gameboy and GBC). It should be noted that these quirks often afford serious extra capabilities but as well as being hard to deal with they are often extremely difficult to add or remove from a game.

Today other than the GBA you will tend to only encounter a lack of a filesystem when editing the executables for things (although that is not a certainty) and if you get into editing the security/secondary processor/hypervisor programs for the consoles (things like IOS on the Wii and security code for the PS3 Cell coprocessors).

romhacking.net maintains a database of hardware information for older consoles and some newer ones. You may also like infrid.com for the N64.

1.4.2 GBA

Method - flash cart or emulator.

The GBA is self contained but the executable location (or start thereof and start of the useful stuff) is easily found.

GBAtek and CowBite are usually considered to be the top hardware documents, some more specific documentation for certain hardware areas like the audio setup also exists.

Aside from some homebrew the GBA does not really feature a file system meaning there is not really such a thing as exploding the ROM image into a group of files it is composed of. There is an advanced technique known as tracing though that can find where any data is located in the ROM and a handful of simpler, though sometimes less effective, variations on the theme (BIOS SWI call logging and pointer field searching) that will be covered in the appropriate sections.

Some tools like those seen in Atrius’ Golden Sun editors contain searching routines for subfiles, compression can be searched for with various tools, the GBA “sappy” audio format such that it is can be detected in some cases and more general tools for games like Pokemon will also contain a listing of the location of various game components (or the things that point at them) as might some other games. Other than flash carts, some undumped ROM images (full length videos) and some of those 30 in 1 carts you find in tourist traps the whole cart is visible in memory at all times and that means the space limit is 32 megabytes.

1.4.3 DS

Method - flash cart or emulator. DS and DS lite run GBA code natively if you have a GBA slot cart.

The executable formats for the DS are ARM9, ARM7 and overlay files that usually come with the extension .bin and sometimes SRL.

GBAtek is the main reference document for hardware for the DS.

NDStool

NDStool on filetrip Command line and very quick and easy but fails to rebuild certain ROM images properly (most still work).

Nitroexplorer

Nitroexplorer filetrip Built to make up for shortcomings in NDStool methods. Short of manual editing the go to tool for most.

NDSTS

No-Intro tools page Able to extract files and insert files of the same size (you can pad them if you want), if it crashes when you have edited it where it worked before with this then it is definitely your fault.

Crystaltile2

Crystaltile2 filetrip Able to parse the DS file system as well as extract individual files. Support at this level for compression as well as certain container files as well as support for all sorts of known formats and additional functionality. Click the DS icon on the the icon bar to open the viewer.

Tinke

Github link A tool similar in capability to Crystlatile2 and also supports decompression of files, in ROM and extensive support for other formats.

The DS filesystem is well known and well understood so you have many more options here, indeed it is usually the first feature aspiring DS ROM editing tools gain. DSi compatible games can usually be parsed by standard tools and DSi specific code should now have relevant keys to help things there although it can not really be run. Most games will have archive formats for a handful of files stacked on top but a handful of DS games have been observed to use large single archives for all or most of their files with the files not put into the archive usually being download play components, sound or video.

Most usage will be covered or fairly obvious save for ndstool which has a basic extraction command like

“ndstool -x *.nds -9 arm9.bin -7 arm7.bin -y9 y9.bin -y7 y7.bin -d data -y overlay -t banner .bin -h header.bin”

Replace the -x with -c and the .nds with a valid name and you can reconstruct a ROM. NDStool is not that useful for end stage hacks but quite useful for quick tests. “ndstool -l .nds” will make a file listing of the files inside a ROM and their locations.

1.4.4 3DS

Various hacks, though things are frequently in a state of flux as it is a modern system that can be updated. Trend is towards custom firmwares, though flash carts also exist. Decryption of whole games is possible, see XORpad and such like, and may have standalone methods before long. Decrypted ROMs may be avaialable online and some files can be obtained from memory dumps.

Running modified code is well within the scope of the hacks capable of running copied versions of the games.

3dbrew is the main documentation on the 3ds hardware. A quick overview says it shares a lot of its history with the DS but it is also somewhat closer to a full modern computer architecture (hypervisors/kernels, segmented memory and the like), also features an opengl like implementation of 3d.

1.4.5 GC (gamecube)

Method - mod chip and miniDVD/modded case and regular DVD, SD loader, IDE adapter. Emulators demanding but viable.

boot.dol is the main executable format.

Hitmen YAGCD is generally considered the better gamecube hardware document.

GC tool

GCM utility(mainly multiboot rather than iso handling).

Gamecube ISO tool

1.4.6 Wii

Method - Softmod loading from external USB. Modchips and some softmods support gamecube. Emulation demanding but viable.

Wiibrew houses the main collection of hardware information and information on software internals although there are others that move more into formats and editing of internal software.

.dol is again the main format although ELF appears in homebrew.

Wii games and files come in two original flavours and one used by some iso loading types.

Discs Several tools available but Wii scrubber will be the method of choice here

Wii scrubber filetrip download

You might however also consider Wiimms ISO Tools for a nice command line alternative and support for some of the custom formats that became quite popular on the Wii.

Virtual console and Wiiware aka WAD files Not to be confused with doom wad files.

One of the former tools for this was WWpacker but better examples exist in

libwiisharp example binaries. Simple tools but can unpack things well.

showmiiwads. A GUI tool featuring the ability to unpack wad files and deal with common things done to the files they contain after that.

Many titles also nest things in a format known as u8 (and often combine it yaz0 compression) but both of those tools can extract, decompress and deal with that as well.

https://github.com/BtbN/libwiisharp

showmiiwads github page

HDD Most people do not use whole iso images or the minor tweaks to them any more and will instead use a USB hard drive and maybe a custom format. These come in various formats and layers of support but WBFS is the main method that is often stacked on top of FAT or NTFS filesystems. Wiimms ISO Tools linked above have a measure of support for some of this.

1.4.7 Xbox

Method - Softmods and hardmods both using minor variations on the idea of internal hard drive or copied DVDs. Emulation not really game playing grade for most things but getting better, the 360 does feature a measure of hacked xbox game support when properly hacked.

The executable format for the 360 is xbe files.

As with most things here there are several options although three go head to head here.

C-Xbox tool

Qwix

Craxtion

Filetrip download (all three)

1.4.8 Xbox 360

Method - no real softmod. DVD mod (does not allow altered games, XBLA or DLC unless combined with one of the following methods), JTAG (required older hardware) and RGH (can be done on most hardware though later updates can be harder to work around) lead to onboard and USB loading. Emulation nowhere near.

Free60 features a lot of hardware information.

Xbox 360 games come in two broad flavours with a third method mentioned. The executable format for the 360 is .xex files. These can be extracted further (they are based on the Windows PE/portable executable format used in exe and dll files).

Xex Xextool and xextool GUI are tools that can help here. They can unpack the format, apply various patches both to the files themselves and apply the title update patches.

Xextool filetrip download

XextoolGUI filetrip download

Discs Various programs will extract things, including the ISO checking tool known as ABGX360, but many are unwieldy so e-xiso is the main go to method.

Extract xiso homepage

Filetrip download

GOD and NXE/hard drive installs have come from discs and have but a few bytes difference between each other. They can be made back into more or less unusable isos with GOD2ISO.

XEX files are the binaries of the 360, there can be several. Patches exist in the form of title updates and can be applies to the XEX files if you really want.

XBLA/DLC PIRS, LIVE and CON. PIRS are signed by MS and can be installed on any 360 without issue. They are mainly sourced from Bethesda game of the year and Borderlands double pack games but there are several more.

LIVE is the format of XBLA and DLC. XBLA demos are full games but a little string is swapped to allow play of the full one (naturally this breaks signing and needs a developer or JTAG/RGH box to run it).

A related set of formats and usually handled by all the same tools. Le Fluffie is one of the main ones.

Le Fluffie download page

Filetrip download

USB Not really a format but one of the main methods of access so it is noted. Later in the life of the 360 Microsoft added support for a custom USB format (in practice it was a reserved section of a USB drive). XTAF.

Supported by several tools but USBXTAF is the main method.

Filetrip download

1.4.9 PS1 and PS2

PS1 - modchip. Emulation available for many years, though can be tricky if you venture into the often superior plugin based emulators.

Playtown has a lot on the PS1 (mainly in Japanese). The romhacking.net link from other systems has a bit of information and psx.rules.org has some more.

PS2- modchip and some softmod driven network/USB loading possible. Emulation demanding but viable.

philvaz.com has some good information on the graphics hardware and some internals. scee.net (warning PDF link) has a nice introduction as well.

ISO 9660 was for many the order of the day but later games on the PS1 and many on the PS2 added a dummy setup to that and instead made a new filesystem later on and/or read addresses directly from discs.

For the most part the PS2 was also a standard iso 9660 image that countless tools from the likes of 7zip upwards can open but certain games (most notably Square Enix games for music) used raw LBA reads or a custom file system to read certain parts of the iso images in question. There are a few tools that attempted to detect the signature of the music files and occasionally within the whole image.

LBA reads were also used in anti piracy protection for many of these games.

Both use a version of the executable formats known as ELF as their executables.

1.4.10 PS3

Method various- softmod (maybe with hardware trigger) leading to USB and hard drive loading. Emulation nowhere close.

Technically the PS3 uses a version of ELF for the executables.

ISO

PUP files (updates)

DLC and PSN content.

1.4.11 PSP

Method - softmod loading from memory card (official Memory Stick PRO Duo or microSDHC adapters available) or loading from onboard storage (PSP Go). Emulation more possible than before but undeveloped compared to many other systems.

PSP MIPS R4000 processor (warning PDF) is a system developer level breakdown of the PSP processor.

Executable format pbp format (usually called eboot.pbp).

There are a few tools here but UMDGen is the dominant one and there is little reason to use another. It supports extraction, insertion of any length, rebuilding the file locations table and relinking files as well as creation of compressed images.

Filetrip link

1.4.12 Saturn

Method- Modchip for the most part. Emulation surprisingly good, though the architecture of the Saturn means emulation is demanding for the relative age of the system.

Yabause (one of the more popular emulators for the Saturn) has a fair bit of hardware information.

A slight variation on the iso format although doable with standard tools.

Guide involving the manipulation of saturn files

1.4.13 Dreamcast

Method - Simply insert copied disc or use a disc loader known as “Utopia”. Emulation not bad for some games.

Disc image handling varies. CD burners were a new concept when the DC was released and there were lots of competing formats for optical media, you will then want a standard iso tool to explode it into the component tracks (the good stuff is typically the third track onwards). The tracks function more or less like standard isos, save for the fact that they are offset and most normal iso tools can not handle this as is. Fortunately Iso LBA Fix (isofix) by DeXT exists and will change the LBA to start from zero at which point everything will handle it.

dextremes.com has links to some information.

1.4.14 Amiga

Method - copied discs. Emulation well developed.

ADF images are the most common (ADZ are just zipped versions of ADF) but being sourced from floppy discs they tend to have a filesystem.

amigadev has a lot of top quality information.

UnADF should allow you to unpack ADF images.

Unadf homepage

Filetrip link