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.
suloku
Posts: 117
Joined: Wed Jul 09, 2014 2:58 pm

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

Post by suloku » Sat Sep 06, 2014 2:59 pm

Better than a specific remapper a configuration file would be great, which is what I'm aiming to.

Current progress:
All psp buttons restored.
L1/R1 and R2/L2 swapped (the PSP triggers are R2/L2, I swap them, then
Analog working fine.

To do:
- configurable remapping trough ini file or something like that
- little app to switch between config files per game or maybe a button combo to switch to next config.

I gotta go no, but here's my current source, the prx is compiled and all buttons work, R1 and L1 are the triggers (L2 and R2 do nothing) and the right analog is mapped to square, triangle, circle, cross: http://www.mediafire.com/download/9g208 ... pper_3.zip
Advertising

User avatar
reprep
Posts: 1074
Joined: Tue Dec 17, 2013 4:38 pm

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

Post by reprep » Sat Sep 06, 2014 3:25 pm

@suloku: Thanks a lot. All works fine. as i have the toolchain installed, i can remap any button now.

though i still want to ask for 2 remaps which i don't know how to do.

1) Mirroring Left analog on Right analog. Not as button presses but as 8 bit values on both x and y axis.

2) Remapping Left and Right analogs with 90 degree rotated clock wise or anti-clock wise. again not as button presses but as 8 bit values to keep full analog info. For example when i put the left analog fully up (Lx 128 Ly 0, it should register as Lx 255 Ly 128 for clockwise and Lx 0 Ly 128 for anti-clock wise)

Number 2 is needed for some games on psp go which lets rotated play. For example for Star Soldier PSP. you rotate the psp go and play it like that. it remaps the input buttons (d-pad and analog) for psp buttons but not for DS3 unfortunately. i used to do it with macrofire before but it can't remap analog as 8 bit x,y values, just as directions.
Advertising
Last edited by reprep on Sat Sep 06, 2014 3:51 pm, edited 1 time in total.

RandQalan
Posts: 468
Joined: Sun Aug 18, 2013 10:43 am

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

Post by RandQalan » Sat Sep 06, 2014 3:32 pm

suloku wrote:Better than a specific remapper a configuration file would be great, which is what I'm aiming to.

Current progress:
All psp buttons restored.
L1/R1 and R2/L2 swapped (the PSP triggers are R2/L2, I swap them, then
Analog working fine.

To do:
- configurable remapping trough ini file or something like that
- little app to switch between config files per game or maybe a button combo to switch to next config.

I gotta go no, but here's my current source, the prx is compiled and all buttons work, R1 and L1 are the triggers (L2 and R2 do nothing) and the right analog is mapped to square, triangle, circle, cross: http://www.mediafire.com/download/9g208 ... pper_3.zip
Working in PSP game and PSX game but any game that has JP accept button is either glitch or lockup
Example FF Typo 0 KHBBSFM lockup after load
Example Vagrant story USA PSN PSX will load but analog Left push left is L2 and
Hope this can be fixed especially right analog for camera would be nice for FF-0
Image

User avatar
ali_ihsan21
Posts: 679
Joined: Wed Jan 26, 2011 11:04 am

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

Post by ali_ihsan21 » Sat Sep 06, 2014 5:19 pm

Can someone remap this it for monster hunter please ? I cant see any sign of life of from my right analog, what am I missing here ? :?
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

User avatar
reprep
Posts: 1074
Joined: Tue Dec 17, 2013 4:38 pm

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

Post by reprep » Sat Sep 06, 2014 6:03 pm

@suloku:

Bug Report:

There is a problem with remapping R2 and L2 buttons. when i try to remap L2 to X for example (in TN's example), because your version switches L1 and L2, in test eboot it reports i remapped L1 (not L2) to X. in psp game (street fighter alpha 3 max), game behaves like i remapped both L1 and L2 to X.

it might be because of the built-in L2/L1, R2/R1 swap.

EDIT:

i want to ask something. First of all please forgive me as i don't know programming.

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

when i use this structure for remapping, i can't remap a button to a button combination which includes the very same button. let me tell you the scenario. i want to remap the L2 button to a combination of Left Trigger (same hexadecimal value as L2 with the first version TN posted) plus cross plus circle buttons. L2 button value is 0x000100, Left Trigger button value is again 0x000100, cross button value is 0x004000, circle button value is 0x002000, which makes the sum of 3 buttons 0x006100

so my code would be like:

if(pad.Buttons & 0x000100)
{
pad.Buttons |= 0x0006100;
pad.Buttons &= ~0x000100;
}

but if i do this, i get 0x0006000 in test program for L2 which is sum of cross button plus circle button only. also psp games behaves like this too.

if i use this instead:

if(pad.Buttons & 0x000100)
{
pad.Buttons = 0x006100;
}

i get what i want, 3 button combination in L2 both in test program and psp games.

i know this difference is because of the bit operations and i remember reading using bit operations is always faster than using a = b. so do i lose anything with my approach speed wise or compatibility wise etc?

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 » Sat Sep 06, 2014 7:39 pm

reprep wrote:@suloku:

Bug Report:

There is a problem with remapping R2 and L2 buttons. when i try to remap L2 to X for example (in TN's example), because your version switches L1 and L2, in test eboot it reports i remapped L1 (not L2) to X. in psp game (street fighter alpha 3 max), game behaves like i remapped both L1 and L2 to X.

it might be because of the built-in L2/L1, R2/R1 swap.

EDIT:

i want to ask something. First of all please forgive me as i don't know programming.

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

when i use this structure for remapping, i can't remap a button to a button combination which includes the very same button. let me tell you the scenario. i want to remap the L2 button to a combination of Left Trigger (same hexadecimal value as L2 with the first version TN posted) plus cross plus circle buttons. L2 button value is 0x000100, Left Trigger button value is again 0x000100, cross button value is 0x004000, circle button value is 0x002000, which makes the sum of 3 buttons 0x006100

so my code would be like:

if(pad.Buttons & 0x000100)
{
pad.Buttons |= 0x0006100;
pad.Buttons &= ~0x000100;
}

but if i do this, i get 0x0006000 in test program for L2 which is sum of cross button plus circle button only. also psp games behaves like this too.

if i use this instead:

if(pad.Buttons & 0x000100)
{
pad.Buttons = 0x006100;
}

i get what i want, 3 button combination in L2 both in test program and psp games.

i know this difference is because of the bit operations and i remember reading using bit operations is always faster than using a = b. so do i lose anything with my approach speed wise or compatibility wise etc?


How you've done is correct. the Y &= ~X does only clear out the button :)

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

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

Post by suloku » Sun Sep 07, 2014 2:32 am

RandQalan wrote:Example Vagrant story USA PSN PSX will load but analog Left push left is L2 and
Hope this can be fixed especially right analog for camera would be nice for FF-0
Did PSX have L3 and R3? I think that is a feature introduced in dual shock 2. I guess this is normal behavior even without the plugin, can you confirm?
About japanesse games... I don't have a clue, I'll check tomorrow.
EDIT: I tried another japanesse game and it worked normally. FF-Type0 doesn't seem to recognize 0 button press. Have you tried with the non-translated game?

@reprep: for button combos use the OR operand: pad.Buttons |= PSP_CTRL_CROSS | PSP_CTRL_TRIANGLE;

And yes, my R2/R1 swap needs some special handling for this. There's a major reason behind that: when I re-enabled the psp buttons, pressing L1 is detected by the firmware, then mapped to LTrigger (which has the same code as L2). That made pressing L1 to report both L1 and L2 being pressed. The optimal way would be to remove this remap by the firmware, but since I don't know how to do that, I made a workaround.

Mirroring analogs is very simple, and rotating the analogs is easy, I'll test tomorrow and get the remaps in comments. I'll add also swapping digital and lef analog; then I'll focus on the config file.

@Total_Noob: is there any difference between "Y &= ~X" and "Y ^= X"?

RandQalan
Posts: 468
Joined: Sun Aug 18, 2013 10:43 am

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

Post by RandQalan » Sun Sep 07, 2014 1:51 pm

Yes DS1 had L3 R3 but very few games use them well AFAIK maybe none but I have a DS1 controller it has L3 R3

and about FF-0 have not checked untranslated version but hey I want to play the trans version and what about VS PSX doing the strange problem because it used 0 for accept like JP games :)

More games that do this as well 3rd Birthday NA version Tales of Eternia EU FF4 Complete NA this may have something to do with remap main buttons to analog R
Image

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

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

Post by suloku » Sun Sep 07, 2014 4:30 pm

I wonder what might be the problem. Maybe it's related to the fact that remapping the Screen button works, but it doesn't toogle brightness levels or shut down the screen. I'll check again uOFW source.

EDIT: I think the configurable ds3remapper is ready. I also added options for rotating the sticks that reprep asked for. I missed the mirror the left analog to right analog, but I'll add that tomorrow. I'll probably add a sensitivity setting (like joysens) and an option to disable the psp/ds3 analog stick (maybe a separate option for each, since psp analogs on some models tend to flicker, I don't know about the go).

EDIT2: Here it is: http://www.mediafire.com/download/wzc6o ... er_0.1.zip

I mantained the DS3Remapper name and started from 0.1 to keep some track (I added the _3 to my other upload to differentiate it from the two files TN uploaded).

All testing has been done in the testing app, I haven't used it with games that much, so there might be something that slip, but I think everything is working correctly.

Gonna test with some psx and the unpatched ff type-0.

User avatar
reprep
Posts: 1074
Joined: Tue Dec 17, 2013 4:38 pm

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

Post by reprep » Mon Sep 08, 2014 6:42 pm

Thanks a lot. Configuration file works great.

A few suggestions for predefined remaps:

D-pad for Right analog stick (no more clawing, yay)

L trigger and R trigger for Right analog stick (some games use camera control via triggers which we are used to do it via right analog with modern controllers)

Remapping L1/2 and R1/2 still remains a problem. without remapping it works fine though. i will detail the bug.

what i want for L1/L2/R1/R2 is that:

R1: RTRIGGER (hex value:0x000200)
R2: LTRIGGER (hex value:0x000100)
L1: RTRIGGER + SQUARE + TRIANGLE (hex value:0x009200)
L2: LRIGGER + CROSS + CIRCLE (hex value:0x006100)

i can do this easily via enterinh hex values in the version TN posted, but when i enter these into ini file in DS3Remapper 0.1, what i get in the test program is:

R1:0x040200 (0x040000 is hex code of wlan switch, as it is on for bluetooth, it gets added too via psppad buttons, no problem, as the rest 0x000200 is correct)
R2:0x040300 (it had to be 0x040100 as i wanted it to be L-trigger, but it looks R-Trigger (or R1) got added too)
L1:0x049200 (correct)
L2:0x04F300 (it had to be 0x046100, it looks L1 got added too)

so it looks in remaps R1 gets added to the R2 and L1 gets added to the L2.
the problem might be lying in //Trigger remaps are special section, but i am not efficient at it unfortunately.

Post Reply

Return to “Programming and Security”