Inside WBFS

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

Oct 13, 2009

Inside WBFS by Wiimm at 6:55 PM (35,053 Views / 0 Likes) 84 replies

  1. PsyBlade

    Member PsyBlade Snake Charmer

    Joined:
    Jul 30, 2009
    Messages:
    2,204
    Location:
    Sol III
    Country:
    Germany
    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

    Member Wiimm Developer

    Joined:
    Aug 11, 2009
    Messages:
    2,079
    Location:
    Germany
    Country:
    Germany
    LIBWBFS always locate the first free block. And because of the large block size I don't see no problems.
     
  3. PsyBlade

    Member PsyBlade Snake Charmer

    Joined:
    Jul 30, 2009
    Messages:
    2,204
    Location:
    Sol III
    Country:
    Germany
    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

    Member Wiimm Developer

    Joined:
    Aug 11, 2009
    Messages:
    2,079
    Location:
    Germany
    Country:
    Germany
  5. PsyBlade

    Member PsyBlade Snake Charmer

    Joined:
    Jul 30, 2009
    Messages:
    2,204
    Location:
    Sol III
    Country:
    Germany
    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
     

Share This Page