Advertising (This ad goes away for registered users. You can Login or Register)

[PSPGo] DualShock3 R3 and L3 can be used

Forum rules
Forum rule Nº 15 is strictly enforced in this subforum.
reprep
Posts: 1074
Joined: Tue Dec 17, 2013 4:38 pm

Re: [PSPGo] DualShock3 R3 and L3 can be used

Post by reprep »

@RandQalan: Nope, i haven't tested it extensively. in fact i never noticed lag on DS3 before. but still it is great if it has less button delay.
Advertising
suloku
Posts: 117
Joined: Wed Jul 09, 2014 2:58 pm

Re: [PSPGo] DualShock3 R3 and L3 can be used

Post by suloku »

Wow, awesome Total_Noob, I'm really really impressed! This has become extremely exiting.

I'm gonna try to compile macrofire, If it compiles fine I'll try to make it work!
Too bad the normal buttons are nullified though.

By the way, there's this library called cmlibCtrlHook2 which purpose is essentially remapping: https://code.google.com/p/prx-common-li ... loads/list
It can be a great alternative to modifying macrofire since there's really easy sample code. Let's hope it doesn't conflict with whathever magic DS3remapper makes.

edit: I've looked at the DS3remapper source, it seems I was right after all. I think making normal psp controls work again would be easy, since "all it does" is read the ps3 button mapping and copy it over the psp button mapping. If I'm right, remapping should be really really simple, without macrofire or anything else. I'm gonna make a quick test.
Advertising
reprep
Posts: 1074
Joined: Tue Dec 17, 2013 4:38 pm

Re: [PSPGo] DualShock3 R3 and L3 can be used

Post by reprep »

suloku wrote:Wow, awesome Total_Noob, I'm really really impressed! This has become extremely exiting.

I'm gonna try to compile macrofire, If it compiles fine I'll try to make it work!
Too bad the normal buttons are nullified though.

By the way, there's this library called cmlibCtrlHook2 which purpose is essentially remapping: https://code.google.com/p/prx-common-li ... loads/list
It can be a great alternative to modifying macrofire since there's really easy sample code. Let's hope it doesn't conflict with whathever magic DS3remapper makes.

edit: I've looked at the DS3remapper source, it seems I was right after all. I think making normal psp controls work again would be easy, since "all it does" is read the ps3 button mapping and copy it over the psp button mapping. If I'm right, remapping should be really really simple, without macrofire or anything else. I'm gonna make a quick test.
great news, it would be much, much better if we didn't rely on macrofire as it has its own problems, and more plugins make things more complicated. if i had enough info, i would edit the plugin so that it reads the remap.ini in the SEPLUGINS folder and apply the remapping there.

remap.ini structure can be as simple as "Button value in Hex = Remapped Button value in Hex" of course remapping right and left analog would require more i guess.

i can test it here, thanks a lot.
Last edited by reprep on Sat Sep 06, 2014 9:48 am, edited 1 time in total.
Total-Noob
Guru
Posts: 536
Joined: Sat Feb 02, 2013 5:08 pm

Re: [PSPGo] DualShock3 R3 and L3 can be used

Post by Total-Noob »

suloku wrote:Wow, awesome Total_Noob, I'm really really impressed! This has become extremely exiting.

I'm gonna try to compile macrofire, If it compiles fine I'll try to make it work!
Too bad the normal buttons are nullified though.

By the way, there's this library called cmlibCtrlHook2 which purpose is essentially remapping: https://code.google.com/p/prx-common-li ... loads/list
It can be a great alternative to modifying macrofire since there's really easy sample code. Let's hope it doesn't conflict with whathever magic DS3remapper makes.

edit: I've looked at the DS3remapper source, it seems I was right after all. I think making normal psp controls work again would be easy, since "all it does" is read the ps3 button mapping and copy it over the psp button mapping. If I'm right, remapping should be really really simple, without macrofire or anything else. I'm gonna make a quick test.
Let me explain you the plugin : you can always get the DS3 buttons by using sceCtrl Read/Peek Buffer Positive/Negative Extra. The DS3Remapper plugin translates all not-extra calls to extra-calls. And because the extra-call has got a bigger SceCtrlData buffer, we have to read the buttons into an other buffer and then copy back to the original buffer, otherwise we'll expect a buffer overflow. Also important: by setting k1 to zero, we get all buttons (user buttons are not masked then).

Here is an untested example of button remapping (L2 -> X):
/* Copy buffer to pad */
int i;
for(i = 0; i < nBufs; i++)
{
memcpy(&pad, buffer + (i * 48), sizeof(SceCtrlData));

if(pad.Buttons & PSP_CTRL_L2)
{
pad.Buttons |= PSP_CTRL_CROSS;
pad.Buttons &= ~PSP_CTRL_L2;
}
}

TN
suloku
Posts: 117
Joined: Wed Jul 09, 2014 2:58 pm

Re: [PSPGo] DualShock3 R3 and L3 can be used

Post by suloku »

Thank you very much, I was already on it. By the way I've restored the normal psp buttons quite easily (I need to think of something for the analog stick though):

Code: Select all

SceCtrlData psppad;
sceCtrlReadBuf(&psppad, nBufs, a2, mode);

...

for(i = 0; i < nBufs; i++)
{
memcpy(&pad[i], buffer + (i * 48), sizeof(SceCtrlData));
pad[i].Buttons |= psppad.Buttons;
}
It's really easy actually, it just needs to implement some kind of configurable file, and since psppad holds the psp buttons they can be remapped too (like macrofire). This is awesome TN!
Last edited by suloku on Sat Sep 06, 2014 1:29 pm, edited 1 time in total.
ali_ihsan21
Posts: 683
Joined: Wed Jan 26, 2011 11:04 am

Re: [PSPGo] DualShock3 R3 and L3 can be used

Post by ali_ihsan21 »

This is wonderful news, another miracle from Total-Noob. I will leave office early to try this with my go.

Thank you total noob
PSP-1000 6.20 16 GB Pro C-2
PSP-go 6.20 32 GB LME 2.3 White
PSP-go 6.60 24 GB Pro C-2 / LME 2.3 Black
PS Vita Slim 8 GB 3.60 Henkaku
PS TV 3.60 Henkaku 1 TB Samsung Story
Thank you RepRep, Total_Noob, Suloku, Omega2058, TheFlow
reprep
Posts: 1074
Joined: Tue Dec 17, 2013 4:38 pm

Re: [PSPGo] DualShock3 R3 and L3 can be used

Post by reprep »

@Total-Noob: Your button remapping example works totally fine. i tried (R3 -> X), recompiled the plugin and it works great. Thanks a lot.

what should i do to remap right analog stick's directions to buttons (or to left analog stick?)
suloku
Posts: 117
Joined: Wed Jul 09, 2014 2:58 pm

Re: [PSPGo] DualShock3 R3 and L3 can be used

Post by suloku »

I'm working on a configuration file for the remaps, but first I need to re-enable the psp analog thumb. Bumped into a problem where after ORing the psp hardware buttons the L1 and R1 presses are actually then emulated to the psp controls, so I was getting R1+RTRIGGER when pressing R1 (I guess this doesn't happen in pops mode). For any psp game/app this doesn't affect since they won't recognize the R1 button or any combo with it, but if we wanted to remap them to other functions (volume for example) it would be a mess. I already fixed it, so moving to analog stick.
reprep wrote:@Total-Noob: Your button remapping example works totally fine. i tried (R3 -> X), recompiled the plugin and it works great. Thanks a lot.

what should i do to remap right analog stick's directions to buttons (or to left analog stick?)

Code: Select all

#define SENSITIVITY 20

			if(pad->Rsrv[0] >= 128+SENSITIVITY)
				pad[i].Buttons |= PSP_CTRL_CIRCLE;
			if(pad->Rsrv[0] <= 128-SENSITIVITY)
				pad[i].Buttons |= PSP_CTRL_SQUARE;
			if(pad->Rsrv[1] >= 128+SENSITIVITY)
				pad[i].Buttons |= PSP_CTRL_CROSS;
			if(pad->Rsrv[1] <= 128-SENSITIVITY)
				pad[i].Buttons |= PSP_CTRL_TRIANGLE;
(of course the definition doesn't go inside the function). Sensitivity 20 seems to work fine, but I haven't tried any games yet.
ali_ihsan21
Posts: 683
Joined: Wed Jan 26, 2011 11:04 am

Re: [PSPGo] DualShock3 R3 and L3 can be used

Post by ali_ihsan21 »

reprep wrote:@Total-Noob: Your button remapping example works totally fine. i tried (R3 -> X), recompiled the plugin and it works great. Thanks a lot.

what should i do to remap right analog stick's directions to buttons (or to left analog stick?)
Remapping of digital to right analog and square, triangle, X, O in another is vital imo, these are used generally in games like MHF and Resistance if someone shares that remap I would appreciate it
PSP-1000 6.20 16 GB Pro C-2
PSP-go 6.20 32 GB LME 2.3 White
PSP-go 6.60 24 GB Pro C-2 / LME 2.3 Black
PS Vita Slim 8 GB 3.60 Henkaku
PS TV 3.60 Henkaku 1 TB Samsung Story
Thank you RepRep, Total_Noob, Suloku, Omega2058, TheFlow
Total-Noob
Guru
Posts: 536
Joined: Sat Feb 02, 2013 5:08 pm

Re: [PSPGo] DualShock3 R3 and L3 can be used

Post by Total-Noob »

Just ask when you guys need help :) Btw, I'd make a specific remapper configuration for every game. In example, in GTA LCS it would be great to control the camera with the right analog stick :D

P.S. Please keep the project open source :)

TN
Locked

Return to “Programming and Security”