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 

Analog joystick

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



Joined: 31 Oct 2007
Posts: 10

PostPosted: Fri Nov 02, 2007 3:06 am    Post subject: Analog joystick Reply with quote

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:
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:
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?
Back to top
View user's profile Send private message
Raphael



Joined: 17 Jan 2006
Posts: 646
Location: Germany

PostPosted: Fri Nov 02, 2007 3:15 am    Post subject: Re: Analog joystick Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
Ghoti



Joined: 31 Dec 2005
Posts: 288

PostPosted: Fri Nov 02, 2007 4:49 am    Post subject: Reply with quote

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 :)
_________________
My PSP games:

Boxy II: http://www.ghoti.nl/boxyii.php
Elementals: http://www.ghoti.nl/Elementals.php
Back to top
View user's profile Send private message
Neizan



Joined: 31 Oct 2007
Posts: 10

PostPosted: Fri Nov 02, 2007 7:16 am    Post subject: Reply with quote

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
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