Preliminary Analysis of gpl files on the Service Disc
After a bit of research on gpl models, I’ve been lead to the Gamecube Service Disc v1.0/03.
Upon analysis of this disc, I’ve found that it contains gpl files created using version 12012000 of the geometry library (same as the Dolphin SDK), as well as version 6012001 (same as A Wonderful Life).
When booting the disc normally, it seems to load the v12012000 gpl files (e.g. disc:/gxDemos/CarDemo/f50.gpl) for the default Car Demo program (disc:/CarDemo/cardemo.dol).
Attempting to Swap Models
However, I can get it to load the 6012001 versions (e.g. disc:/CarDemo/f50.gpl) by replacing the main executable on the disc (disc:/main.dol; naming might vary depending on the tool used) with a special version of the Car Demo program (disc:/ntd/cardemoN.dol).
With this in mind, I should be able to (in theory) replace some of the models in the cardemo with files from AWL.
E.g. If I were to look at bass.arc from AWL, it contains all of the needed files (an act, a gpl, and tpl).
If I were to extract these files and adjust the files on the service disc as follows:
- rename disc:/CarDemo/f50.act to disc:/CarDemo/f50.act.backup
- rename disc:/main.dol to disc:/main.dol.backup
- copy disc:/ntd/cardemoN.dol to disc:/main.dol
- copy bass.act to disc:/CarDemo/f50.act
- copy bass.gpl to disc/CarDemo/bass.gpl
- copy bass.tpl to disc/CarDemo/bass.tpl
It should load the bass model when booting the disc, instead of the default ferrari.
However, it seems that the new model (in this case, bass.gpl) does not load correctly.
I’m not sure why this is currently the case, but I plan on doing some further tests as I can.
Why a lot of AWL models won’t work
A lot of gpl files on the root of the AWL disc (which, it’s worth mentioning, aren’t actually used by the game) don’t seem to be configured correctly.
As an example, let’s look at boy_0.arc.
While this file contains a valid act and gpl, it has 3 seperate texture (tpl) files for the body (b0), eyes (f0_e), and mouth (f0_m).
This is a problem because most gpl files are coded to load one tpl file. In this case, we can open boy_0.gpl in a hex editor and see that it’s supposed to load all of it’s textures from a nonexistent Boy_0.tpl file.
As such, attempting to load the boy_0 model using the above method I tried for bass, will not work. The program will simply give an error “Could not find CarDemo/Boy_0.tpl” and freeze/crash.
Attempting to rename any of the other texture files (e.g. renaming boy_0_b0.tpl to Boy_0.tpl) also doesn’t work, it just causes a crash. This is likely because the elusive Boy_0.tpl file would include all body, eye, and mouth textures in one single tpl file.
More Research Required
I plan on doing more testing with the Service Disc and the CarDemoN program.
There’s also other demos, disc:/ntd/zebraA.dol and disc:/ntd/zebraS.dol, that could be useful for viewing models/animations.
There’s also a program disc:/ntd/preview.dol that might be useful for previewing models.
Hopefully I’ll be able to come up with something over the next few weeks.