Read buttons while Hold switch on?

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

Moderators: cheriff, TyRaNiD

Post Reply
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Read buttons while Hold switch on?

Post by Torch »

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?
hibbyware
Posts: 78
Joined: Wed Mar 28, 2007 10:29 am

Post by hibbyware »

Not sure if this will help but posting the link can't hurt http://forums.maxconsole.net/showthread.php?t=78436
moonlight
Posts: 567
Joined: Wed Oct 26, 2005 7:46 pm

Post by moonlight »

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.
Mashphealh
Posts: 18
Joined: Wed Nov 28, 2007 4:18 am

Post by Mashphealh »

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.
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

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.
Post Reply