4th brightness level...

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
XazZ
Posts: 10
Joined: Fri Aug 25, 2006 1:00 am

4th brightness level...

Post by XazZ »

Hi...
I've been looking around some forums and google but I couldn't find an answer

OK, here comes my problem:
I wanna set the 4th screen brightness level without having the AC-adapter plugged in...
Can I do this with my own little app too? (I mean is there a function that does this for me)

Thanks in advance
XazZ
Art
Posts: 642
Joined: Wed Nov 09, 2005 8:01 am

Post by Art »

Register with the irShell forum and ask Ahman, because the latest
version of irShell can do it. I would suspect it requires kernal mode.

Sorry I can't help with how it is actually done.
adrahil
Posts: 274
Joined: Thu Mar 16, 2006 1:55 am

Post by adrahil »

sceDisplaySetBrightness? :)
XazZ
Posts: 10
Joined: Fri Aug 25, 2006 1:00 am

Post by XazZ »

Art wrote:Register with the irShell forum and ask Ahman, because the latest
version of irShell can do it. I would suspect it requires kernal mode.

Sorry I can't help with how it is actually done.
No problem...
Kernel mode is not the problem ;)

And thanks for the hint with irShell - I'll register with Ahman's forum and ask there
adrahil wrote:sceDisplaySetBrightness? :)
first thing: good idea :)
second thing: I couldn't find any documentation about it....
I've played with it a bit and I found out that this code:

Code: Select all

		sceDisplaySetBrightness(0,0);
seems to work....

But I'm not sure witch header files have to be included
I've tried these basic ones:

Code: Select all

#include <pspkernel.h>
#include <stdio.h>
#include <pspctrl.h>
Oh, and I haven't changed the makefile, so it still uses the "standard" libs...

EDIT: Think before you klick on Submit!
The most important output - my compilers error message:

Code: Select all

main.o&#58; In function `main'&#58;
main.c&#58;&#40;.text+0x20&#41;&#58; undefined reference to `sceDisplay_driver_9E3C6DC6'
main.c&#58;&#40;.text+0x3c&#41;&#58; undefined reference to `sceDisplay_driver_9E3C6DC6'
main.c&#58;&#40;.text+0x54&#41;&#58; undefined reference to `sceDisplay_driver_9E3C6DC6'
thanks
XazZ
pspwill
Posts: 51
Joined: Thu Nov 17, 2005 8:07 am

Post by pspwill »

You have to stub the function in sceDisplay.S and recompile the display lib.
weltall
Posts: 310
Joined: Fri Feb 20, 2004 1:56 am
Contact:

Post by weltall »

it's a kernel only function as it's part of the diplay_driver library

void sceDisplay_driver_9E3C6DC6(int a0,int a1);//a0 0-100,a1 = 0/1 (set to 0)
#define sceDisplaySetBrightness sceDisplay_driver_9E3C6DC6
void sceDisplay_driver_31C4BAA8(int *a0,int *a1);
#define sceDisplayGetBrightness sceDisplay_driver_31C4BAA8
XazZ
Posts: 10
Joined: Fri Aug 25, 2006 1:00 am

Post by XazZ »

thanks weltall...
I already had this code

Code: Select all

#define sceDisplaySetBrightness sceDisplay_driver_9E3C6DC6
void sceDisplay_driver_9E3C6DC6&#40;int a0,int a1&#41;; /*a0 0-100,a1 = 0/1 &#40;set to 0&#41;*/
so I added -lpspdisplay_driver to the libs in the makefile - and it (almost) works...

@pspwill: I didn't had to reconfigure the display-lib... - and that is good, because I'm still a beginner

I just need to figure out the values for sceDisplaySetBrightness - I can't find any documentation about it...
and my sceDisplaySetBrightness(0,0); isn't working...

thanks
XazZ
adrahil
Posts: 274
Joined: Thu Mar 16, 2006 1:55 am

Post by adrahil »

You have args right here.....
0 to 100 is the 1st arg, brightness.....
2nd has to be 0 :)

Code: Select all

#define sceDisplaySetBrightness sceDisplay_driver_9E3C6DC6
void sceDisplay_driver_9E3C6DC6&#40;int a0,int a1&#41;; /*a0 0-100,a1 = 0/1 &#40;set to 0&#41;*/
Post Reply