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 

Read buttons while Hold switch on?

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



Joined: 28 May 2008
Posts: 842

PostPosted: Wed Oct 29, 2008 12:47 am    Post subject: Read buttons while Hold switch on? Reply with quote

How do I read whether the buttons are pressed, while the Hold switch is enabled?

I'm assuming I have to hook the kernel version of the sceCtrlReadBufferPositive function, but the problem is the NIDs for the _driver version are changed and they are not updated for 5.00 http://silverspring.lan.st/5.00/kd/ctrl.xml so I don't even know which function is which to try and hook.

Is this the way to do it? Hooking the _driver function? Or is there some other way?
Back to top
View user's profile Send private message
hibbyware



Joined: 28 Mar 2007
Posts: 78

PostPosted: Wed Oct 29, 2008 3:33 am    Post subject: Reply with quote

Not sure if this will help but posting the link can't hurt http://forums.maxconsole.net/showthread.php?t=78436
Back to top
View user's profile Send private message
moonlight



Joined: 26 Oct 2005
Posts: 567

PostPosted: Wed Oct 29, 2008 5:16 am    Post subject: Reply with quote

If you use sctrlHENFindFunction, the nids resolver will also apply to it and it will find correct address.

Anyways, in this concrete case, that function is very easy to locate from a prxtool disassembly of ctrl.prx. Just locate the sceCtrlReadBufferPositive of the user library whoe nid is unchanged, and you will find there the alias name which has the kernel nid.
Back to top
View user's profile Send private message
Mashphealh



Joined: 28 Nov 2007
Posts: 18

PostPosted: Wed Oct 29, 2008 5:58 am    Post subject: Reply with quote

If you are trying to do a similar thing as musichold, I can say you that this plugin searches the vsh_module (vshmain). I haven't found a nid in the code, and I haven't looked the code more, so it's all.
Back to top
View user's profile Send private message
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Thu Oct 30, 2008 2:55 am    Post subject: Reply with quote

Boosters sample plugin method linked above using syscon callback for controller input is the correct method. even scectrl driver version cannot see other buttons in hold mode. i wonder if there is any simpler method maybe using sysevents, adrahil might know.
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