Completely turn off display. how to?

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

Moderators: cheriff, TyRaNiD

Post Reply
nugi
Posts: 6
Joined: Sun Sep 11, 2005 3:31 am

Completely turn off display. how to?

Post by nugi »

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~
adresd
Posts: 43
Joined: Sat Jan 17, 2004 11:32 am

Post by adresd »

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 :)
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

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.
jockyw2001
Posts: 339
Joined: Thu Sep 29, 2005 4:19 pm

Post by jockyw2001 »

Is there a sceKernelPowerTick() function as well?
What's the difference between them?
adrahil
Posts: 274
Joined: Thu Mar 16, 2006 1:55 am

Post by adrahil »

set the display enable bit to 0 in the bc10* address :)
SilverSpring
Posts: 110
Joined: Tue Feb 27, 2007 9:43 pm
Contact:

Post by SilverSpring »

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().
adrahil
Posts: 274
Joined: Thu Mar 16, 2006 1:55 am

Post by adrahil »

And sceDisplayEnable() to turn it on again ;)
atari800
Posts: 2
Joined: Fri Jun 22, 2007 7:54 am

Post by atari800 »

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
Art
Posts: 642
Joined: Wed Nov 09, 2005 8:01 am

Post by Art »

did you try

Code: Select all

sceDisplaySetBrightness(0, 0)
as suggested?
It works for me.
ulysse31
Posts: 1
Joined: Thu Apr 12, 2007 11:06 pm

Post by ulysse31 »

Did you try to call int sceDisplaySetFrameBuf(NULL,0,anything,anything)?
sakya
Posts: 190
Joined: Fri Apr 28, 2006 5:48 pm
Contact:

Post by sakya »

Hi! :)
Art wrote:did you try

Code: Select all

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
youresam
Posts: 87
Joined: Sun Nov 06, 2005 1:43 am

Post by youresam »

I am also having trouble using that function.
Art
Posts: 642
Joined: Wed Nov 09, 2005 8:01 am

Post by Art »

Chuck this in your program with your other defines

Code: Select all

#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: Select all

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.
youresam
Posts: 87
Joined: Sun Nov 06, 2005 1:43 am

Post by youresam »

undefined reference to `sceDisplay_driver_9E3C6DC6'
atari800
Posts: 2
Joined: Fri Jun 22, 2007 7:54 am

Post by atari800 »

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)
weltall
Posts: 310
Joined: Fri Feb 20, 2004 1:56 am
Contact:

Post by weltall »

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?r ... rev=0&sc=0
Post Reply