I have been extracting main.dols from WBFS files with Wii Baclup Fusion. The process is to extract the entire WBFS but because the main.dol is one of the first files to get dumped (besides the Update folder) you only nees to wait for a moment, no more than 300 mb extracted at most.
I am so glad you mentioned Wii Backup Fusion as I saw it uses cygwin1.dll to run wit.exe silently at the command line, which will now allow me to make a GUI tool to automate the vfilter patching. i.e taking an iso/wbfs as an input file, and output a patched [GameID].dol onto SD/USB for use by USB Loader.
Wit.exe is Wiimms ISO tool which can extract single files from wbfs/iso files, such as main.dol. It even works for GameCube games! Sidenote: I am confident to patch the deflicker out of Starfox Adventures, as I saw its main.dol contains the same vfilter used by Mario Kart Wii.
To extract main.dol:
Code:
wit extract --source "c:\my games\game.wbfs" --dest "c:\destination folder" --files +/sys/main.dol --overwrite
How I envisage it will all work
A database of game ID's and their known filters will be kept in the cloud, eg. Pastebin (I have already set this up).
We currently have the following entries:
DonkeyKongCountryReturns,NTSC-U,SF8E01,04041010100404
MetroidOtherM,NTSC-U,R3OE01,08080A0C0A0808
MarioKartWii,NTSC-U,RMCE01,07070C0C0C0707
MarioKartWii,NTSC-U,RMCE01,05050F0E0F0505
SonicColours,NTSC-U,SNCE8P,04040F120F0404
SuperMarioGalaxy,NTSC-U,RMGE01,20002000000000
SuperMarioGalaxy2,NTSC-U,SB4E01,20002000000000
Ntsc480Prog,,,00001516150000
Ntsc480ProgSoft,,,08080A0C0A0808
Ntsc480Aa,,,04080C100C0804
If you come across a game which doesn't use any of the above filters, my tool should be able to find it by its search patterns. Currently it is capable of finding vfilters for Donkey Kong, Sonic Colours, Mario Kart and Mario Galaxy just from looking at byte patterns. In addition to this it will also match filters from the pastebin.
Every time someone finds a unique vfilter which isn't in the pastebin, they should add it to the pastebin. Over time we should have enough vfilters that the majority of games should be easy to patch.
USB Loader GX integration
This appears to be achievable by USB Loader scraping the game's filter from the cloud and patching it with its
Search_and_patch_Video_To function.
If a game isn't in the cloud, it is still likely to work by patching instances of commonly used ones that are in the cloud. The probability of this working will also increase over time as there will be enough known vfilters that one of them is likely to match the one used by any game.
Timeline
I am aiming to have something ready in the next 10 days or so. I need to spend a lot of time making sure my patching function uses all the correct offsets and doesn't corrupt any data in main.dol. This will probably take a couple of days to iron out any bugs, then I can get started on the GUI. I am writing it in Autohotkey which makes it a little bit difficult as its internal handling of integers can be a bit unpredictable at times.