Talk:Libwiilight

From WiiBrew
(Redirected from Talk:LibWiiLight)
Jump to navigation Jump to search

Source

Is the source available somewhere? --DrTwox 22:31, 7 November 2009 (UTC)

If you simply need on and off, here it is:
/**
 * Turn Wii light off.
 */
void WIILIGHT_TurnOff()
{
    *(u32*)0xCD0000C0 &= ~0x20;
}

/**
 * Turn Wii light on.
 */
void WIILIGHT_TurnOn()
{
    *(u32*)0xCD0000C0 |= 0x20;
}

--Crayon (talk) 23:29, 7 November 2009 (UTC)

Thanks Crayon; How about setting the level of the LED? --DrTwox 20:56, 8 November 2009 (UTC)
Setting the level is allot more involved as it is not supported directly. libwiilight uses very fast pulses (toggling on and off) to simulate levels of intensity, its just an eye trick. I have a (slightly) modified version of libwiilight here --Rhys 00:57, 9 November 2009 (UTC)
Thank you! Works great --DrTwox 20:54, 9 November 2009 (UTC)
The link given by Rhys is dead, but the file could still be found in the project --Crayon (talk) 19:34, 20 January 2010 (UTC)

Doesn't work on PAL?

The sample code and Disk Drive Lighter both don't work on my Wii. I think it is because of the library.

If I remember correctly, the Hex adresses differ from NTSC to PAL by 4518 (Hex). So tried changing the code to

/**
 * Turn Wii light off.
 */
void WIILIGHT_TurnOff()
{
    *(u32*)0xCD0045D8 &= ~0x20;
}

/**--~~~~
 * Turn Wii light on.
 */
void WIILIGHT_TurnOn()
{
    *(u32*)0xCD0045D8 |= 0x20;
}

But that didn't work either.

I tried to substract 4518, but I didn't get to testing it since I can't get on my Wii now.

EDIT: Tried it, and it crashes the Wii. >_> --Superyoshi 15:36, 28 January 2010 (UTC)


So is it just my PAL Wii because of the Hex Adress or could it be my Wii (4.2E)? --Superyoshi 07:38, 28 January 2010 (UTC)

EDIT 2: Well, tried this and this one worked. I wonder if you could change the library to work just like this... --Superyoshi 15:42, 28 January 2010 (UTC)

Try not to judge this library with Disk Drive Lighter. I don't want to be mean, but the program was made by a noob that posted a question on why WIILIGHT-Toggle() was not working (minus sign). Try the lib, not Disk Drive Lighter. BTW I don't understand the link between light on Wii and the TV you are are using to display an image. --Crayon (talk) 16:04, 28 January 2010 (UTC)
This is why I also used the sample code, which didn't work too. Also, it's not just the TV. European Wiis also have differences to American/Japanese Wiis. --Superyoshi 16:40, 28 January 2010 (UTC)
What sample code are you talking about and how did you use it? --Crayon (talk) 16:44, 28 January 2010 (UTC)
Libwiilight#Demos / Examples I used it in my application in a if(){} structure. The application worked fine, except for the Drive Light. --Superyoshi 17:05, 28 January 2010 (UTC)
Did you initialize the library with: WIILIGHT_Init() ? If you paste your code somewhere I may look at it. --Crayon (talk) 17:13, 28 January 2010 (UTC)