I've made some progress on finding how to make wiiflow interact with sorg's di module with wbfs support. Basically all that needs to be done (seemingly) is delete the cache.dat and state.dat from titles/00000001/00000002, and write a diskmap.sys with the information necessary for the di module to mount the disc. Ive been testing and manually checking values, and I've almost figured out the format for the diskmap.sys file:
0000-0007 is usually 00 00 00 01 00 00 00 01 - will do more testing soon but i believe the numbers are references to number of fragments/files.
0008-2007 are bytes 300-22FF of the wbfs file itself
2008-200B i believe is the offset to the file on disc (which I have no way to figure out or check. Any ideas?)
200C-200F is the size in bytes / 512 (number of sectors?)
2010-2013 is 00 00 00 00 (end of file?)
like i said more testing to do to determine exact format and what actually happens when files are fragmented or split, but this is a good start.
now i just need to know some isfs commands to test writing values and reading them from the files, to see if this actually does work.
quick update before bed:
tested uniiloader mounting gh 5 which was in 5 parts, one of which was fragmented. results supported my theory.
byte 07 was 6 (5 parts, one in 2 fragments = 6 fragments)
then from 2008 onwards had:
2008-200B was 1D CF CE A7 (offset for start of file .001)
200C-200F was 00 20 00 00 (size of .001 - 1 gig)
2010-2013 was 1B E2 54 27 (offset for .002)
2014-2017 was 00 20 00 00 (size of 002 - 1 gig)
2018-201B was 1C 02 54 27 (offset for .003 (exactly 00 20 00 00 more than .002, makes sense some parts will be together on disk)
201C-201F was 00 20 00 00 (003 - 1 gig again)
2020-2023 was 1C 22 54 27 (.004, again exactly 1 gig past previous)
2024-2027 was 00 19 79 80 (.004 was fragmented, this is size of first fragment)
2028-202B was 1D C9 18 27 (offset for second fragment of 004 - completely different area of disk, makes sense)
202C-202F was 00 06 86 80 (004 size second fragment, note this + size of first fragment = 00 20 00 00 = 1 gig)
2030-2033 was 1D CF 9E A7 (005 offset = last offset + last size again)
2034-2037 was 00 00 30 00 (005 size, last part of disc image)
2038-203B was 00 00 00 00 (escape sequence for end of file listing i believe)
hopefully this made some sense, but basically it means i now know how uniiloader mounts the discs with sorgs di using wbfs, so i just need the programming to do so, as Ive mentioned I barely know c++ and only bought a wii 2 months ago so don't have the skills myself.
basically need:
if (cache.dat exists) delete
if (state.dat exists) delete // not sure about this, but i did it anyway while i was testing
if (diskmap.sys exists) delete
create diskmap.sys
write 00 00 00 01 00 00 00
int i = 1
while
{
if exists *gamename*.wbf"i" i++;
else break
}
write i to 0x07
read bytes 300-22FF from wbfs file
write to bytes 0008-2007 of diskmap.sys
for (int j=0; j