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

DS3Remapper 0.3

Plugins for PSPs running on 6.XX
Locked
RandQalan
Posts: 468
Joined: Sun Aug 18, 2013 10:43 am

Re: DS3Remapper 0.3

Post by RandQalan »

reprep wrote:thanks, give me some time please. i will inform you.
*
EDIT: Can anyone test this please? it is only for Resistance Retribution and for the configuration above. Only enable it in GAME.TXT. it will disable internal PSP buttons, only DS3 enabled. It doesn't look for any .ini files. remapping is hardcoded. Please check if the issue remains. https://drive.google.com/file/d/0B6I815 ... sp=sharing
You know I should ask if maybe you could get FFType-O working :shock:
Advertising
Image
AmyGrrl
Posts: 13
Joined: Sun Jan 25, 2015 4:44 pm

Re: DS3Remapper 0.3

Post by AmyGrrl »

reprep wrote:thanks, give me some time please. i will inform you.
*
EDIT: Can anyone test this please? it is only for Resistance Retribution and for the configuration above. Only enable it in GAME.TXT. it will disable internal PSP buttons, only DS3 enabled. It doesn't look for any .ini files. remapping is hardcoded. Please check if the issue remains. https://drive.google.com/file/d/0B6I815 ... sp=sharing
Thanks for helping! This almost works! L1/L3/R3 works as expected. Thumb Sticks work perfectly. However L2, R1, R2 does nothing when pressing buttons.
Advertising
ali_ihsan21
Posts: 683
Joined: Wed Jan 26, 2011 11:04 am

Re: DS3Remapper 0.3

Post by ali_ihsan21 »

AmyGrrl wrote:
reprep wrote:thanks, give me some time please. i will inform you.
*
EDIT: Can anyone test this please? it is only for Resistance Retribution and for the configuration above. Only enable it in GAME.TXT. it will disable internal PSP buttons, only DS3 enabled. It doesn't look for any .ini files. remapping is hardcoded. Please check if the issue remains. https://drive.google.com/file/d/0B6I815 ... sp=sharing
Thanks for helping! This almost works! L1/L3/R3 works as expected. Thumb Sticks work perfectly. However L2, R1, R2 does nothing when pressing buttons.
If you want .ini file which will work with Resistance I can sen it to you.
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: DS3Remapper 0.3

Post by reprep »

https://drive.google.com/file/d/0B6I815 ... sp=sharing this one should work fine for resistance. i fixed a mistake, hope it works.
AmyGrrl
Posts: 13
Joined: Sun Jan 25, 2015 4:44 pm

Re: DS3Remapper 0.3

Post by AmyGrrl »

reprep wrote:https://drive.google.com/file/d/0B6I815 ... sp=sharing this one should work fine for resistance. i fixed a mistake, hope it works.
Thank you so much! This works amazing now. No more glitching. I really hope DS3Remapper does gets fixed/updated. Its the most useful program for the PSPGo.
reprep
Posts: 1074
Joined: Tue Dec 17, 2013 4:38 pm

Re: DS3Remapper 0.3

Post by reprep »

AmyGrrl wrote:
reprep wrote:https://drive.google.com/file/d/0B6I815 ... sp=sharing this one should work fine for resistance. i fixed a mistake, hope it works.
Thank you so much! This works amazing now. No more glitching. I really hope DS3Remapper does gets fixed/updated. Its the most useful program for the PSPGo.
glad it works. also thanks for recommendation for choosing alternate controls. it makes aiming so smooth. i disabled easy aiming. with DS3, it now plays great as a dual stick shooter. much better than some dual stick vita shooters (i am looking at you Unit 13).

I mainly did this to be sure of the trigger bug in DS3Remapper 0.3. When you assign R2 or L2 to R1 or L1 or to a combination including them, sometimes there are extra button presses which register as R1 or L1 where it should be R2 or L2. it probably originates from combining PSP inputs to DS3 inputs.

So use DS3Remapper 0.3 for your games, if you have some unwanted shoulder button presses, just tell me the combination you want and i can make one for spesific to that configuration. or you can do yours, here is the main.c, get the other files from the first post.

[spoiler]/*
DS3Remapper
Copyright (C) 2014, Total_Noob

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include <pspsdk.h>
#include <pspkernel.h>
#include <pspctrl.h>

#include <stdio.h>
#include <string.h>

PSP_MODULE_INFO("DS3Remapper", 0x1007, 1, 0);

#define MAKE_JUMP(a, f) _sw(0x08000000 | (((u32)(f) & 0x0FFFFFFC) >> 2), a);

#define HIJACK_FUNCTION(a, f, ptr) \
{ \
u32 func = a; \
static u32 patch_buffer[3]; \
_sw(_lw(func), (u32)patch_buffer); \
_sw(_lw(func + 4), (u32)patch_buffer + 8);\
MAKE_JUMP((u32)patch_buffer + 4, func + 8); \
_sw(0x08000000 | (((u32)(f) >> 2) & 0x03FFFFFF), func); \
_sw(0, func + 4); \
ptr = (void *)patch_buffer; \
}

int (* sceCtrlReadBuf)(SceCtrlData *pad, int nBufs, int a2, int mode);

int sceCtrlReadBufPatched(SceCtrlData *pad, int nBufs, int a2, int mode)
{
/* If it is not an extended SceCtrlData structure */
if(!(mode & 4))
{
/* A static buffer */
static char buffer[64 * 48];

/* Set k1 to zero to allow all buttons */
int k1 = pspSdkSetK1(0);

/* Call function with new arguments */
int res = sceCtrlReadBuf((SceCtrlData *)buffer, nBufs, 1, mode | 4);

/* Copy buffer to pad */
int i;
for(i = 0; i < nBufs; i++)
{
memcpy(&pad, buffer + (i * 48), sizeof(SceCtrlData));




if(pad.Buttons & 0x000002)
{
pad.Buttons |= 0x000040;
pad.Buttons &= ~0x000002;
}

if(pad.Buttons & 0x000004)
{
pad.Buttons |= 0x000010;
pad.Buttons &= ~0x000004;
}


if(pad.Buttons & 0x000400)
{
pad.Buttons |= 0x000020;
pad.Buttons &= ~0x000400;
}

if(pad[i].Buttons & 0x000800)
{
pad[i].Buttons |= 0x000080;
pad[i].Buttons &= ~0x000800;
}

if(pad[i].Lx >= 148)
{
pad[i].Buttons |= 0x002000;
}
if(pad[i].Lx < 108)
{
pad[i].Buttons |= 0x008000;
}

pad[i].Lx = 127;

if(pad[i].Ly >= 148)
{
pad[i].Buttons |= 0x004000;
}
if(pad[i].Ly < 108)
{
pad[i].Buttons |= 0x001000;
}

pad[i].Ly = 127;

pad[i].Lx = pad[i].Rsrv[0];
pad[i].Ly = pad[i].Rsrv[1];

}
/* Restore k1 */
pspSdkSetK1(k1);

/* Return result */
return res;
}

/* Call function with original arguments */
return sceCtrlReadBuf(pad, nBufs, a2, mode);
}

int module_start(SceSize args, void *argp)
{
/* Find ctrl.prx */
SceModule2 *mod = sceKernelFindModuleByName("sceController_Service");

/* Find function and hook it */
int i;
for(i = 0; i < mod->text_size; i += 4)
{
u32 addr = mod->text_addr + i;

if(_lw(addr) == 0x35030104)
{
HIJACK_FUNCTION(addr - 0x1C, sceCtrlReadBufPatched, sceCtrlReadBuf);
break;
}
}

/* Clear caches */
sceKernelDcacheWritebackAll();
sceKernelIcacheClearAll();

return 0;
}[/spoiler]

if you need hex values for button mappings, they are here: viewtopic.php?p=359545#p359545 look at the spoiler tag.

all credits to Total_Noob and suloku.
AmyGrrl
Posts: 13
Joined: Sun Jan 25, 2015 4:44 pm

Re: DS3Remapper 0.3

Post by AmyGrrl »

Your welcome. I put a lot of thought into the best way to setup the controls. So when I saw alternate controls had analog input for look/aim I knew I had to use it. So I was like map movement to the right thumb stick then swap thumb sticks. Then I thought of the best way to use the extra buttons. I didn't want to have to reach up and use the dpad. I like that everything is right there at your 2 thumbs and 2 index fingers. I did at one point remap Triangle, Square, Cross, Circle. But then I found it awkard/hard to proceed in the game when the game required the use of them. Its much better to just leave them as is. The controls are so awesome for this game now.

LOL! I thought the same thing when I was playing this with DS3 Controller. I've played Unit 13, Borderlands 2 and even the Resistance game for the Vita and found Resistance for the PSP with DS3 Controls to be a much better experience. Most games on the Vita have horrible lag/choppiness to them.

Thanks! When I have some free time. I wouldn't mind looking into making my own remapped controls like you did. I can usually figure stuff. Just not sure how to compile the source code into a prx plugin after. Any guides on how to do that?
reprep
Posts: 1074
Joined: Tue Dec 17, 2013 4:38 pm

Re: DS3Remapper 0.3

Post by reprep »

for psp sdk on windows, that is good enough. http://www.consolespot.net/forums/psp-h ... ygwin.html

change the psploadcore.h with this http://zerovsh-patcher.googlecode.com/s ... loadcore.h so that it compiles.

source code is available in the first post. also read this thread and the thread linked in the first post (how this plugin was born) for more info.
AmyGrrl
Posts: 13
Joined: Sun Jan 25, 2015 4:44 pm

Re: DS3Remapper 0.3

Post by AmyGrrl »

This took way to long to make. Plus I was a little bored. LOL You can include it with your DS3RemapperRES.prx if you want. I just googled a DS3 Controller clip art to make this. All the little Up, Down, Left, Right, Cross, Circle, Square, Triangle, Thumbstick icons I made myself. I also made it at 480x272 so it was viewable on the PSP.

Oh.. wanted ask. Is there any way you can still leave the note key enabled on the PSPGo when I'm running the DS3RemapperRES.prx so I can take a screenshot? Or do they all have to be disabled for everything to work? If you can't enable the Note key on the PSPGo can you make the Select Key the Note Key since its not used in the game. Thanks!
Attachments
DS3RemapperRES.png
DS3RemapperRES.png (61.01 KiB) Viewed 10589 times
reprep
Posts: 1074
Joined: Tue Dec 17, 2013 4:38 pm

Re: DS3Remapper 0.3

Post by reprep »

I can't enable PSP Note button unfortunately. I remapped Select button to Note, but i am not sure if it will work. Remapping of these special buttons are tricky. https://drive.google.com/file/d/0B6I815 ... sp=sharing

BTW i would like to know if you have other game spesific remappings. I have done two, Street Fighter Alpha Max, making 3xPunch and 3XKick buttons assigned to triggers and Ratchet&Clank Size Matters making games controllers identical to the PS2 version. That game is much better on PSP, but controls are definitely better at PS2. Now i can have best of the two worlds.
Locked

Return to “Plugins”