Dolphin, the GameCube and Wii emulator - Forums

Full Version: Custom file extension?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Gideon Zhi

Hi, folks! I've got a question about file types. I've just built a media PC front-ended with GameEx and back-ended with a whole lot of custom programs and batch files that glue the entire thing together. It's controlled entirely with a DualShock 3 (unless I actually need to go into Windows to futz around with things, in which case I have a wireless kb/mouse combo.) The idea is to keep Windows hidden behind GameEx as much as possible, and to that end I've got Dolphin running command-line with game options set up beforehand in the GUI. And I've got GameCube stuff running great! Well, for the most part, but the stuff that doesn't run well (hi, Geist) isn't a back end issue.

My issue is with filetypes. Currently the back end is mostly batch files, and as a result it can't do any deep scanning of file data to know exactly what's what - an ISO is just an ISO, not necessarily a Wii ISO or a PS1 ISO or a SegaCD ISO or... well, you get the picture. Currently the .ISO file extension is attached to the SegaCD platform, with TGCD requiring a cuesheet, PS1 requiring bins, cdis, or imgs, and ps2 requiring .ISO files renamed to .IS2. I _may_ just try changing SegaCD to require something different, but with the exception of the Wii, things Just Work the way they are and I'd like to keep them that way. To that end, I've got my Wii stuff in several ISOs (ripped onto FAT32-WBFS via C-USBL and transferred to my PC via Wii Backup Manager)... renamed to .WISO. Therein lies the problem - loading games into Dolphin's browser seems to be tied to file extensions, and well, Dolphin doesn't know what to do with a .WISO file even though it's just a plain old Wii ISO.

So what are my options here? Can I use WBM to dump the data out of the ISO into folders and run that? I hear CISO support is flakey though these reports may be old; is that a viable alternative? Or is there another extension I can use that Dolphin will recognize as simply being a Wii ISO?

Thanks in advance!
Unless I'm missing your point here, sounds like you just need another file extension for Wii or GC games. You can rename any .iso to .gcm if you need to and have things work normally.

Gideon Zhi

... that... just might work, actually. I was thinking to keep GC and Wii games in separate submenus and have them execute differently, but that _could_ work. I did note that I've got GC games working correctly already! So yeah, I'll give it a shot.

(Will Dolphin complain about Wii games with a .gcm extension?)

Edit: Yes, that seems to have done the trick! Though getting the games to actually play is another issue entirely. But I'll futz with it for a while before making any "augh it doesn't work!!!111oneone" posts.
One of the devs probably knows more about this than I do, but there was this thread discussing a new feature in Dolphin to boot from extracted files. It may be worthwhile to look into, but I'm not sure if Dolphin can do it from the commandline.

If all you're doing is using batch files to launch and controls things on the backend, I think this solution might work, even if it's kinda hack-ish; it's straight forward anyway. Basically what SS said, but I'll elaborate on how it'd work for your setup.

You could have a script detect the file extension, for example, .wiso, and just rename the file (basically removing the w) and launch Dolphin. Once Dolphin finishes, the file could be renamed to .wiso again. I don't know what your batch files look like, but the Windows CLI should let you use "&&" which allows the first command run and then the second command runs only if the first was successful. You could have something like this, psuedo-code of course (dunno a whole lot of Windows batch scripting):

Code:
if something.wiso contains the string ".wiso"

then
rename something.wiso to something.iso && dolphin something.iso && rename something.iso to something.wiso

Something like that should rename the file, run Dolphin with the renamed ISO, and once Dolphin is done, the file is renamed. There's probably a super, better, awesomer way to do it, but that's what I'd do anyway.

Gideon Zhi

Putting aside the simple fact that renaming my Wii stuff to .gcm seems to have solved the problem (at least for now!) your solution is a good one - with the exception that it still doesn't let me load my Wii collection into Dolphin's browser for tweaking game-specific settings. And frankly, that right there is a game-killer :/
What about changing your stuff to not depend on file extensions but to check for the magic byte sequences which tell you that the iso you're looking at is an actual wii iso?
(05-24-2012, 04:43 AM)Gideon Zhi Wrote: [ -> ]it still doesn't let me load my Wii collection into Dolphin's browser for tweaking game-specific settings. And frankly, that right there is a game-killer :/

It should. If you need to change the settings, all you have to do is stop Dolphin's emulation when the game launches from the script, and right-click the game in the browser. Assuming you have the renamed files in your Config->Paths-ISOs, it'll show up. I did something like this on Windows. Basically just stuck these three lines into a .bat file.

Code:
rename "C:\Dolphin\Dolphin-win-x86-r7547\Sys\GC\USA\Wind_Waker.giso" "Wind_Waker.iso"
Dolphin.exe /e "C:\Dolphin\Dolphin-win-x86-r7547\Sys\GC\USA\Wind_Waker.iso"
rename "C:\Dolphin\Dolphin-win-x86-r7547\Sys\GC\USA\Wind_Waker.iso" "Wind_Waker.giso"

If you open up Dolphin normally, it won't see the custom extensions. But using the scripts, it works just fine in my tests. But if renaming it .gcm works, yeah, stick with that.
What about using .gcz specific compress format of Dolphin?