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 

PSP Control + / -

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



Joined: 21 Aug 2005
Posts: 410
Location: Austria

PostPosted: Fri Mar 10, 2006 2:09 am    Post subject: PSP Control + / - Reply with quote

there is a list of accessable buttons in the sdk
    PSP_CTRL_SELECT Select button.
    PSP_CTRL_START Start button.
    PSP_CTRL_UP Up D-Pad button.
    PSP_CTRL_RIGHT Right D-Pad button.
    PSP_CTRL_DOWN Down D-Pad button.
    PSP_CTRL_LEFT Left D-Pad button.
    PSP_CTRL_LTRIGGER Left trigger.
    PSP_CTRL_RTRIGGER Right trigger.
    PSP_CTRL_TRIANGLE Triangle button.
    PSP_CTRL_CIRCLE Circle button.
    PSP_CTRL_CROSS Cross button.
    PSP_CTRL_SQUARE Square button.
    PSP_CTRL_HOME Home button.
    PSP_CTRL_HOLD Hold button.
    PSP_CTRL_NOTE Music Note button.

what i miss is the little + and - button near the hold button.
are they not accessable?
(would like to map zoom on it as the signs on psp would perfectly fit ;) )

greets
lumo
_________________
"Good artists copy, great artists steal."
Pablo Picasso
go2lumo.com
Back to top
View user's profile Send private message Visit poster's website
sg57



Joined: 14 Oct 2005
Posts: 154

PostPosted: Fri Mar 10, 2006 12:20 pm    Post subject: Reply with quote

I too want to know all of the Control types. Especially the dimmer buttonb(backlight). Ask the creator of PSPShot i think it was, he had the +/- sign save smaller or larger images
Back to top
View user's profile Send private message
LuMo



Joined: 21 Aug 2005
Posts: 410
Location: Austria

PostPosted: Fri Mar 10, 2006 8:51 pm    Post subject: Reply with quote

well the list above are all the defined buttons from the sdk.

[src » ctrl » pspctrl.h]
so its trying which is which...
i added some lines of code for testing, but had not time to test it now...

Code:
PSP_CTRL_SELECT     = 0x000001; //     = 0000 0000 0000 0000 0000 0001
PSP_CTRL_START     = 0x000008; //     = 0000 0000 0000 0000 0000 1000
PSP_CTRL_UP       = 0x000010; //     = 0000 0000 0000 0000 0001 0000
PSP_CTRL_RIGHT      = 0x000020; //     = 0000 0000 0000 0000 0010 0000
PSP_CTRL_DOWN     = 0x000040; //     = 0000 0000 0000 0000 0100 0000
PSP_CTRL_LEFT     = 0x000080; //     = 0000 0000 0000 0000 1000 0000
PSP_CTRL_LTRIGGER   = 0x000100; //     = 0000 0000 0000 0001 0000 0000
PSP_CTRL_RTRIGGER   = 0x000200; //     = 0000 0000 0000 0010 0000 0000
PSP_CTRL_TRIANGLE   = 0x001000; //     = 0000 0000 0001 0000 0000 0000
PSP_CTRL_CIRCLE     = 0x002000; //     = 0000 0000 0010 0000 0000 0000
PSP_CTRL_CROSS      = 0x004000; //     = 0000 0000 0100 0000 0000 0000
PSP_CTRL_SQUARE     = 0x008000; //     = 0000 0000 1000 0000 0000 0000
PSP_CTRL_HOME     = 0x010000; //     = 0000 0001 0000 0000 0000 0000
PSP_CTRL_HOLD     = 0x020000; //     = 0000 0010 0000 0000 0000 0000
PSP_CTRL_NOTE     = 0x800000; //     = 1000 0000 0000 0000 0000 0000

//UNASSIGNED VALUES:                           
PSP_CTRL_UNASSIGNED1     = 0x400000; //     = 0100 0000 0000 0000 0000 0000
PSP_CTRL_UNASSIGNED2     = 0x200000; //     = 0010 0000 0000 0000 0000 0000
PSP_CTRL_UNASSIGNED3     = 0x100000; //     = 0001 0000 0000 0000 0000 0000
PSP_CTRL_UNASSIGNED4     = 0x080000; //     = 0000 1000 0000 0000 0000 0000
PSP_CTRL_UNASSIGNED5     = 0x040000; //     = 0000 0100 0000 0000 0000 0000
PSP_CTRL_UNASSIGNED6     = 0x000800; //     = 0000 0000 0000 1000 0000 0000
PSP_CTRL_UNASSIGNED7     = 0x000400; //     = 0000 0000 0000 0100 0000 0000
PSP_CTRL_UNASSIGNED8     = 0x000004; //     = 0000 0000 0000 0000 0000 0100
PSP_CTRL_UNASSIGNED9     = 0x000002; //     = 0000 0000 0000 0000 0000 0010


now add to controls:
Code:

SceCtrlData pad;
if( pad.Buttons & PSP_CTRL_UNASSIGNED1 )
...


if you got time please test it. (you have to mod the .h file or define the values for PSP_CTRL_UNASSIGNEDX in your src.)
let me know if you find something out about the missing buttons ;)

greets
lumo
_________________
"Good artists copy, great artists steal."
Pablo Picasso
go2lumo.com
Back to top
View user's profile Send private message Visit poster's website
sg57



Joined: 14 Oct 2005
Posts: 154

PostPosted: Sat Mar 11, 2006 5:45 pm    Post subject: Reply with quote

SO your saying that there are unassigned values in the .c of pspctrl? I will be sure to try them as I really want to find them all out......

Tell me if you find anything?
Back to top
View user's profile Send private message
AnonymousTipster



Joined: 01 Jul 2005
Posts: 197

PostPosted: Sat Mar 11, 2006 7:33 pm    Post subject: Reply with quote

Those unassigned values do not seem to do anything for me, however I am running in user-mode, and some buttons (e.g Note) can only be accessed from within kernel mode. Some of those unassigned values might be for the PSP Remote if it's attatched.

Just guessing, but those unassigned buttons might be
Remote: Next, Previous, play, vol up, vol down, hold
Console: +,-,hold
Which totals 9 buttons.
Back to top
View user's profile Send private message
groepaz



Joined: 01 Sep 2005
Posts: 305

PostPosted: Sat Mar 11, 2006 8:26 pm    Post subject: Reply with quote

Code:

#define      PSP_CTRL_WLAN_UP   0x00040000   /* active on HOLD */
#define      PSP_CTRL_REMOTE      0x00080000   /* active on HOLD */

#define      PSP_CTRL_VOLUP      0x00100000   
#define      PSP_CTRL_VOLDOWN   0x00200000   
#define      PSP_CTRL_SCREEN      0x00400000   
#define      PSP_CTRL_DISC      0x01000000   


... and you need to be in kernel mode to use those, there is no way to handle them in usermode. the buttons on the remote itself are handled differently and dont appear in the buttons bitfield at all.
_________________
http://www.hitmen-console.org
http://hitmen.c02.at/files/yapspd/
Back to top
View user's profile Send private message Visit poster's website
sg57



Joined: 14 Oct 2005
Posts: 154

PostPosted: Sun Mar 12, 2006 5:00 pm    Post subject: Reply with quote

Uh huh, whats the active on HOLD junk? Does that mean if the power switch is held down to hold, itll be active? And for if the WLAN is down, then itd 'not' be the one speciied, or is when active, then itll work?
Back to top
View user's profile Send private message
groepaz



Joined: 01 Sep 2005
Posts: 305

PostPosted: Sun Mar 12, 2006 8:10 pm    Post subject: Reply with quote

uhm good question....i forgot :=D shouldnt be hard to figure out though :=P
_________________
http://www.hitmen-console.org
http://hitmen.c02.at/files/yapspd/
Back to top
View user's profile Send private message Visit poster's website
LuMo



Joined: 21 Aug 2005
Posts: 410
Location: Austria

PostPosted: Mon Mar 13, 2006 6:44 am    Post subject: Reply with quote

thanks for your replies

lumo
PS: so my guessing was good :D
_________________
"Good artists copy, great artists steal."
Pablo Picasso
go2lumo.com
Back to top
View user's profile Send private message Visit poster's website
dot_blank



Joined: 28 Sep 2005
Posts: 498
Location: Brasil

PostPosted: Mon Mar 13, 2006 2:05 pm    Post subject: Reply with quote

thanx ;)
_________________
10011011 00101010 11010111 10001001 10111010
Back to top
View user's profile Send private message
Zettablade



Joined: 05 May 2006
Posts: 71

PostPosted: Sun Jun 18, 2006 5:15 pm    Post subject: Turning off the screen Reply with quote

What's the code snippet for turning off the screen?
Back to top
View user's profile Send private message
LuMo



Joined: 21 Aug 2005
Posts: 410
Location: Austria

PostPosted: Sun Jun 18, 2006 5:59 pm    Post subject: Reply with quote

i guess you mean the screen button...
as mentioned above...

Code:
#define      PSP_CTRL_SCREEN      0x00400000 

_________________
"Good artists copy, great artists steal."
Pablo Picasso
go2lumo.com
Back to top
View user's profile Send private message Visit poster's website
sg57



Joined: 14 Oct 2005
Posts: 154

PostPosted: Mon Jun 19, 2006 7:40 am    Post subject: Reply with quote

I think he means how could you have a button press the screen on/off button...

To do your 'hold' thing, do

Code:

SceCtrlData test;
if ( test.Buttons & PSP_CTRL_HOLD ) {
         test.Buttons & PSP_CTRL_SCREEN;
}

Think that could work? Have 1 button be using another? Then if its in Hold, after like 2 seconds, itll go all black
Back to top
View user's profile Send private message
Raphael



Joined: 17 Jan 2006
Posts: 646
Location: Germany

PostPosted: Mon Jun 19, 2006 10:59 am    Post subject: Reply with quote

sg57 wrote:
I think he means how could you have a button press the screen on/off button...

To do your 'hold' thing, do

Code:

SceCtrlData test;
if ( test.Buttons & PSP_CTRL_HOLD ) {
         test.Buttons & PSP_CTRL_SCREEN;
}

Think that could work? Have 1 button be using another? Then if its in Hold, after like 2 seconds, itll go all black


Despite your code won't even compile, even if it would, it would do nothing. And even if you corrected it to actually set the Bitmask for the screen button as you wanted to do, then it wouldn't make the PSP think this button is pressed, because the bitmask is just a return value. You could even set it to 2^32-1 and it wouldn't even make the PSP moan.
Back to top
View user's profile Send private message Visit poster's website
groepaz



Joined: 01 Sep 2005
Posts: 305

PostPosted: Mon Jun 19, 2006 7:06 pm    Post subject: Reply with quote

you can make the psp moan? demo please! :)
_________________
http://www.hitmen-console.org
http://hitmen.c02.at/files/yapspd/
Back to top
View user's profile Send private message Visit poster's website
Raphael



Joined: 17 Jan 2006
Posts: 646
Location: Germany

PostPosted: Mon Jun 19, 2006 11:22 pm    Post subject: Reply with quote

I have nasty gaming fingers ;)
Back to top
View user's profile Send private message Visit poster's website
soopergooman



Joined: 02 Jul 2005
Posts: 3
Location: St. John's, Newfoundland, Canada. All tha way east BABY!!!

PostPosted: Thu Jun 22, 2006 1:28 am    Post subject: Reply with quote

even though i dont code, i think you should try to get ahold of Andy Fung, wasn't he the first person to utilize the remote dongle functions in a psp app? I think he was. Anyways just trying to help.
_________________
worrying is like a rocking chair; it gives you something to do but gets you nowhere!~Me
Back to top
View user's profile Send private message MSN Messenger
daurnimator



Joined: 11 Dec 2005
Posts: 38
Location: melbourne, australia

PostPosted: Thu Jun 22, 2006 11:22 pm    Post subject: Reply with quote

McZonk used them in Quake2.
He is often on freenode, go ask him...
Back to top
View user's profile Send private message MSN Messenger
egorive



Joined: 22 Jun 2006
Posts: 24

PostPosted: Thu Jun 22, 2006 11:55 pm    Post subject: Reply with quote

And what about the headphones remote control buttons how do they works?. I've try something by including psphprm.h and trying to use some functions like sceHprmIsHeadphoneExist() but nothing. Is there someone who knows a source code that explains how to use them?. Thanks.
Back to top
View user's profile Send private message
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Fri Jun 23, 2006 12:29 am    Post subject: Reply with quote

Easy, use SDL and the remote control buttons show up as keyboard input (see SDL/README.PSP). Or just use sceHprmPeekCurrentKey.
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