Inside WBFS

Discussion in 'Wii - Backup Loaders' started by Wiimm, Oct 13, 2009.

  1. PsyBlade

    PsyBlade Snake Charmer

    Member
    4
    Jul 30, 2009
    Gambia, The
    Sol III
    How are the the blocks allocated? (i guess simply the first free block)
    Can u try different allocation policies?
    Maybe from the largest continious group of free blocks (aka worst-fit), from the first group which is large enough for the game (first-fit) or from the smallest large enough group (best-fit)?
     
  2. Wiimm
    OP

    Wiimm Developer

    Member
    6
    Aug 11, 2009
    Germany
    Germany
    LIBWBFS always locate the first free block. And because of the large block size I don't see no problems.
     
  3. PsyBlade

    PsyBlade Snake Charmer

    Member
    4
    Jul 30, 2009
    Gambia, The
    Sol III
    While I dont think its a critical problem fragmentation seems ridiculously high.
    I would like to try myself but as I dont know much C and nothing of libwbfs I cant make head or tails of the allocation function.
    And as you were experimenting anyway I wanted to share my ideas about it.
     
  4. Wiimm
    OP

    Wiimm Developer

    Member
    6
    Aug 11, 2009
    Germany
    Germany
  5. PsyBlade

    PsyBlade Snake Charmer

    Member
    4
    Jul 30, 2009
    Gambia, The
    Sol III
    Well ... I knew that much.
    The code itself was the problem.
    But once I got that it is a simple bitmap the rest was easy.

    I implemented a variation of the worst fit algorithm.
    Everything else would require deeper changes in the code and I only wanted to play around a bit.


    To test it I used
    CODE./wwt -q init a.wbfs -s512 -f; ./wwt -qp a.wbfs phantom 150x1-4g; for ((i=0;i
     
Loading...