Bug fix for WiiGator Loader 0.3b

Discussion in 'Wii - Hacking' started by requiem4d, Nov 5, 2008.

Nov 5, 2008
  1. requiem4d
    OP

    Member requiem4d GBAtemp Regular

    Joined:
    Oct 25, 2008
    Messages:
    181
    Country:
    United States
    I haven't fixed the disc read error, but I've successfully found the reason Wario Land - Shake It! (NTSC) hangs on a black screen. I'll post a code diff here in about 15 mins or so once I verify it works with his original codebase.

    Edit: Yep, that fixed it. Seems the entry point is being stored in 0x817f0000 for some unknown reason. It isn't needed, and breaks at least this one title.

    Code:
    --- source/apploader.c.oldÂÂÂÂ2008-11-05 05:00:22.000000000 -0500
    +++ source/apploader.cÂÂÂÂ2008-11-05 04:55:35.000000000 -0500
    @@ -415,7 +415,7 @@
    
    ÂÂÂÂmemcpy((void*)0x80001800, (char*)0x80000000, 6);ÂÂÂÂ// For WiiRD
    ÂÂÂÂmemcpy((void*)0x80003180, (char*)0x80000000, 4);ÂÂÂÂ// online check code, seems offline games clear it?
    -ÂÂÂÂmemcpy((void*)0x817f0000, entryholder, 4);ÂÂÂÂ// entrypoint
    +ÂÂÂÂ//memcpy((void*)0x817f0000, entryholder, 4);ÂÂÂÂ// entrypoint
    ÂÂÂÂDCFlushRange((void*)0x80000000, 0x17ff000);ÂÂÂÂ// Just store the entry point here
    ÂÂÂÂ
    ÂÂÂÂ// Ocarina stuff
    @@ -649,7 +649,7 @@
    
    ÂÂÂÂmemcpy((void*)0x80001800, (char*)0x80000000, 6);ÂÂÂÂ// For WiiRD
    ÂÂÂÂmemcpy((void*)0x80003180, (char*)0x80000000, 4);ÂÂÂÂ// online check code, seems offline games clear it?
    -ÂÂÂÂmemcpy((void*)0x817f0000, entryholder, 4);ÂÂÂÂ// entrypoint
    +ÂÂÂÂ//memcpy((void*)0x817f0000, entryholder, 4);ÂÂÂÂ// entrypoint
    ÂÂÂÂDCFlushRange((void*)0x80000000, 0x17ff000);ÂÂÂÂ// Just store the entry point here
    
    ÂÂÂÂ// Ocarina stuff
    Edit 2: I stupidly ran diff in reverse on the files. It's fixed in the above code listing.
     


  2. harryk

    Member harryk GBAtemp Regular

    Joined:
    Oct 8, 2008
    Messages:
    207
    Country:
    Austria
    So you're working on both loaders at once? Great work [​IMG]

    Do you think the bug fix will deal with other problems as well, like random crashes in NMH or loading issues in Disaster? That would be neat [​IMG]

    Great, now I'm curious. 15 min... tick, tack...
     
  3. requiem4d
    OP

    Member requiem4d GBAtemp Regular

    Joined:
    Oct 25, 2008
    Messages:
    181
    Country:
    United States
    Honestly, I have no idea. This is the only game I have that this particular bug fixes, but there may be others. By all means, test away. [​IMG]

    Edit:
    Actually to be completely honest, this was an accidental fix if anything. I was testing SoftChip with Wario Land since I've extracted the apploader.bin from it to try to figure out what bug I was having. I opened up WiiGator's code and noticed the address wasn't being used by the loader itself, and said -- "Hmm... What will break if I do this?"

    Short version, I haven't found anything new that's broken, but a game I wasn't expecting to load, loaded.
     
  4. vettacossx

    Member vettacossx Wii Theme Team Founder

    Joined:
    Sep 19, 2008
    Messages:
    1,329
    Location:
    Right Behind You! Uh Oh!
    Country:
    Ireland
    anyway to make this fix into a dol or wad that "applies it" ?
     
  5. harryk

    Member harryk GBAtemp Regular

    Joined:
    Oct 8, 2008
    Messages:
    207
    Country:
    Austria
    I wonder why it was kept in the code. I'll try if all my games work (better??) with the missing line later when I get home this evening [​IMG]

    I guess there's absolutely no way of creating a dol out of modified code, because of all the modifications and stuff.
    Of course he can create a DOL out of it [​IMG] Will happen soon, I guess.
     
  6. djtaz

    Member djtaz PM's Full - Wadder Me

    Joined:
    Sep 21, 2008
    Messages:
    2,997
    Country:
    Ireland
    Again - great work requiem4d , well done
     
  7. requiem4d
    OP

    Member requiem4d GBAtemp Regular

    Joined:
    Oct 25, 2008
    Messages:
    181
    Country:
    United States
    Unfortunately I'm fundamentally against making an unofficial binary release of someone else's project. If someone else wants to compile this and release it, they are free to do so.

    Edit: Thanks, djtaz.
     
  8. WiiPower

    Member WiiPower GBAtemp Guru

    Joined:
    Oct 17, 2008
    Messages:
    8,165
    Country:
    Germany
    Great job!

    Disaster: Day of Crysis(PAL decrypted and 1:1) now loads stage 8. I have to add, that i completely removed entryholder not just these 2 lines. I also have to add, i only tested a savegame from the end of the game and replaying stage 8(before anybody asks, without this bugfix the game crashes at replay too).
     
  9. LoganCZ

    Newcomer LoganCZ Member

    Joined:
    Sep 20, 2008
    Messages:
    10
    Country:
    United States
    can u upload dol or wad? please... [​IMG]
     
  10. djtaz

    Member djtaz PM's Full - Wadder Me

    Joined:
    Sep 21, 2008
    Messages:
    2,997
    Country:
    Ireland
    erm - did you not read what he said ? he doesnt re-compile others code.
    Im sure someone will do it , but its pointless asking questions like that , they only pad the thread with crap - when someone does it they will release it and away we go - WiiGator will add to the list as well im sure.
     
  11. rasputin

    Member rasputin GBAtemp Advanced Fan

    Joined:
    Mar 7, 2008
    Messages:
    875
    Country:
    United States
    This sounds promising, someone try SWFU. I would but I have a chip.
     
  12. hetster

    Newcomer hetster Advanced Member

    Joined:
    Oct 17, 2008
    Messages:
    55
    Country:
    United Kingdom
    on a side note just want to say how great it is a few coders are showing an interest and great work on the bug fix..

    BUT come on wiigator update the blog. i'm not going to beg for a new loader etc its juts its been 2 weeks now and theres been nothing at all new on the blog..
    any progress?
    any problems?
    any new features?
    any features removed?
    any bug fixes?
    better compatibility?
    features you want to add but havent yet?
    how much progress you've made?

    like i say this isnt a begging for 0.4 this is just out of pure interest as to whats been happening in the last fortnight.
     
  13. ClaKK

    Member ClaKK GBAtemp Regular

    Joined:
    Oct 27, 2008
    Messages:
    104
    Country:
    Italy
    Great work requiem4d!!!
     
  14. requiem4d
    OP

    Member requiem4d GBAtemp Regular

    Joined:
    Oct 25, 2008
    Messages:
    181
    Country:
    United States
    Not to take anything from WiiGator, his work has been an inspiration. That being said, I'm sure he's hard at work on something. However, this is exactly why I've decided to develop SoftChip openly through the svn. Anybody can grab the latest code at any time. Anybody can submit bugfixes. Anyone can post issues. And hopefully, if (God forbid) something should happen to me, the community can pick up exactly where I left off.
     
  15. WiiPower

    Member WiiPower GBAtemp Guru

    Joined:
    Oct 17, 2008
    Messages:
    8,165
    Country:
    Germany
    Is the bug in Star Wars the same as in Okami? The screen with remove the disc and turn off your wii? If yes, i suggest the bug is in the cios or the dip, take a look at this thread: http://gbatemp.net/index.php?showtopic=113648
     
  16. hetster

    Newcomer hetster Advanced Member

    Joined:
    Oct 17, 2008
    Messages:
    55
    Country:
    United Kingdom
    like i say its purely out of curiosity and to be honest inspired because of you lol..when its open source and open coding etc every detail can be seen..every bug fix reported..every fix seen..all progress for all to see..when i see this happening it kind of made me think what the hell has happened to wiigators blog lol..

    like i say it wasnt meant to take anything away from you at all. i may even have a look at the code myself. ive been a bit scared lol. i have a BSc in computer science and learned a few languages eg html..VB..but it was quite a while ago and really wanted to learn C (thats all there was when i was at uni lol). ive really wanted to get into c or c+ or c++ but am so busy and getting a bit older now i dont think i'd have the time and patience to learn a new language even though i'd love to lol..

    but being an ex student i love progress reports lol..
    anyway keep up the good work and you never know if i do decide to get into c++ there could even be a hetster loader 0.1 alpha rofl..thats why i'm scared i dont do things by half..if i did decide to get into c++ it would be a mission and work would go to the wayside and i'd have to spend hours every day mastering it..probably a bit OCD but its me lol
     
  17. bootsector

    Member bootsector GBAtemp Regular

    Joined:
    Oct 2, 2008
    Messages:
    193
    Country:
    Brazil
    Great work!!

    It's great to see so many talented people working on this project!

    Keep up the great job!
     
  18. bantheradio

    Newcomer bantheradio Member

    Joined:
    Sep 2, 2008
    Messages:
    45
    Country:
    United States
    Just made the modification, compiled, and tested. Wario Land (NTSC) now loads.

    Thanks and keep up the good work.
     
  19. agimann

    Member agimann GBAtemp Regular

    Joined:
    Sep 27, 2008
    Messages:
    104
    Country:
    Norway
    thats great bandtheradio, um um would you up it to rapidshare on some other? id like to try myself [​IMG]
     
  20. bootsector

    Member bootsector GBAtemp Regular

    Joined:
    Oct 2, 2008
    Messages:
    193
    Country:
    Brazil
    Does anyone confirm if this fix breaks any previously working game?
     

Share This Page