forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

4th brightness level...

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
XazZ



Joined: 25 Aug 2006
Posts: 10

PostPosted: Mon Jan 29, 2007 2:43 am    Post subject: 4th brightness level... Reply with quote

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
Back to top
View user's profile Send private message
Art



Joined: 09 Nov 2005
Posts: 647

PostPosted: Mon Jan 29, 2007 3:09 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
adrahil



Joined: 16 Mar 2006
Posts: 277

PostPosted: Mon Jan 29, 2007 9:46 pm    Post subject: Reply with quote

sceDisplaySetBrightness? :)
Back to top
View user's profile Send private message
XazZ



Joined: 25 Aug 2006
Posts: 10

PostPosted: Tue Jan 30, 2007 3:30 am    Post subject: Reply with quote

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:
      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:
#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:
main.o: In function `main':
main.c:(.text+0x20): undefined reference to `sceDisplay_driver_9E3C6DC6'
main.c:(.text+0x3c): undefined reference to `sceDisplay_driver_9E3C6DC6'
main.c:(.text+0x54): undefined reference to `sceDisplay_driver_9E3C6DC6'


thanks
XazZ
Back to top
View user's profile Send private message
pspwill



Joined: 17 Nov 2005
Posts: 51

PostPosted: Tue Jan 30, 2007 7:30 am    Post subject: Reply with quote

You have to stub the function in sceDisplay.S and recompile the display lib.
Back to top
View user's profile Send private message
weltall



Joined: 20 Feb 2004
Posts: 310

PostPosted: Tue Jan 30, 2007 7:31 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
XazZ



Joined: 25 Aug 2006
Posts: 10

PostPosted: Tue Jan 30, 2007 11:38 pm    Post subject: Reply with quote

thanks weltall...
I already had this code
Code:
#define sceDisplaySetBrightness sceDisplay_driver_9E3C6DC6
void sceDisplay_driver_9E3C6DC6(int a0,int a1); /*a0 0-100,a1 = 0/1 (set to 0)*/


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
Back to top
View user's profile Send private message
adrahil



Joined: 16 Mar 2006
Posts: 277

PostPosted: Wed Jan 31, 2007 6:59 am    Post subject: Reply with quote

You have args right here.....
0 to 100 is the 1st arg, brightness.....
2nd has to be 0 :)
Code:
#define sceDisplaySetBrightness sceDisplay_driver_9E3C6DC6
void sceDisplay_driver_9E3C6DC6(int a0,int a1); /*a0 0-100,a1 = 0/1 (set to 0)*/
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group