Estimate Bug in WBFS (?Win?)

Discussion in 'Wii - Hacking' started by PrixM, Apr 15, 2009.

  1. PrixM
    OP

    PrixM Advanced Member

    Newcomer
    65
    0
    Apr 14, 2009
    Gambia, The
    Hi
    i cant find any WBFS version for windows without the estimate bug.
    Nights: Journey... Pal Estimate 0.01G real size 4.01G
    Fifa08 Estimate 0.00G real size 4.00G
    .....
    It would be easy if there arent some games with 0.19 and som with 4.19 out [​IMG]

    Does someone know a version without this bug.
    I´m no c programmer so i cant find/fix the bug in source.
     
  2. palasx

    palasx Advanced Member

    Newcomer
    97
    0
    Oct 17, 2007
    United States
    confirmed in WBFS Manager 2.2.1 as well. its likely in libwbfs then, what versions are you seeing this bug in?
     
  3. steve-p

    steve-p GBAtemp Advanced Fan

    Member
    503
    0
    Apr 13, 2009
    i'd like to test this,
    is it only games over 4gig?
    and does it do this when you list the contents of a wbfs partition?
     
  4. PrixM
    OP

    PrixM Advanced Member

    Newcomer
    65
    0
    Apr 14, 2009
    Gambia, The
    It´s only the estimating games over 4GIG Gamepartition
    if you copy it to usb everything is ok and on usb the size shown is ok.

    I tested every version i found out there.
    All have the same bug.
    wbfs_win + wbfs_win_delta
    hermes version
    Sorgs version
    WiiNinja version
    ...
     
  5. wiiNinja

    wiiNinja GBAtemp Fan

    Member
    385
    25
    Jan 13, 2009
    United States
    I see the problem. It's in the routine:

    u32 wbfs_estimate_disc

    The return value is a 32 bit value, which has a max value of 4GB. This is a minor bug but I can't test it right now 'cause I'm at work (no WBFS drive). Will make a change tonight.
     
  6. shadoxXx

    shadoxXx Advanced Member

    Newcomer
    65
    0
    Nov 10, 2008
    Gambia, The
    Same for me with Okami [​IMG]
     
  7. wiiNinja

    wiiNinja GBAtemp Fan

    Member
    385
    25
    Jan 13, 2009
    United States
  8. PrixM
    OP

    PrixM Advanced Member

    Newcomer
    65
    0
    Apr 14, 2009
    Gambia, The
    Sorry WiiNinja
    still the same
    I get 0.00 with fifa08 PAl and 0.01 with nights
     
  9. AlexDP

    AlexDP GBAtemp Regular

    Member
    133
    0
    Jun 17, 2007
    Italy
    This most likely is the bug indeed. I'll look into getting that fixed for WBFS Manager 3.0. Nice job.
    Actually, looking at it again, that can't be the problem, Super Smash Bros. Brawl correctly reports as 6.95 GB (at least in WBFS Manager 2.2.2).
     
  10. PrixM
    OP

    PrixM Advanced Member

    Newcomer
    65
    0
    Apr 14, 2009
    Gambia, The
    Godd for you AlexDP
    But the problem with your gui ist .net 3.5 [​IMG]

    With the normal wbfs tools you get 2.75Gig for Super smash Bros. Brawl
     
  11. AlexDP

    AlexDP GBAtemp Regular

    Member
    133
    0
    Jun 17, 2007
    Italy
    Is that so? well, I can compare the libwbfs code I'm using with the latest version and see how it is that I fixed it. I'll post it back here.
    Btw, is there something wrong with .NET 3.5 SP1 that I'm not aware of? I don't get what all the reluctance towards .NET is about, it's just like installing the VC++ redist, or like installing the MFC redist, or installing the Java Runtime Environment....
     
  12. PrixM
    OP

    PrixM Advanced Member

    Newcomer
    65
    0
    Apr 14, 2009
    Gambia, The
    No problem with .net
    I also like your GUI

    But not everyone has .net 3.5 on his pc
    I´m fan of programms that run on a standard windows an don´t need 200MB download [​IMG]

    And i misunderstood you.
    If you want to post a solution why yours work and all others dont work
    Great job
     
  13. PrixM
    OP

    PrixM Advanced Member

    Newcomer
    65
    0
    Apr 14, 2009
    Gambia, The
    Ok it seems that i fixed the problem doing a dirty trick
    Think you can do it better if you are a C coder
    So please post if you find a way to do it

    Canged following lines

    In Libwbfs.c / u32 wbfs_estimate_disc:
    u32 tot; to u64 tot;
    return tot * (p->wbfs_sec_sz / p->hd_sec_sz)*512); to return tot * ((p->wbfs_sec_sz / p->hd_sec_sz)*512)/10;

    in wbfs.c / void wbfs_applet_estimate.....
    u32 estimation = wbfs_estimate_disc.... to u64 estimation = wbfs_estimate_disc....
    fprintf(stderr, "%.2fG\n", estimation / (GB)); to fprintf(stderr, "%.2fG\n", estimation *10 / (GB));

    now i got the right size for all games [​IMG]