Hacking LED Mod for Ultimate Loader v7.3 (1.5)

Dteyn

Well-Known Member
OP
Member
Joined
Aug 3, 2008
Messages
335
Trophies
0
XP
115
Country
Canada
I was using the USB Loader to backup my original discs and with some of the larger games (GH, SSBB) taking up to 30 mins or more, I tend to switch back to TV to occupy the time while the game installs. I wanted a way to know when the game is done installing without having to switch video to the Wii and back to TV.

So I did some digging and found wiilight, a demo implementation by Bool of how to turn the wii slot light on and off. I narrowed down which portion of the code turns the slot light LED on/off, modified one function name (just to make it easier to read) and placed the proper bits and pieces into the right spots in the source code for the USB Loader.

The result is a copy of Ultimate Loader v7.3 (based on SD/USB Loader v1.5) that will turn on the slot light LED when a game is done ripping. It will turn the light off again as soon as you press a button to continue. I've tested it and it works fine for me, so I thought I'd share it.

You can download the package (including compiled .dol and source code) at the following link. Enjoy!

http://sharebee.com/0e383191


Here are the relevant bits of code, if someone wants to incorporate this functionality into their own source. All of the modifications are in menu.c:

Place at the top of menu.c (line 55). This is used to set the location of the register used to control the slot light:
Code:
/* Slot light patch - Dteyn (with source from Bool's wiilight) */
static vu32 *_wiilight_reg = (u32*)0xCD0000C0;

Place in the Menu_Install() routine at line 708. This must go before the out: label in order to properly turn on the light when the game ripping succeeds. The light will not be turned on if the ripping fails.
Code:
ÂÂÂÂ/* Turn on the Slot Light - Dteyn (with source from Bool's wiilight) */
ÂÂÂÂwiilight(1);

Place at line 718. This will turn off the slot light:
Code:
ÂÂÂÂ/* Turn off the Slot Light */
ÂÂÂÂwiilight(0);

Finally, the routine that does the dirty work. I placed this at the end of the file, but you can put it anywhere so long as it's not in the middle of another routine.
smile.gif

Code:
void wiilight(int enable){ÂÂÂÂÂÂÂÂÂÂÂÂ // Toggle wiilight (thanks Bool for wiilight source)
ÂÂÂÂu32 val = (*_wiilight_reg&~0x20);ÂÂÂÂÂÂÂÂ
ÂÂÂÂif(enable) val |= 0x20;ÂÂÂÂÂÂÂÂÂÂÂÂ 
ÂÂÂÂ*_wiilight_reg=val;ÂÂÂÂÂÂÂÂÂÂÂÂ
}

Edit: Almost forgot, you'll also need to add a prototype entry to the menu.h file as such, I added it on line 12:
Code:
void wiilight(int enable);
 

Dueler

Well-Known Member
Member
Joined
Jan 22, 2009
Messages
124
Trophies
0
Age
34
Website
dueler.blogspot.com
XP
206
Country
I love it.
Makes me even more anxious to get my black katana case with red led xD
It will be a silly thing for them not to add this into the main Ultimate source
tongue.gif
 

Dteyn

Well-Known Member
OP
Member
Joined
Aug 3, 2008
Messages
335
Trophies
0
XP
115
Country
Canada
Thanks guys, I'm glad you find it useful!
smile.gif


I would like to see it added to the main source tree, since it's a small addition and could easily be made an option in the config file.

All in all it was pretty fun putting it all together too, considering I'm not much of a C coder... I have VB (Visual Bullshit) and 8-bit assembly experience, but only ever dabbled in C enough that I can somewhat read and understand it, but I can't yet write C code from scratch... I envy the guys that know C like a second language, it's such a useful programming language.
smile.gif
 

daknight

Well-Known Member
Newcomer
Joined
Sep 30, 2008
Messages
49
Trophies
0
XP
72
Country
That is an useful function
biggrin.gif
I do the same with big games and then to play my 360 while is ripping the game so this function is pretty sweet
biggrin.gif


Thanks a lot for doing this
happy.gif
 

Dteyn

Well-Known Member
OP
Member
Joined
Aug 3, 2008
Messages
335
Trophies
0
XP
115
Country
Canada
Don Killah said:
nice tweak mate, do you mind if i'm using it?

Not at all, go for it!
smile.gif


FenrirWolf said:
Sounds cool. People should test it to make sure that nothing broke during the changes for some reason.

I've tested it pretty thoroughly (played quite a few games), so far nothing has come up. The only change is adding some code to the menu.c portion of the code, so it shouldn't break any functionality... just add some.
smile.gif


QUOTE(forbore @ Apr 18 2009, 07:18 PM)
I really thought that there was a bug on my screen a first! :wtf:

unsure.gif
smileipb2.png
wink.gif
 

wiistarter

Well-Known Member
Member
Joined
Apr 11, 2009
Messages
385
Trophies
0
XP
114
Country
This is nice.. Now the kids can still watch TV while Im ripping games and it will spare me from the frowning and moaning..

Thanks
 

Dteyn

Well-Known Member
OP
Member
Joined
Aug 3, 2008
Messages
335
Trophies
0
XP
115
Country
Canada
The LED mod is now included in the main source for Ultimate v7.4. You can find hungryip84's post here: http://gbatemp.net/index.php?showtopic=147...t&p=1919972

I kinda surprised myself by figuring it out to be honest, it started out as an idea earlier this afternoon, I did a couple searches on Wiibrew and about 30 mins later I was ready to test the first compile, which worked first try. I'm glad I'm able to share a new feature instead of just requesting one.
smile.gif


It's amazing to see how fast this project is developing. Hehe, I can just imagine the people who haven't logged in in 6 months, logging in today.. they would be floored! Heheh, I remember when the idea of playing DVD-R backups without a modchip was considered impossible.. and here we are with a USB Loader, lol. Anyways that's enough rambling, I'm just glad everyone seems to like the LED mod and that I could contribute something to this community.
smile.gif
 

jeremiz

Well-Known Member
Newcomer
Joined
May 24, 2007
Messages
82
Trophies
0
XP
689
Country
France
Could you make please, with the latest version of ultimate usb loader, the led glow when you launch a game too?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Minox @ Minox:
    No idea what any of those things you mention are
    +1
  • K3Nv2 @ K3Nv2:
    Cholesterol and Triglycerides? Basically a way they measure fatty cells in your blood
  • AncientBoi @ AncientBoi:
    Cholesterol is sorta high, according to my doc
    +1
  • K3Nv2 @ K3Nv2:
    I've been taking fiber pills, eating more grapes, switched to wheat bread in hopes to lower it
    +1
  • BigOnYa @ BigOnYa:
    I like wheat bread, I even like the chunky wheat bread with pieces of whole grain in it.
  • K3Nv2 @ K3Nv2:
    Been getting this honey wheat bread from aldis pretty decent not very sweet to out do it
  • K3Nv2 @ K3Nv2:
    Me making any food at home is an improvement to how I use to be
    +1
  • BigOnYa @ BigOnYa:
    I have an bread machine and use it alot, better than breads you buy, but don't last as long, cause no bs preservatives
  • K3Nv2 @ K3Nv2:
    I got compliments about my weight loss and thought well guess I can pig out again now I'm the piggy
  • BigOnYa @ BigOnYa:
    My biggest prob is alcohol, definitely is fattening
  • K3Nv2 @ K3Nv2:
    I know when to stop at least honestly don't get those that go and go with food
  • BigOnYa @ BigOnYa:
    Or those that order 2 big macs , large fry, ice cream sundie, then a diet coke
  • K3Nv2 @ K3Nv2:
    I might get downing two big macs but nah that's it
  • BigOnYa @ BigOnYa:
    Ok that will be $15.99, cash or charge?
  • K3Nv2 @ K3Nv2:
    My go to orders usually a mcdouble and a mcchicken and I'm happy rarely mess with fries
  • K3Nv2 @ K3Nv2:
    Pro tip ask for that clowns jizzmac sauce on your mcdouble
    +1
  • BigOnYa @ BigOnYa:
    Do they charge extra when you add sauce,etc? I know burger king used to not, but don't know nowadays
  • K3Nv2 @ K3Nv2:
    They may squrit it for free if you ask nice
    +1
  • K3Nv2 @ K3Nv2:
    Last time I got bk it was 35c per sauce fuck you king of my nutsack
    +1
  • K3Nv2 @ K3Nv2:
    I'll buy a bottle of baby rays BBQ for $2 and add it from home out of spite
    +1
  • BigOnYa @ BigOnYa:
    I like baby rays, my favorite is KC masterpiece tho. Figured all you could buy is that there.
  • K3Nv2 @ K3Nv2:
    The metro doesn't discriminate good sauce
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Baby Rays isn't that what killed the crocodile hunter?
  • Psionic Roshambo @ Psionic Roshambo:
    If only he had done an endorsement for them....
  • Psionic Roshambo @ Psionic Roshambo:
    Oy mate don't let a bad bbq sauce kill your party! Baby Rays are killing it!! The flavor hits you right in the chest!
    Psionic Roshambo @ Psionic Roshambo: Oy mate don't let a bad bbq sauce kill your party! Baby Rays are killing it!! The flavor hits...