I know this is nothing to do with WWT, but we discussed the 500 game slot limit in WBFS before and thought you'd be interested. I'm posting it here instead of a PM in case sparks interest with anyone involved with cIOS development, since the changes are needed there too for it to work.
I was messing with the CFG source and got it working using a simple solution. It's slightly different to what I have in my own code because there's some limitations, like SDHC is hard coded to use a sector size of 512 etc. My solution will work with that.
I introduced a new "hd_sec_sz_ratio" variable to wbfs.c. This is the ratio between the real sector size and the fake sector size set in the WBFS header. In wbfs_open_partition() it's calculated like this..
CODEÂÂÂÂÂÂÂÂp->hd_sec_sz = 1hd_sec_sz_s = head->hd_sec_sz_s;
ÂÂÂÂÂÂÂÂp->n_hd_sec = wbfs_ntohl(head->n_hd_sec);
ÂÂÂÂÂÂÂÂ
ÂÂÂÂÂÂÂÂhd_sec_sz_ratio=(p->hd_sec_sz)/(hd_sector_size?hd_sector_size:512);
ÂÂÂÂÂÂÂÂ
ÂÂÂÂÂÂÂÂif (!reset)
ÂÂÂÂÂÂÂÂ{
ÂÂÂÂÂÂÂÂÂÂÂÂwbfs_free(head);
ÂÂÂÂÂÂÂÂÂÂÂÂhead = wbfs_ioalloc(p->hd_sec_sz);
ÂÂÂÂÂÂÂÂÂÂÂÂread_hdsector(callback_data,p->part_lba,1*hd_sec_sz_ratio,head);
ÂÂÂÂÂÂÂÂ}
ÂÂÂÂÂÂÂÂ
ÂÂÂÂÂÂÂÂif(!force_mode && hd_sector_size && head->hd_sec_sz_s !=ÂÂsize_to_shift(hd_sector_size*hd_sec_sz_ratio))
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂERROR("hd sector size doesn't match");
ÂÂÂÂÂÂÂÂif(!force_mode && num_hd_sector && head->n_hd_sec != wbfs_htonl(num_hd_sector/hd_sec_sz_ratio))
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂERROR("hd num sector doesn't match");
The default value is 1 and it should be reset to 1 before reading the header for the first time in wbfs_open_partition() too so the header is read with the real hd sector size first.
Every call to read_hdsector() and write_hdsector() then looks similar to this..
Code:
p->read_hdsector(p->callback_data,p->part_lba +(lba*hd_sec_sz_ratio),count*hd_sec_sz_ratio, p->head);
And that's it. What happens is that the read calls will return a full "fake sector" of data for every real sector requested. So with a fake size of 1024, internally libWBFS would use a sector size of 1024 and the file reads would use 512*2.
I've tested a build of CFG and a pen drive with a fake sector size of 1024. I was able to rip a valid game from disc, all games show up fine, the banner music plays and the dol shows up fine in the alt dol selection menu. I then transferred the DVD rip from WBFS to ISO using WBM and ran the game fine in Dolphin.
Right, so here's the big brick wall... I got a bit confused as to why the games wouldn't boot on the Wii from CFG when everything seems to be working. I just found out from oggzee that the cIOS uses it's own version of libWBFS. So all my changes mean nothing because it needs changed in the cIOS too.
I can send the working code from CFG to anyone that's interested. It's really nothing more than what I've posted above, but it could save some time.
Hopefully you're still interested and I'm not just spamming your thread.