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 

Completely turn off display. how to?

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



Joined: 11 Sep 2005
Posts: 6

PostPosted: Sun Sep 11, 2005 3:38 am    Post subject: Completely turn off display. how to? Reply with quote

Hello~

I'm wondering how to make my psp turn off LCD display completely.
I've tried sceGuDisplay(0), but it does not turn off LCD completely.
sceGuDisplay(0) command make the screen be black.
But LCD back light seems to be turned on.
The display will completely turned off when display off timeout occurs (controlled by system.)

Please let me know how to turn off the display completely.
Thank you~
Back to top
View user's profile Send private message
adresd



Joined: 17 Jan 2004
Posts: 43

PostPosted: Sun Sep 11, 2005 11:07 pm    Post subject: Reply with quote

hold the display button for a few seconds and it will power down the display, leaving your code still running.

This has been tested in PSPMediaCenter.

press it again to get the display back :)
Back to top
View user's profile Send private message
mrbrown



Joined: 17 Jan 2004
Posts: 1536

PostPosted: Mon Sep 12, 2005 5:24 am    Post subject: Reply with quote

adresd wrote:
hold the display button for a few seconds and it will power down the display, leaving your code still running.

This has been tested in PSPMediaCenter.

press it again to get the display back :)


He was asking about how to turn off the screen using code.

I think you can use scePowerTick() to do what you want. See psppower.h in PSPSDK.
Back to top
View user's profile Send private message
jockyw2001



Joined: 29 Sep 2005
Posts: 339

PostPosted: Mon Feb 26, 2007 2:00 am    Post subject: Reply with quote

Is there a sceKernelPowerTick() function as well?
What's the difference between them?
Back to top
View user's profile Send private message
adrahil



Joined: 16 Mar 2006
Posts: 277

PostPosted: Mon Feb 26, 2007 3:05 am    Post subject: Reply with quote

set the display enable bit to 0 in the bc10* address :)
Back to top
View user's profile Send private message
SilverSpring



Joined: 27 Feb 2007
Posts: 115

PostPosted: Tue Feb 27, 2007 9:55 pm    Post subject: Reply with quote

sceDisplaySetBrightness(0, 0) will turn the backlight off (screen will still be there, just no backlight). If you want to completely disable the screen, you could try sceDisplayDisable().
Back to top
View user's profile Send private message Visit poster's website
adrahil



Joined: 16 Mar 2006
Posts: 277

PostPosted: Wed Feb 28, 2007 5:05 am    Post subject: Reply with quote

And sceDisplayEnable() to turn it on again ;)
Back to top
View user's profile Send private message
atari800



Joined: 22 Jun 2007
Posts: 2

PostPosted: Fri Jun 22, 2007 11:09 am    Post subject: Reply with quote

Super noob - so please forgive me

I am trying to get sceDisplayEnable() and sceDisplayDisable() to work.
have tried -lpspdisplay_kernel & -lpspdisplay_driver and both together
Even tossed in:
#include "pspdisplay_kernel.h" (driver too)

At best it compiles but when it loads - it locks up psp


I upgraded PSPtoolchain (svn)
This made the compiles smaller but didnt help me with my problem

Does someone have advice or an example?

Thanks in advance
Back to top
View user's profile Send private message
Art



Joined: 09 Nov 2005
Posts: 647

PostPosted: Sun Jun 24, 2007 4:14 pm    Post subject: Reply with quote

did you try
Code:

sceDisplaySetBrightness(0, 0)

as suggested?
It works for me.
Back to top
View user's profile Send private message
ulysse31



Joined: 12 Apr 2007
Posts: 1

PostPosted: Mon Jun 25, 2007 6:16 pm    Post subject: Reply with quote

Did you try to call int sceDisplaySetFrameBuf(NULL,0,anything,anything)?
Back to top
View user's profile Send private message
sakya



Joined: 28 Apr 2006
Posts: 190

PostPosted: Mon Jun 25, 2007 11:49 pm    Post subject: Reply with quote

Hi! :)
Art wrote:
did you try
Code:

sceDisplaySetBrightness(0, 0)

as suggested?
It works for me.

Since I'm interested in both sceDisplaySetBrightness and sceDisplayDisable can you please explain what's mandatory to use these functions?
I tried to write a simple program that uses sceDisplaySetBrightness but it crash as the function is executed.

I included pspdisplay_kernel.h, added -lpspdisplay_driver to LIBS in makefile (and updated my toolchain) and made the program run in kernel mode but sceDisplaySetBrightness doesen't seem to work.

What I'm doing wrong?
Can someone provide a little example for both sceDisplaySetBrightness and sceDisplayDisable?

Many thanks
Ciao
Sakya
Back to top
View user's profile Send private message Visit poster's website
youresam



Joined: 06 Nov 2005
Posts: 87

PostPosted: Tue Jun 26, 2007 4:20 pm    Post subject: Reply with quote

I am also having trouble using that function.
Back to top
View user's profile Send private message AIM Address
Art



Joined: 09 Nov 2005
Posts: 647

PostPosted: Tue Jun 26, 2007 4:27 pm    Post subject: Reply with quote

Chuck this in your program with your other defines
Code:

#define sceDisplaySetBrightness sceDisplay_driver_9E3C6DC6
void sceDisplay_driver_9E3C6DC6(int a0,int a1); /*a0 0-100,a1 = 0/1 (set to 0)*/

libs I'm using in a program with it working are:
Code:

LIBS = -lpspaudiolib -lpspaudio -lpspdebug -lstdc++ -lpsphprm_driver -lpspusb -lpspusbstor -lpsprtc -lpspvfpu -lpspgum -lpspgu -lpsppower -lpng -lz -lm -lpspdisplay_driver

I don't know which are required sorry, but some there are obviously not.
Art.
Back to top
View user's profile Send private message
youresam



Joined: 06 Nov 2005
Posts: 87

PostPosted: Wed Jun 27, 2007 6:45 am    Post subject: Reply with quote

undefined reference to `sceDisplay_driver_9E3C6DC6'
Back to top
View user's profile Send private message AIM Address
atari800



Joined: 22 Jun 2007
Posts: 2

PostPosted: Wed Jul 11, 2007 12:32 am    Post subject: Reply with quote

I added -lpsppower -lpspdisplay_driver to my LIBS in the makefile
when I have sceDisplayEnable or scePowerTick or anything like this - if the program is in Game150 or GAME (kernel set to 1.50) - blank screen when it starts and I need ot reboot PSP to break out
if it is in Game340 - I get The Game could not be started - (8002013c)
Back to top
View user's profile Send private message
weltall



Joined: 20 Feb 2004
Posts: 310

PostPosted: Wed Jul 11, 2007 10:10 pm    Post subject: Reply with quote

youresam wrote:
undefined reference to `sceDisplay_driver_9E3C6DC6'

that was replaced with the name of the function
#endif
#ifdef F_sceDisplay_driver_0016
IMPORT_FUNC "sceDisplay_driver",0x9E3C6DC6,sceDisplaySetBrightness
#endif
#ifdef F_sceDisplay_driver_0017
IMPORT_FUNC "sceDisplay_driver",0x31C4BAA8,sceDisplayGetBrightness
#endif

http://svn.ps2dev.org/filedetails.php?repname=psp&path=%2Ftrunk%2Fpspsdk%2Fsrc%2Fdisplay%2FsceDisplay_driver.S&rev=0&sc=0
Back to top
View user's profile Send private message Visit poster's website
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