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 > BRIGHTNESS and SUB_BRIGHTNESS

#115741 - NeX - Thu Jan 18, 2007 9:53 pm

What do these do? I've tried pumping them with incrementing values, but nothing happens... hardware or emulator. Dualis crashed once, though, and the bottom screen's brightness changed rapidly.

#115746 - josath - Thu Jan 18, 2007 10:40 pm

here's the gbatek reference: http://nocash.emubase.de/gbatek.htm#dsvideostuff

note that you have to set some bits to enable it, not just set a random value into the register.

Code:
#define BRIGHT_OFF (0<<14)
#define BRIGHT_UP (1<<14)
#define BRIGHT_DOWN (2<<14)

int brightness = 6; // a value from 0 to 16
BRIGHTNESS = brightness & BRIGHT_UP; // lighten

SUB_BRIGHTNESSS = brightness & BRIGHT_DOWN; // darken

BRIGHTNESS = BRIGHT_OFF; // disable brightness adjustments


This is untested, I'm just going off of what gbatek gives.

#115749 - Lick - Thu Jan 18, 2007 10:54 pm

It doesn't change the brightness of the backlight, it changes the brightness of the drawn pixels. So if the brightness is high, then the pixels are near white. If the brightness is low, then all the pixels look like black.
_________________
http://licklick.wordpress.com

#115763 - HyperHacker - Fri Jan 19, 2007 12:09 am

I suppose it might more accurately be called contrast? Or is that something else entirely? I know the old Game Boys had a contrast dial that did about the same thing.
_________________
I'm a PSP hacker now, but I still <3 DS.