What was the point of the WBFS file system?

Discussion in 'Wii - Backup Loaders' started by leafeon34, Jul 25, 2017.

  1. leafeon34
    OP

    leafeon34 My profile picture is ugly

    Member
    7
    Sep 30, 2014
    Greece
    Elysium
    Back in 2009 in the really early days of USB loaders we didn't load a .wbfs file from an NTFS or FAT32 formatted hard drive. We had to format an entire portion of a hard drive to WBFS (Wii Backup File System). USB loaders have undergone huge improvements in the last 8 years.

    But I beg the question, was there any point to the WBFS file system in the first place? As far as I know it was just Waninkoko trying to fuck with the scene. Something he did very well if you read through some old hackmii posts.
     
  2. BlackWizzard17

    BlackWizzard17 Don't worry Captin we'll buff out those scratches.

    Member
    7
    Dec 1, 2012
    United States
    E-Arth
    My guess would be easier to handle. Less of a Hassel to format your USB drive.
    Also improvement to these loaders also allowed your SD card to load games and still be supported by the wii it's self with FAT32.

    Of course you could probably have a loader that reads an .iso file but the .wbfs seems to shave off any extra unused disc space which is also useful. Not to sure, when I arrived on the hacking scene in 2011 it was the norm to use these .wbfs files.
     
  3. Shadow#1

    Shadow#1 Wii & 3DS Softmod Expert

    Member
    10
    Nov 21, 2005
    United States
    Was because all we had was wbfs formatted partition to work with
     
  4. GreyWolf

    GreyWolf GBAtemp Guru

    Member
    8
    Mar 2, 2015
    United States
    There probably wasn't a FAT32 or NTFS library at the time.
     
  5. Sticksandstones

    Sticksandstones GBAtemp Regular

    Member
    2
    Nov 24, 2015
    United States
    Your question:
    Your answer:

    GreyWolf is right. Earlier, WBFS was just what was made to support USB loading through Wii before they figured out how to add support for more common file systems.
    That was the point of it back then, but now that we have FAT32 support, WBFS is completely obsolete. It's not uncommon for backups to still be in .wbfs format outside of the WBFS file system, since loaders still recognize these in FAT32 file systems.
     
  6. GreyWolf

    GreyWolf GBAtemp Guru

    Member
    8
    Mar 2, 2015
    United States
    The more recent versions of libWBFS were virtualized. They can open FAT32/NTFS/ext2 as if they were a WBFS partition and read the disc images that way. The "disc.nfo" file contains the data that a WBFS partition header would have had.
     
  7. eyeliner

    eyeliner Has an itch needing to be scratched.

    Member
    4
    Feb 17, 2006
    Portugal
    I know I'm shoveling a cadaveric corpse, but does someone somewhere know where can I find info on wbfs files?
    I'd like to know how an ISO is converted to wbfs.

    Or at least a .dll.

    Much praise your way.
     
  8. Cyan

    Cyan GBATemp's lurking knight

    Global Moderator
    21
    Oct 27, 2002
    France
    Engine room, learning
    the wbfs partition format has a header (1 sector to list number of games, each byte keep track of one game, so 512byte/sector drive could hold up to 500 games max + 12byte reserved). Then each game had a list of wbfs blocks (1 wbfs block = multiple hdd sectors) assigned to them.
    the wbfs format was a raw data, without any file system table. Sector 0 was the header, then following sectors are the bloc list and (fragmented) game's data.

    The wbfs file is just the same raw data, but inside a file system. it's like multiple individual WBFS partition stored on the file system. The FAT32 table has the information of the start of the header, and all its game's used blocs, stored as a file.wbfs on the FAT32 partition.
    For convenience, it was decided that each .wbfs file would hold only one game. we never tried to support a multi-game wbfs file, thought wwt might be compatible.

    for the wbfs format specification, I guess you can look at Wiimm's wit/wwt website, or libwbfs sources (https://github.com/kwiirk/wbfs/tree/master/libwbfs for example, it's a fork)
    the "wbfs file" was created by Oggzee, based on kwiirk's wbfs. I have his (old) program's sources v1.4 if no new version can be found online anymore.
     
    Last edited by Cyan, Nov 9, 2018
  9. eyeliner

    eyeliner Has an itch needing to be scratched.

    Member
    4
    Feb 17, 2006
    Portugal
    @Cyan Thank you, my friend.

    I don't C very well, so I guess I'll have to use an external lib, or program.
     
  10. smf

    smf GBAtemp Addict

    Member
    7
    Feb 23, 2009
    It's barely a file system, each game had to be contiguous. When you removed games the free space was fragmented, so you could not be able to add games that you should have plenty of space for.

    I believe it was dealing with fragmentation that put him off supporting fat32 in the first place.
     
  11. Cyan

    Cyan GBATemp's lurking knight

    Global Moderator
    21
    Oct 27, 2002
    France
    Engine room, learning
    I uploaded wbfs file v1.4 here : https://gbatemp.net/download/wbfs_file.35275/
    It's probably an old version, I don't have 2.x
    but it could be useful to learn how the format works and how to convert from WBFS partition to FAT32.
    You can also look at the python script in my signature, wbfs2fat ! it's converting a full WBFS partition to FAT32 in 1 second with all games renamed and converted to files.

    smf :
    I agree WBFS partition wasn't a file system. That's what I said above. But there where no issue with fragmentation. Wiimm did a lot of tests to see if the fragmentation was a problem, but based on the bloc size the fragmentation was unnoticeable. FAT32 and NTFS are fragmenting files a lot more than WBFS did. It's still not a problem as WBFS lib can load more than 10 000 fragments per game. (edit: max fragment is set to 20 000)
    what I meant with "inside the file system" is about the .wbfs file, it's a WBFS partition, with one single game, inside a FAT32's file system container.
    I talked about FAT32 when I said the wbfs file is "inside a file system"


    and with WBFS partition format, you could add new games in the fragmented space without issues. (well, with the fixed wbfs lib, because the first release had a fragmentation bug that WBFS manager kept). The WBFS format is purposely based on fragmentation, with a block map kept updated.
     
    Last edited by Cyan, Nov 9, 2018
Loading...