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:
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.
Place at line 718. This will turn off the slot light:
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.
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:
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.
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);