Dolphin, the GameCube and Wii emulator - Forums

Full Version: How do I get ID6 from a gamecube gcz file?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Beeman

How do I get ID6 from a gamecube gcz file?: I will wade through the source if I have to. I've been searching web + on here for an hour, cannot locate. iso/wbfs are easy but gcz? TIA
GCZ is a compressed format that Dolphin uses. You could decompress the images and then obtain what you want.
Yeah, you would basically need to implement support for the whole format in order to be able to get the game ID. You can find the source code for Dolphin's GCZ support in this file: https://github.com/dolphin-emu/dolphin/b...edBlob.cpp

Beeman

Yes, I had a look at that file last night. I had tried to use WIT, but realised Dolphin uses a proprietary format. I also considered reading the dolphin\user\wx_gamelist.cache file but that would require Dolphin to have been already run against the folder. I also looked into if Dolphin had any command line options to spit out this header info instead of running the game, I don't suppose that would be something that might be considered worthy of being added? The routine to generate wx_gamelist.cache could be reused.

I think I'll have a quick go at reading the wx_gamelist.cache into a hashfile, that seems most promising angle for now, format looks a bit propriety (shame not xml, serialized class maybe?) but the text is in there and looks quite regex'able. I'll be renaming them with the ID in anyway so then no problem.
GCZ is supported by wit as far as I know. In fact, I think wit supports every disc image format that Dolphin supports, except for TGC.

As for adding a command-line option to Dolphin, I'm not sure if there's enough interest for it. Programs like wit can already be used for things like that.

The format of the wx_gamelist.cache file changes between versions of Dolphin, so I would recommend not relying on it.

Beeman

Code:
C:\Program Files (x86)\Wiimm\WIT>wit ID6 "G:\emu\Media\Nintendo GameCube\Roms\Animal Crossing (USA).gcz"
!! wit: ERROR #30 [WRONG FILE TYPE] in SourceIteratorHelper() @ src/lib-sf.c#603
!!      GameCube or Wii ISO image expected: /cygdrive/g/emu/Media/Nintendo
!!      GameCube/Roms/Animal Crossing (USA).gcz


WIT doesn't seem to like with Dolphin gcz files. I googled it and others have same issue.
Hm, you're right. Now that I try it, I get the same error...

Beeman

OK I read in and regex parsed wx_gamelist.cache, lots of hoops to jump through to make it fast with lots of entries but got there in the end. Hopefully the regex will survive wx_gamelist.cache file format changes between versions of Dolphin, if the format ever changed to xml that'd be handy. Yes "MaxPlay Classic Games Volume 1.gcz" did catch me out! Smile

Thanks for your help
(05-02-2018, 08:15 PM)Beeman Wrote: [ -> ]Hopefully the regex will survive wx_gamelist.cache file format changes between versions of Dolphin

Maybe it will, but it's not really something that can be relied on...

Also, just so you know, the name of that file has been changed in the most recent development version.

(05-02-2018, 08:15 PM)Beeman Wrote: [ -> ]if the format ever changed to xml that'd be handy.

I don't think it will. We want it to be fast to parse, and even if it wasn't for that, XML isn't exactly our favorite format.