gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Demo: Brightness Test (with src)

#98799 - Lick - Thu Aug 17, 2006 6:04 pm

http://www.drunkencoders.com/demos/DS/brightness_test.zip

I released a demo (with src) that unveils how to set the brightness in DS Lite. Certainly this has been done before (Moonshell, ALite), but I brought it to you with clear code, as much as I could.

This demo includes:
1. Backlights on/off.
2. Lite brightness controlling. (Phatty will use 1.)
3. Read battery status.
4. LED control.
5. PersonalData reading.

Notes:
* Not tested on the Phatty, yet.
* PersonalData is UTF-16, well, it means that display of non-ASCII characters is incorrect.

Thanks to everyone at:
* drunkencoders.com (for hosting)
* forum.gbadev.org (!)
* devkitpro.org
* Infantile Paralysiser (for his Moonshell src)
* HyperHacker (for exploring Moonshell src)
* NDSTech
* GbaTek (!)

- Lick
_________________
http://licklick.wordpress.com

#98802 - Lick - Thu Aug 17, 2006 6:14 pm

JaJa_ tested it on his Phatty and results are pretty good. On a Lite the sun-icon should change the brightness settings and touching the screen elsewhere would toggle the backlights. On the Phatty the sun-icon should instead of the first, do the latter too.
.. And it does.

O and on the Phatty the Brightness and Backlights values will be the same, a 2. That 2 stands for 2 backlights on. If I have time then I will do the following changes:
* Add functions to turn on and off the backlights seperately.
* Make the Brightness value for Phatty return 1. That's far more logical.
_________________
http://licklick.wordpress.com