Hi
I wasn't aware of a utility that could reverse backwards from a retail Gamecube/Wii DOL to a makedol.exe compatible Gamecube/Wii ELF so I knocked up a quick app that could do just that. Please forgive me if I've overlooked an application somewhere that can do this, but I'm not aware of one. I am aware of DolTool v0.3 by loser but the ELFs that it outputs from the input DOLs are not compatible with makedol.exe due to ELF header incompatibilities.
I had a quick look at the headers for both DOL and ELF and created this converter. The output, when run back through makedol.exe (of the 20 or so Gamecube/Wii DOLs that I've run through it), is an exact binary image of the original DOL. That's not to say that it will work with every single retail DOL out there but if you come across one that doesn't recreate back to a binary image of the original DOL after being converted to an ELF by this app then I'd like to know. The ELFs that this produces can't be loaded into CodeWarrior as the ELF header isn't fully recreated enough for that, but they are sufficient to run through makedol without it kicking up a fuss.
I fully admit that the code isn't pretty but it does what it needs to do, I only spent an hour or so on it after studying the ELF/DOL file headers. Maybe someone who can actually code (as opposed to me!) can wrap this up into a nice drag-n-drop GUI app where you can simply drop a DOL onto the application icon and it'll pump out a makedol compatible ELF without any command line intervention. As is this should compile on any OS into a command line app without problems as it only uses standard C library functions. It's set up to work out of the box on a little endian architecture so if you're planning on using it on a PowerPC based Mac or something similar then you'll need to exercise caution with the endianness.
So, what can you do with the output ELF after you've converted it from a DOL? Well if you've got a DDH/GDEV/NDEV then you can rip one of your retail purchased games to a folder on your dev box/PC and then execute the loadrun/odrun/ndrun script, as applicable (after setting your DvdRoot environment variable to the folder of the ripped game) to run the game from the folder. The loadrun/odrun/ndrun script will call makedol to convert the ELF back to a DOL and then run the game. The benefit of running retail games this way, instead of running them via a GCM/RVM is predominantly in disk space reduction (i.e. Luigi's Mansion is just less than 200Mb when run from a folder vs 1.35Gb when run from a GCM). Don't blame me if you waste away hours of your life playing retail games on your DDH/GDEV/NDEV when you should be spending the time developing games on said hardware instead! With this you'll also be able to create RPF (Revolution packed file) and RVM (Revolution master) from retail games for your NDEV as both rely on the DLF which is generated after executing the ELF for the first time.
I'd be happy to help anyone who's struggling to get this working. I provided this utility in source format as I figured anyone who would use it would have a dev environment set up already.


Reply With Quote


Bookmarks