LED Mod for Ultimate Loader v7.3 (1.5)

Discussion in 'Wii - Hacking' started by Dteyn, Apr 18, 2009.

Apr 18, 2009
  1. Dteyn
    OP

    Member Dteyn GBAtemp Fan

    Joined:
    Aug 3, 2008
    Messages:
    338
    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. [​IMG]
    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);
     


  2. kedest

    Member kedest GBAtemp Psycho!

    Joined:
    Feb 6, 2007
    Messages:
    3,284
    Country:
    Netherlands
    That's pretty cool man, very useful. Good thinking!
     
  3. adam_the_1st

    Member adam_the_1st GBAtemp Regular

    Joined:
    Apr 10, 2009
    Messages:
    118
    Country:
    Canada
    Sounds wonderful, will this be included officially on each release fro now on? (it should) THANKS
     
  4. saelee84

    Newcomer saelee84 Advanced Member

    Joined:
    Feb 19, 2009
    Messages:
    95
    Country:
    United States
    Works like you said, thank you.
     
  5. rommy667

    Member rommy667 GBAtemp Advanced Fan

    Joined:
    Mar 21, 2008
    Messages:
    514
    Location:
    Down the road around the corner
    Country:
    Ireland
    Thanks a lot even though i use windows guis mostly this is indeed handy [​IMG]
     
  6. lajd

    Member lajd GBAtemp Regular

    Joined:
    Apr 3, 2008
    Messages:
    146
    Country:
    United States
    thanks for sharing the info on how to do it.
     
  7. Dueler

    Member Dueler GBAtemp Regular

    Joined:
    Jan 22, 2009
    Messages:
    124
    Country:
    Australia
    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 [​IMG]
     
  8. kallstar

    Newcomer kallstar Advanced Member

    Joined:
    Dec 22, 2008
    Messages:
    80
    Country:
    United States
    Good work Dteyn. Its a very useful addition!
     
  9. Dteyn
    OP

    Member Dteyn GBAtemp Fan

    Joined:
    Aug 3, 2008
    Messages:
    338
    Country:
    Canada
    Thanks guys, I'm glad you find it useful! [​IMG]

    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. [​IMG]
     
  10. daknight

    Newcomer daknight Member

    Joined:
    Sep 30, 2008
    Messages:
    49
    Country:
    Puerto Rico
    That is an useful function [​IMG] I do the same with big games and then to play my 360 while is ripping the game so this function is pretty sweet [​IMG]

    Thanks a lot for doing this [​IMG]
     
  11. Don Killah

    Member Don Killah GBAtemp Maniac

    Joined:
    Nov 21, 2002
    Messages:
    1,127
    Country:
    France
    nice tweak mate, do you mind if i'm using it?
     
  12. FenrirWolf

    Member FenrirWolf GBAtemp Psycho!

    Joined:
    Nov 19, 2008
    Messages:
    4,343
    Location:
    Beaverton, OR
    Country:
    United States
    Sounds cool. People should test it to make sure that nothing broke during the changes for some reason.
     
  13. forbore

    Member forbore GBAtemp Regular

    Joined:
    Oct 30, 2008
    Messages:
    247
    Location:
    /dev/canada/quebec
    Country:
    Canada
    Thanks a lot! Now I don't have to let the TV on to know if the dump is done! [​IMG]

    I really thought that there was a bug on my screen a first! :wtf:
     
  14. Dteyn
    OP

    Member Dteyn GBAtemp Fan

    Joined:
    Aug 3, 2008
    Messages:
    338
    Country:
    Canada
    [​IMG] [​IMG] [​IMG]
     
  15. wiistarter

    Member wiistarter GBAtemp Fan

    Joined:
    Apr 11, 2009
    Messages:
    385
    Country:
    United Kingdom
    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
     
  16. Dteyn
    OP

    Member Dteyn GBAtemp Fan

    Joined:
    Aug 3, 2008
    Messages:
    338
    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. [​IMG]

    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. [​IMG]
     
  17. Don Killah

    Member Don Killah GBAtemp Maniac

    Joined:
    Nov 21, 2002
    Messages:
    1,127
    Country:
    France
    thanks mate, then i'm gonna use it.
     
  18. Elfish

    Member Elfish GBAtemp Fan

    Joined:
    Sep 20, 2004
    Messages:
    447
    Country:
    Germany
    cool!

    would be nice if the disc would auto eject [​IMG]

    but the led thingy is nice too
     
  19. Firedrake1

    Member Firedrake1 GBAtemp Regular

    Joined:
    Dec 20, 2007
    Messages:
    100
    Location:
    Traverse City, Mi
    Country:
    United States
    Much obliged
     
  20. jeremiz

    Newcomer jeremiz Advanced Member

    Joined:
    May 24, 2007
    Messages:
    69
    Country:
    France
    Could you make please, with the latest version of ultimate usb loader, the led glow when you launch a game too?
     

Share This Page