Pandora Pandora Control Mappings


Hooka

That Guy!
Joined
Jul 19, 2003
Messages
1,746
Age
41
Location
Canada
Website
Visit site
Hey, just wanted to try and get some confirmation on this as I'm 99% sure of most of these, but still unsure about the shoulder buttons...

Buttons: SDLK_*:

A SDLK_HOME
B SDLK_END
X SDLK_PAGEDOWN
Y SDLK_PAGEUP
START SDLK_LALT
SELECT SDLK_LCTRL
L SDLK_RSHIFT (?)
R SDLK_RCTRL (?)

Personally this is how I treat the left analog (as a mouse):

*note: I set HalfScreenX and HalfScreenY as half of the SizeX and SizeY that I used to init SDL's video*

Code:
//Small hack to get Pandora's left nub to act like a joystick!
#ifdef TARGET_PANDORA
    int MouseX, MouseY;
    SDL_GetMouseState(&MouseX, &MouseY);
    int DeltaX = MouseX - HalfScreenX;
    int DeltaY = MouseY - HalfScreenY;
    SDL_WarpMouse(HalfScreenX, HalfScreenY);
#endif

//Left
if (DeltaX < -5)
{
   //Do whatever for Left here!
}

//Right
if (DeltaX > 5)

//Up
if (DeltaY < -5)

//Down
if (DeltaY > 5)

*Note: you don't have to use 5 and -5, I just do cause it seems to give a good mix of dead area with diagonal availability in RACE!*

You could also use DeltaX and DeltaY to get an angle and distance for a more analog approach if you wanted, this is just what I use for things with 4 ordinals...

What is worrying me is how I'm going to use the second nub later on in a similar method without causing all sorts of clicks, or if I stop it from registering clicks somehow, how I'll reset it to what it was before running my app... (useful for games that use 2 analogs)

Once again, feel free to laugh at my silly ways of handling stuff and ignorance to proper form, but I've searched around for this info a few times and can't find a nice, clean place where it is all sitting together so I thought I'd dump it here before other people go out of their way to do what I did and watch what hitting the buttons in web browsers, menus and mousepad to figure out what the buttons are mapped to.

Confirmation of the L and R triggers would be nice, but I'm sure I'll give it my usual brute force tests and find out if I'm right or not ;)
 
Sounds more or less right off the top of my head. Easy to check right? :)

the nubs have modes; offhand is mouse mode and absolute mode so image here is a mousebutton mode. I forget he devce name off hand /path/to/nub1 and nub2. You can gt current mode from them and echo in a new value like "absolute" etc

it's sort of hackish, since these are system-wide settings buts that's how it is :) hence.. In your job on pnd, get mode, set it, run app, set it back to original mode

jeffPhone
 
Code:
FILE * pFile;
 char pnd_nubstate0[25]   = "/proc/pandora/nub0/mode";
 char pnd_nubstate1[25]   = "/proc/pandora/nub1/mode";

char prev_nub_state0[20] = "none";
char prev_nub_state1[20] = "none";

Code:
    // Get nub0 previous state and set to gamemode
     pFile = fopen (pnd_nubstate0 , "w+");
     if (pFile == NULL) perror ("Error opening file");
     else {
       if ( strcmp(prev_nub_state0, "none" ) == 0 ) {
         fgets (prev_nub_state0, 100 , pFile);
       }
       printf( "Nub 0 previous state: %sn", prev_nub_state0 );
       fputs ( "absolute", pFile);
       fclose (pFile);
     }

Code:
    // Set nub1 previous state
     pFile = fopen (pnd_nubstate0 , "w+");
     if (pFile == NULL) perror ("Error opening file");
     else {
       fputs ( prev_nub_state0, pFile);
       printf( "Nub 0 previous state restored: %sn", prev_nub_state0 );
       fclose (pFile);
     }
 
I remember a while back that ED said that the R shoulder was the Compose Key. Is this right?

-God Ginrai
 
Back
Top