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

[PSPGo] DualShock3 R3 and L3 can be used

Post by suloku » Sat Aug 23, 2014 12:32 am

EDIT: this thread lead to Total-Noob writing a plugin that allows access to all DualShock3 buttons and sticks, grab the lattest version of the configurable plugin here!

I've searched and I haven't been able to find this anywhere and thought it was interesting, so I've come to share here.

I was messing with a control hook example and made a simple program to view the raw Buttons variable from SceCtrlData structure. I had my DS3 connected to my PSPGo and as expected L2 and R2 are redirected to L and R triggers, as all the other buttons are to the PSP corresponding buttons. But not the L3 and R3, which are seen by the PSP as two additional buttons:

PSP_CTRL_L3 = 0x000002
PSP_CTRL_R3 = 0x000004

For example this can be used with SSSSS (a screenshot plugin) to make the screenshots with the L3 or R3 button, since its configuration file uses the button value directly.

From uOFW I've seen that sony has functions to emulate button input, which may or might not be used to map the DS3, so this is just a guess but the L2 and R2 actual values may be 0x000400 and 0x000800 respectively (before being remapped, this won't work like L3 and R3 do). Also in uOFW there are reversed functions like "sceCtrlReadBufferPositiveExtra" which uses an extended structure (SceCtrlDataExt) which I think has the actual button presses of the DS3, including R2, L2 and the right analog stick; but I'm probably wrong with all this speculation.
Advertising
Last edited by suloku on Tue Sep 09, 2014 3:05 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 Aug 23, 2014 1:55 am

Try a PS1 eboot all buttons and even vibration work with PSPGo so reverse how that is done should lead you to something for even PSP game hopefully even digital to right analog would be nice
Advertising
Image

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 » Tue Aug 26, 2014 8:10 am

Look what I've got here :) I don't have a PSPGo anymore, but please see whether all buttons are right and whether you can use the second analog stick (this structure is used in PS1 games on PS Vita).

[spoiler]enum PspCtrlButtons
{
/** Select button. */
PSP_CTRL_SELECT = 0x000001,
/** L3 button. */
PSP_CTRL_L3 = 0x000002,
/** R3 button. */
PSP_CTRL_R3 = 0x000004,
/** Start button. */
PSP_CTRL_START = 0x000008,
/** Up D-Pad button. */
PSP_CTRL_UP = 0x000010,
/** Right D-Pad button. */
PSP_CTRL_RIGHT = 0x000020,
/** Down D-Pad button. */
PSP_CTRL_DOWN = 0x000040,
/** Left D-Pad button. */
PSP_CTRL_LEFT = 0x000080,
/** Left trigger. */
PSP_CTRL_LTRIGGER = 0x000100,
/** Right trigger. */
PSP_CTRL_RTRIGGER = 0x000200,
/** L2 button. */
PSP_CTRL_L2 = 0x000100,
/** R2 button. */
PSP_CTRL_R2 = 0x000200,
/** L1 button. */
PSP_CTRL_L1 = 0x000400,
/** R1 button. */
PSP_CTRL_R1 = 0x000800,
/** Triangle button. */
PSP_CTRL_TRIANGLE = 0x001000,
/** Circle button. */
PSP_CTRL_CIRCLE = 0x002000,
/** Cross button. */
PSP_CTRL_CROSS = 0x004000,
/** Square button. */
PSP_CTRL_SQUARE = 0x008000,
/** Home button. In user mode this bit is set if the exit dialog is visible. */
PSP_CTRL_HOME = 0x010000,
/** Hold button. */
PSP_CTRL_HOLD = 0x020000,
/** Music Note button. */
PSP_CTRL_NOTE = 0x800000,
/** Screen button. */
PSP_CTRL_SCREEN = 0x400000,
/** Volume up button. */
PSP_CTRL_VOLUP = 0x100000,
/** Volume down button. */
PSP_CTRL_VOLDOWN = 0x200000,
/** Wlan switch up. */
PSP_CTRL_WLAN_UP = 0x040000,
/** Remote hold position. */
PSP_CTRL_REMOTE = 0x080000,
/** Disc present. */
PSP_CTRL_DISC = 0x1000000,
/** Memory stick present. */
PSP_CTRL_MS = 0x2000000,
};

/** Returned controller data */
typedef struct SceCtrlData {
/** The current read frame. */
unsigned int TimeStamp;
/** Bit mask containing zero or more of ::PspCtrlButtons. */
unsigned int Buttons;
/** Left analogue stick, X axis. */
unsigned char Lx;
/** Left analogue stick, Y axis. */
unsigned char Ly;
/** Right analogue stick, X axis. */
unsigned char Rx;
/** Right analogue stick, Y axis. */
unsigned char Ry;
/** Reserved. */
unsigned int Reserved;
} SceCtrlData;[/spoiler]

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 Aug 30, 2014 9:39 pm

Thanks for the valuable info. Now we got R3 and L3 covered, still to go for R2, L2 and right analog.

this really made my day, waiting for more news.

if anyone needs a tester, i have a psp go setup with DS3.

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 » Sun Aug 31, 2014 9:51 am

i got some good and bad news.

i tried sssss plugin (it is a heck to find a working download link), and yes R3 and L3 values work perfectly fine for taking screenshots. i tried it in XMB, but i guess it will also work in game and pops too.

unfortunately values PSP_CTRL_L1 = 0x000400 and PSP_CTRL_R1 = 0x000800 doesn't work in XMB for sssss plugin. i guess this mapping only works within POPS.

i use macrofire 3.0.11 on my PSP GO for remapping buttons, unfortunately it doesn't use hex values, it uses button names like LTrigger, Circle, Up etc, so i couldn't test R3, L3 on it. i don't know if the source is avaliable so it can be recompiled for it to enable hex values. if possible, it would be great to have 2 extra buttons for macros, remapping other buttons etc.

thanks to both suloku and Total-Noob. Please tell me if you want any other test to be done.

EDIT: PSP_CTRL_L1 = 0x000400 and PSP_CTRL_R1 = 0x000800 doesn't work in POPS either. i tried all variations, L and R triggers on PSP go, L1, R1, L2 and R2 on DS3, none of them took the screenshot in sssss.

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 » Sun Aug 31, 2014 10:34 am

reprep wrote:i got some good and bad news.

i tried sssss plugin (it is a heck to find a working download link), and yes R3 and L3 values work perfectly fine for taking screenshots. i tried it in XMB, but i guess it will also work in game and pops too.

unfortunately values PSP_CTRL_L1 = 0x000400 and PSP_CTRL_R1 = 0x000800 doesn't work in XMB for sssss plugin. i guess this mapping only works within POPS.

i use macrofire 3.0.11 on my PSP GO for remapping buttons, unfortunately it doesn't use hex values, it uses button names like LTrigger, Circle, Up etc, so i couldn't test R3, L3 on it. i don't know if the source is avaliable so it can be recompiled for it to enable hex values. if possible, it would be great to have 2 extra buttons for macros, remapping other buttons etc.

thanks to both suloku and Total-Noob. Please tell me if you want any other test to be done.

EDIT: PSP_CTRL_L1 = 0x000400 and PSP_CTRL_R1 = 0x000800 doesn't work in POPS either. i tried all variations, L and R triggers on PSP go, L1, R1, L2 and R2 on DS3, none of them took the screenshot in sssss.
Sadly, I don't have a PSP Go, otherwise I would write a plugin that allows games/homebrews to use ALL buttons and even the 2. analog stick. Imagine GTA with mapped buttons...:D
TN

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

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

Post by RandQalan » Sun Aug 31, 2014 10:40 am

Heck I was thinking FF-0 with remap for digital pad to analog right much better control of camera
To bad I do not know enough to make the prx myself
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 Aug 31, 2014 11:51 am

Same here, I don't know enough to carry this on, but I don't think it is that difficult of a task for someone with the needed skills.

If I am right from what I saw in uOFW reverse engine source, sceCtrlReadBufferPositiveExtra should give the info of what is being pressed on the DS3. Macrofire is open source, so most of the work is already done there.
Also, macrofire detects the DS3 (well, the remapped DS3 buttons) when configuring the remaps, but the remaps won't work when using the DS3 (but work with the psp buttons), I wonder if this could be some kind of clue. Macrofire source code is too complicated for me.

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 » Sun Aug 31, 2014 12:05 pm

suloku wrote:Same here, I don't know enough to carry this on, but I don't think it is that difficult of a task for someone with the needed skills.

If I am right from what I saw in uOFW reverse engine source, sceCtrlReadBufferPositiveExtra should give the info of what is being pressed on the DS3. Macrofire is open source, so most of the work is already done there.
Also, macrofire detects the DS3 (well, the remapped DS3 buttons) when configuring the remaps, but the remaps won't work when using the DS3 (but work with the psp buttons), I wonder if this could be some kind of clue. Macrofire source code is too complicated for me.
macrofire remaps work with DS3, i use it all the time.

i mainly use it for remapping directional buttons on DS3, i play vertical shmups on my psp go with screen 90 degree rotated, so i have to remap the ds3 d-pad to accomadate 90 degree inverted control scheme.

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

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

Post by suloku » Mon Sep 01, 2014 10:40 am

Then I'll have to try again macrofire; I tried remapping a button combo to the screen button and didn't work, but the combo worked when used on the psp buttons.

Post Reply

Return to “Programming and Security”