Hacking Bug fix for WiiGator Loader 0.3b

requiem4d

Well-Known Member
OP
Member
Joined
Oct 25, 2008
Messages
181
Trophies
0
XP
54
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.
 

harryk

Well-Known Member
Member
Joined
Oct 8, 2008
Messages
207
Trophies
0
Website
Visit site
XP
12
Country
Australia
So you're working on both loaders at once? Great work
wink.gif


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
smile.gif


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

requiem4d

Well-Known Member
OP
Member
Joined
Oct 25, 2008
Messages
181
Trophies
0
XP
54
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.
biggrin.gif


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.
 

harryk

Well-Known Member
Member
Joined
Oct 8, 2008
Messages
207
Trophies
0
Website
Visit site
XP
12
Country
Australia
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
smile.gif


vettacossx said:
anyway to make this fix into a dol or wad that "applies it" ?

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
wink.gif
Will happen soon, I guess.
 

requiem4d

Well-Known Member
OP
Member
Joined
Oct 25, 2008
Messages
181
Trophies
0
XP
54
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.
 

WiiPower

Well-Known Member
Member
Joined
Oct 17, 2008
Messages
8,165
Trophies
0
XP
345
Country
Gambia, The
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).
 

djtaz

PM's Full - Wadder Me
Member
Joined
Sep 21, 2008
Messages
2,997
Trophies
0
Age
49
Website
Visit site
XP
81
Country
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.
 

hetster

Well-Known Member
Newcomer
Joined
Oct 17, 2008
Messages
55
Trophies
0
XP
54
Country
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.
 

requiem4d

Well-Known Member
OP
Member
Joined
Oct 25, 2008
Messages
181
Trophies
0
XP
54
Country
United States
QUOTE said:
This sounds promising, someone try SWFU. I would but I have a chip.

Not working with this bugfix. This doesn't fix the disc read error. I'm still hunting that one down, as I'm sure others are as well.

QUOTEon 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.

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.
 

hetster

Well-Known Member
Newcomer
Joined
Oct 17, 2008
Messages
55
Trophies
0
XP
54
Country
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
 
General chit-chat
Help Users
    KenniesNewName @ KenniesNewName: Kojima must be depressed without metal gear