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 Controller code with sensitivity.

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



Joined: 18 Apr 2006
Posts: 19

PostPosted: Sun Mar 16, 2008 2:40 pm    Post subject: PSP Controller code with sensitivity. Reply with quote

I wrote this for for use in games and thought it maybe useful for others.

http://devrc.org/pub/pspctrl/ (has eboot, makefile and source)

Have fun.
Back to top
View user's profile Send private message Visit poster's website
KickinAezz



Joined: 03 Jun 2007
Posts: 328

PostPosted: Sun Mar 16, 2008 11:06 pm    Post subject: Reply with quote

Sensitivity = pressure.
I am sure xbox1 got that capability (Tested w/ openXDK) but not PSP.
_________________
Intrigued by PSP system Since December 2006.
Use it more for Development than for Gaming.
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Mon Mar 17, 2008 4:05 am    Post subject: Reply with quote

This is just plain WEIRD. The "sensitivity" means it won't return a key until it's been held a certain amount of time, but not if held too long... like a bad debounce routine. It also returns the keys as a string for a single key - no support for multiple keys at all, not to mention making it a string makes checking which key later a pain in the butt.

In conclusion, an odd bit of example code, but not really useful for anything I can think of. Glance over the code, but don't use it.
Back to top
View user's profile Send private message AIM Address
binaryONE



Joined: 18 Apr 2006
Posts: 19

PostPosted: Mon Mar 17, 2008 4:28 am    Post subject: Reply with quote

J.F.

It seems that way, but you gotta try it, there's lots of things going on. :)
Back to top
View user's profile Send private message Visit poster's website
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Mon Mar 17, 2008 7:47 am    Post subject: Reply with quote

Okay, another look shows you are keeping the buttons as a bitfield, and the strings are just for mapping purposes (I guess you'd use that in a GUI). However, it's only timing how long you hold the buttons. That's not the same thing as sensitivity, no matter how you look at it.
Back to top
View user's profile Send private message AIM Address
binaryONE



Joined: 18 Apr 2006
Posts: 19

PostPosted: Mon Mar 17, 2008 7:50 am    Post subject: Reply with quote

You are right, however, this simulates sensitivity, I don't think there's any other way to measure it other than timing (at least not on psp), since that requires voltage variation or some mechanical feedback being interpreted by the kernel.

If there is something like that I'd like to check it out for sure.
Back to top
View user's profile Send private message Visit poster's website
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Mon Mar 17, 2008 12:30 pm    Post subject: Reply with quote

I suppose it would be useful for some things, even if I can't think of something off the top of my head. :) It's also useful as sample code for people who are just learning about controller input.
Back to top
View user's profile Send private message AIM Address
Art



Joined: 09 Nov 2005
Posts: 647

PostPosted: Mon Mar 17, 2008 10:33 pm    Post subject: Reply with quote

Steering a moving vehicle maybe, but nobody has written any game of
near enough quality I've seen that would call for attention in the area
of player control over improvement in other areas. Not for a game involving a vehicle at least.
There was a nice 3D homebrew racing car demo, but I don't remember seeing the full game.

I'm glad we didn't get analogue buttons on the PSP.
It just isn't the way arcade buttons are meant to be.
It's Yes or No. You can keep the Maybe for Human relationships.
_________________
If not actually, then potentially.
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