Analog joystick

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

Moderators: cheriff, TyRaNiD

Post Reply
Neizan
Posts: 10
Joined: Wed Oct 31, 2007 8:19 am

Analog joystick

Post by Neizan »

Hi,

I've just started in the PSP programming. I'm coding simple programs for learn step by step, searching for the net every question I have. But I can't find how to control when the joystick is used.

I know how control the other buttons:

Code: Select all

if(pad.Buttons & PSP_CTRL_UP){...}
if(pad.Buttons & PSP_CTRL_SQUARE){...}
...}
but I haven't found anything about the joystick. I have found a function call:

Code: Select all

sceCtrlSetSamplingMode(PSP_CTRL_MODE_ANALOG);
but I don't know how exactly it works... or if it's just not related with the analog joystick.


Can anyone help me?
User avatar
Raphael
Posts: 646
Joined: Tue Jan 17, 2006 4:54 pm
Location: Germany
Contact:

Re: Analog joystick

Post by Raphael »

see pspsdk\src\samples\controller\basic
It shows everything you need to know.
<Don't push the river, it flows.>
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki

Alexander Berl
Ghoti
Posts: 288
Joined: Sat Dec 31, 2005 11:06 pm

Post by Ghoti »

Hi I have some info on it in my controls tutorial:
http://www.ghoti.nl/PSPtutorialm5.php

hope it helps

P.S. don't forget to look at the tips section, it covers how the analog stick works and some nice info to use it without problems :)
Neizan
Posts: 10
Joined: Wed Oct 31, 2007 8:19 am

Post by Neizan »

Raphael, thanks for your fast answer ^^

And Ghoti, thanks to you too, I've saved your tutorials for study them slowly. They seem very interesting.


See you
Post Reply