Retail Serial Console Output Using Dolphin

As a follow-up to my previous post, I’ve now figured out how to view serial console/debug output using Dolphin (fan emulator).

This can be enabled by toggling the View -> Log and View -> Log Configuration options. Then, enabling OSReport in the Log Configuration.

Console output will appear in the Log tab.

I tried running some of the problematic gcm images I created from Previewer + GPL models from AWL (version-modified), and got the following output:

(wildplant.gpl) doesn’t match standard 8.3 format.

The error above is likely due to a long filename (wildplant). Early computing systems used a standard known as 8.3, restricting filenames to 8 characters or less, followed by the file extension. Since this file is used in the game, I presume that the notification was fulfilled and the restriction was removed in a later iteration of the Dolphin Character Pipeline.

I tried a few different files with shorter file names. However, they all also gave errors.

Unknown state setting for Display Object

It’s difficult to know what is causing the above error, but my best guess is that, since AWL was presumably built using an updated version of the Character Pipeline, it uses certain settings for gpl models that were only supported by the updated version.

If these findings are correct, then the models from the game could only be viewed using an updated build of Previewer from a newer version of the Character Pipeline. I’ll do some digging to see if I can find anything.


On a related note, now that I know about the Dolphin log feature, I’m going to try playing through some of AWL and AnWL to see if the games happen to have any serial console output as part of their code.

Huge thanks to Video James (sonic15783)#6150 on the Discord! This wouldn’t be possible without him!

Windows-Compatible .gpl Models

After having success exporting 3DS Max projects to gpl format, I decided to dive further.

The Dolphin Emulator e28 from the Gamecube SDK comes with a modified version of the 3DS Max plugin CPExport. This new version, called MaxConv.dle, is capable of exporting little-endian files.

I exported the Zebra demo from 3DS Max using the new plugin.

I opened up previewerD.exe and it was actually able to load the newly exported gpl.

Tiny .gpl zebra, now on Windows!

I was even able to navigate the previewer (somewhat) using my Logitech F310 controller. With that said, only some of the buttons would work:

  • Primary stick (mapped to my left analog stick)
  • Trackball/light control switch (mapped to Y on my controller)
  • Zoom out (mapped to A on my controller).

Most notably, the zoom in function is not working with any of the buttons on my F310.

I’ll try my controller with the iBook to see if it works. I also have a USB PlayStation 3 controller that I’ll try out on both the Windows and Mac versions of Previewer.

Even though it seems helpful to have models opening on the Windows version, it will only accept custom-exported gpl files. I might try looking at the gpl files in a hex editor to find exactly how the data is organized compared between Windows (little-endian) and PowerPC (big-endian) versions of the plugin.


Update: If I unplug my controller, the emulator defaults to keyboard controls:

Key Controller
Arrow keys Main Stick
`A’, `S’, `D’, `W’ Sub Stick
NumPad 2 A button
NumPad 4 B button
NumPad 6 X button
NumPad 8 Y button
NumPad 7 Trigger Left
NumPad 9 Trigger Right
NumPad 0 Menu button

This means that we can finally zoom in on our model using the Windows previewer (provided that the gpl file has been exported as big-endian).

Not-so-tiny zebra

We have Zebra!

A while back I tried running a program called previewer for viewing .gpl files (3d models).

There was a version of this program compiled for classic Macintosh computers. Since these computers (notably the PowerMac G3) had similar internal architecture to the Gamecube, they were used as testing environments for some areas of Gamecube development.

I had set up an emulator called SheepShaver so that I could try running the program. Unfortunately, SheepShaver (and all other modern classic Macintosh emulators) lack support for hardware-accelerated graphics. The lack of hardware-acceleration means that the previewer would not render correctly and would just lead to an empty black box.

I emailed around to a few used computer shops and managed to snag an old iBook G3 for $50.

The leaf fell off and the battery’s dead, but it still works just fine (when plugged in).

After setting it up with a copy of Mac OS 9.2.2, I was able to try launching the previewer program once again.

Unfortunately it got hung up a few times when trying to render some gpl files from the SDK.

Fortunately. I was able to open one of the 3DS Max projects included with the SDK. Special thanks to Video James (sonic15783)#6150 on the Discord for helping me get a copy of 3DS Max 3 up and running in my virtual machine!

Zebra.max in 3DS Max R3 3.0 in my Windows XP virtual machine

I was then able to export this from 3DS Max to a .gpl file using the cpexport.dle plugin included with the SDK Character Pipeline.

I tried previewing the gpl on the SheepShaver emulator (just to check if it was the emulator causing issues). Sure enough, I got the notorious black rendered screen.

Black screen render in SheepShaver

I tried viewing it on my iBook and, to my surprise, it rendered!

We have tiny .gpl Zebra!

Unfortunately the program freezes after this point and I have to force it to quit. This could be due to a number of reasons:
– The program might require a controller to function at all when something is rendered
– The laptop might not be powerful enough to do anything else once the model initially renders (doubtful)
– The program might be designed to function minimally in a mac test environment
– Something else

If anyone has a classic mac and would like to try out the Zebra demo, I’ve created a disc image [download]. Just burn the image to a CD and put it in the mac, then copy previewerD.bin to your Desktop and double-click to extract the program. Then, just double-click the newly extracted program to load the demo.

At this point, it’s a lot better than nothing.

I’ll try out some Harvest Moon gpl files over the weekend and see if I can get anywhere, of if I just get more black screens.

An update on the Windows version of “Previewer”

After setting up a full software development environment in a Windows XP Virtual Machine using a combination of Visual Studio 6.0 and software from a recent AssemblerGames dump, I was able to make some progress with the SDK files.

I managed to delete the version-check code from C:\pcemu\build\charPipeline\geoPalette\src\geoPalette.c (a module used when previewing gpl geometry files).

I was then able to recompile geopalette.obj and charpipeline.lib (using the newly modified geopalette.c code) by opening C:\pcemu\build\charPipeline\win32\makeall.bat.

Once those were created, I could finally rebuild Previewer.exe and PreviewerD.exe (debug) by running the makefile located at C:\pcemu\build\demos\charPipeline\pcmakefile.

This means that the program will bypass the previous version mismatch error I was getting.

However, the program still will not actually load the model, and will crash shortly after displaying the “Loading” message.

After looking at the documentation that came with the SDK files, it seems that this issue is because the Windows version of Previewer needs gpl files exported specifically using little-endian, as opposed to big-endian (typical format for exporting for Gamecube/Mac test systems).

My best bet at this point would to continue my search for an OS 9 mac that I can run further tests on, or to find a way to convert the big-endian gpl files to little-endian for viewing on PC.

A Windows version of “Preview” existed this whole time!

After some digging around in the Dolphin/Gamecube SDK files I had, I’ve discovered that there was a version of the “preview” program (for viewing .gpl 3D models) for Windows this entire time!

I feel like an idiot for somehow not noticing this sooner.

The app launches just fine. Unfortunately, I got a version-mismatch error when trying to load any actual files (including the examples that came with the SDK).

With that said, the source code for the program included with the SDK. My plan of action right now is to try removing the version-check code, then recompile the program.

If this works, we might finally have a way of viewing 3D models from the game, without me resorting to trying an old 90’s-era Macintosh.

Getting Closer to 3D Model Previews

Namely, there was a “previewer” program compiled for old macs (old macs used a PowerPC architecture, similar to the Gamecube and Wii)

I’ve been fiddling around with some of the files from the Dolphin SDK.

I had tried running this before, but got stuck on the program looking for a “prevload.txt” file in a specific directory.

After some digging around in various documentation and script files, I finally figured out what I needed to do.

The program looks for an inserted disc with the volume label “cp”. It then looks for the folder “cp:/cpdata/preview/”. This folder must contain the file to be previewed (in this case, Zebra.gpl) as well as a text file called “prevload.txt” (which just contains the name of the file to be previewed).

With all of these conditions met, the program should display the requested file.

Unfortunately my virtual machine setup seems to freeze (or in some cases crash) at this point. This seems to be an issue with SheepShaver not supporting 3D hardware rendering.

Ultimately, the next (and only) step to get this software running would be to try it out on a real old-school mac. And even if that works, I’m not sure whether I’ll be able to navigate the program (since it seems to use some sort of game controller).

As always, I’ll keep you all updated.

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.

A Brief Update

Sorry for not giving many updates about my Harvest Moon mod lately.

I’ve been busy with apartment hunting/packing/moving for the last couple weeks. So I haven’t had much time to work on it.

Right now I’m trying to look at getting some tools from the Nintendo Gamecube/Dolphin SDK to run so that I can try working with some of the gpl (model) / anm (animation) / act (actor) filetypes found in the game files. So far my efforts have just resulted in crashing, freezing, or blank screens.

I’ve tried making posts on the /r/wiihacks and /r/gamecube subreddits, but haven’t had much luck yet.  I might try making some posts on a couple forums like gbatemp or assemblergames to see if anyone has had much luck working with the sdk and it’s tools.

I also haven’t figured out why AnWL is crashing around Gustafa, but I’ll be looking into that further once I’m able to. For now, I’ve been able to get around it by playing through any Gustafa-related scenes using the original AnWL game, then switching back to the modded AnWL once the scene has been dealt with.  This could prove problematic though as it would be a hassle for any players wanting to marry Gustafa.

I still haven’t been able to find out where the female model and face textures are, the two games seem to have some differences in how they store the files.  I might see if I can find some sort of debug/log tool to see which files being accessed when Dolphin (the fan emulator) renders the textures.

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.