Endian Differences between the Gamecube and PS2

Upon review, it seems that the Gamecube primarily stores data using big-endian (a type of data encoding), whereas the PS2 primarily stores data as little-endian.

This means that some game data (e.g. dialogue files) might appear to have their data “flipped” when comparing the GCN and PS2 versions.

As an example, a section of data might be “cdc3b0b0” for a file in the PS2 version, but “b0b0c3cd” in the GCN version.

This means that certain files were re-encoded when the game was ported to the PS2 to avoid them from being read as corrupt.

Shoutout to Dahni in the Discord chat for making this discovery.

It’s unclear at this time exactly which files were re-encoded. It seems that dialogue files were altered at the very least, but this could extend to other file types (textures, models, etc).

With that said, I’ll be focusing exclusively on the GCN versions of the game files to prevent any confusion of endian encoding going forward.

SDK Software

I managed to figure out some of the software from the Gamecube SDK.

It looks like some of the SDK includes binaries built for the legacy mac platform.

Old Macintosh computers used the same PowerPC architecture (as opposed to other computers that used the Intel x86 architecture) as the Gamecube. This means that running software for the Gamecube would require either the actual dev kit hardware (known as HW1 or HW2), or a Mac.

There was also the official Dolphin emulator (not to be confused with the current fan project Dolphin Gamecube/Wii emulator), but that could only emulate certain aspects of the hardware.  You’d still need a mac or dev kit to run most things.

So, after some trial and error, I managed to get an old copy of Mac OS 9 running in a virtual machine known as SheepShaver.

I then got the preview program (an app from the SDK to view the character models/textures) to extract and open.  But when trying to run it, it fails after saying a needed file (prevload.txt) couldn’t be found. Documentation on getting this to run is sketchy at best.

I’ll need to do more digging to figure out the full configuration needed to get the app to run.  I read something about setting “CP_Root environment variables” in the SDK documentation, so that might be my next step.

I also tried getting my hands on a trial copy of 3DS Max (the software used by devs to create models). But then I found out that 3DS Max Plugins are version specific, so I’d need the old 3DS Max v3.1 to use the Gamecube plugins from the SDK to import/export models. And this will likely also require I use a virtual machine with an old version of Windows (e.g. Windows 98) to run it.

One step forward, two steps back.

Exploring File Formats

After scouring the internet for any documentation on the file formats used for the character models (namely the .gpl files) I’ve found the one (and seemingly only) source of information.

The Documentation for the official Nintendo Gamecube SDK / Character Pipeline / Dolphin Emulator

There are some executables included with the sdk that enable previewing of GPL (geometry), ACT (hierarchy), ANM (animation), SKN (skinning information) and TPL (texture) files. However, it seems that these require some sort of PowerPC configuration through either the dolphin development hardware or an old powerpc mac. There is a previewer.exe in the sdk, but I haven’t been able to get it to load a gpl without crashing so far.

Honestly my best chance will probably be emulating an old build of Mac OS X (e.g. 10.5 Leopard) and trying to load the preview scripts on that platform.

I will post back with my results.