fig2k4 said:
I've just posted version 0.1.5 with FAT32 and WBFS file support. I have tested it a lot and it seems to be working fine. I've converted from WBFS to CISO to WBFS files and loads of different combinations. I checked the .wbfs files byte for byte against the output from wbfs_file using Hxd hex editor's file compare function and the files were identical.
Nice job!
Although I am getting some differences.
I have tried it with wii sports and the n_hd_sec doesn't match, are you calling wbfs_trim(), it should take care of that.
This is hexdump from wbfs_file:
00000000 57 42 46 53
00 13 f0 00 09 15 00 00 01 00 00 00 |WBFS............|
This is hexdump from your manager:
00000000 57 42 46 53
01 18 24 00 09 15 00 00 01 00 00 00 |WBFS..$.........|
Now, if the n_hd_sec doesn't match the file size, cfg loader will refuse to load it, with an error:
hd num sector doesn't match
Also, running wbfs_file on that created file reports this:
wbfs_file.exe i:/wbfs/RSPP01.wbfs ls
hd num sector doesn't match
File size is: 668991488, that is 1306624 sectors, in hex: 0013F000 which you can see in the first hexdump.
The value in your header is: 01182400 which is 18359296 sectors, giving 9399959552 file size, which is of course the full dual layer size that the program begins with.
Also another little difference, but this is not important, it seems you use 0xFF to fill the unused padding (same as wiiscrubber does) while libwbfs uses 0x00, so the resulting .wbfs file differ in this too in the last padding block.
I hope i haven't missed something...