Post: [RELEASE] [TUT] [SPRX] Getting the analog/joystick cords(x,y)
08-12-2014, 07:10 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); hey ngu Smile i was once again going through the pad lib and found out theres more to it i figured out how to get the analog stick cords.
step 1:
link the pad library to your project:
    $(SCE_PS3_ROOT)\target\ppu\lib\libpadfilter.a

step2:
go to the sample of pad utility from sony:
    $(SCE_PS3_ROOT)\samples\common\padutil

step3:
add padutil.h & padutil.cpp to your project
step4:
include it to your main source and you now can monitor analog Happy
    
//you dont have to use this code :P customize it the way you want Happy
#include <cell/pad.h>
#include <cell/padfilter.h>
#include "padutil.h"
void ex(uint32_t* Lx,uint32_t* Rx,uint32_t* Ly,uint32_t* Ry)
{
CellPadUtilAxis buffR = cellPadUtilGetAxisValue(0, CELL_UTIL_ANALOG_RIGHT);
CellPadUtilAxis buffL = cellPadUtilGetAxisValue(0, CELL_UTIL_ANALOG_LEFT);
*Lx = buffL.x;
*Rx = buffR.x;
*Ly = buffL.y;
*Ry = buffR.y;
}
uint32_t lel[4];
extern "C" int main()
{
ex(&lel[0],&lel[1],&lel[2],&lel[3]);
if(lel[0] > lel[1])
printf(":P");
return 0;
}

example on what you can do with this Smile

enjoy Happy
credits:
sony (sdk,samples,etc...)
(adsbygoogle = window.adsbygoogle || []).push({});

The following 11 users say thank you to milky4444 for this useful post:

-JM-, Im Not Boobdidas, KareraHekku, LaRip8, MegaMister, John, Notorious, Obris, SonyBlack, Swaqq, Laser
08-12-2014, 07:13 PM #2
MegaMister
Former Mega Staff
Originally posted by milky4444 View Post
hey ngu Smile i was once again going through the pad lib and found out theres more to it i figured out how to get the analog stick cords.
step 1:
link the pad library to your project:
    $(SCE_PS3_ROOT)\target\ppu\lib\libpadfilter.a

step2:
go to the sample of pad utility from sony:
    $(SCE_PS3_ROOT)\samples\common\padutil

step3:
add padutil.h & padutil.cpp to your project
step4:
include it to your main source and you now can monitor analog Happy
    
//you dont have to use this code :P customize it the way you want Happy
#include <cell/pad.h>
#include <cell/padfilter.h>
#include "padutil.h"
void ex(uint32_t* Lx,uint32_t* Rx,uint32_t* Ly,uint32_t* Ry)
{
CellPadUtilAxis buffR = cellPadUtilGetAxisValue(0, CELL_UTIL_ANALOG_RIGHT);
CellPadUtilAxis buffL = cellPadUtilGetAxisValue(0, CELL_UTIL_ANALOG_LEFT);
*Lx = buffL.x;
*Rx = buffR.x;
*Ly = buffL.y;
*Ry = buffR.y;
}
uint32_t lel[4];
extern "C" int main()
{
ex(&lel[0],&lel[1],&lel[2],&lel[3]);
if(lel[0] > lel[1])
printf(":P");
return 0;
}

example on what you can do with this Smile

enjoy Happy
credits:
sony (sdk,samples,etc...)

Nice release brotha! Smile
08-12-2014, 07:20 PM #3
SonyBlack
League Champion
nice milky.. good to see you as a active member and releaser here Smile
08-12-2014, 07:22 PM #4
More and More everyday.

Thanks a lot! Happy
08-12-2014, 07:33 PM #5
Originally posted by lack View Post
nice milky.. good to see you as a active member and releaser here Smile

yup everything is open source from now on Smile

The following user thanked milky4444 for this useful post:

SonyBlack
08-13-2014, 03:47 PM #6
Gonna give it a try on a bo2 menu
08-13-2014, 06:06 PM #7
i like that this is found but i hated CraigChrist Cursor Controlled Mod Menu so much.

good job milky4444 keep up the good work.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo