OLD Gamepad Autoconfig Thread

Is this post useful for devs or codes are not still included in retroarch code? No offence, just asking :slight_smile:

Adding new pads has been low priority recently, but that will change at some point.

Ok, thanks for the answer… If I would try to modify the source myself to include controllers, but compiling it I’d have errors, could I have support? Thanks in advantage and sorry if I’m OT.

As long as it wasn’t related to input, I think you’d be fine. Adding the gamepads isn’t too difficult, and you should be able to figure out how it works based on the existing mappings.

If you fork RetroArch on github, you can add your pad(s) and then send Squarepusher a pull request and get it merged into mainline (assuming it’s all done properly).

A while back (I’m not sure what version), using the Sixaxis IME (with ‘Enable Gamepad’ ticked and nothing remapped from default) with a legit DualShock3, and RetroArch set to Autodetect controller mappings, I was able to hit the PS logo key on the controller and it would bring up the green RGUI menu.

Now that same button in RetroArch 1.0.0 will act as if I’m hitting the actual Android ‘Home’ button and go back to the home screen.

Have the mappings changed for the DualShock 3 when it’s detected by RA’s Autodetect recently?

Ok thanks again :slight_smile: I’ve wrote a post about problems compiling code.

I am using the official Samsung gamepad.

This is the detected controller: “Samsung Game Pad EI-GP20”

When pressing the d-pad I can’t really see the number for the d pad buttons, because the text is very long and it gets cut off midscreen. So If i press dpad up I see "Pad 0: x 0:00, y 0.00, z 0.00, rz 0.00, " The D-Pad and analogue stick do work though without any need of configuration. So they are already working, and arent as important as the buttons.

I will provide this anyway, here are the codes that show up when I press the left analog stick: UP:"Pad 0: x 0:00, y -1.00, z 0.00, rz 0.00, " Down:"Pad 0: x 0:00, y 1.00, z 0.00, rz 0.00, " Right: "Pad 0: x 1:00, y 0.00, z 0.00, rz 0.00, " Left: "Pad 0: x -1:00, y 0.00, z 0.00, rz 0.00, "

Here the codes that show up for the button presses:

B: “Pad 0: 96, ac=1, src = 1281” A: “Pad 0: 97, ac=1, src = 1281” X: “Pad 0: 99, ac=1, src = 1281” Y: “Pad 0: 100, ac=1, src = 1281”

Left Trigger: “Pad 0: 102, ac=1, src = 1281” Right Trigger: “Pad 0: 103, ac=1, src = 1281”

Play Button: “Pad 0: 0, ac=1, src = 1281”

Start: “Pad 0: 108, ac=1, src = 1281” Select: “Pad 0: 109, ac=1, src = 1281”

XArcade Dual Joystick: Traditional stick and six button configuration with 2 extra buttons below the six buttons. Player 1 and Player 2 Coin Buttons and a button on each of the side panels.

Detected Controller: “XGaming X-Arcade”

Player 1 Stick up: “Pad 0: 152, ac=1, src = 257” Stick down: “Pad 0: 146, ac=1, src = 257” Stick left: “Pad 0: 148, ac=1, src = 257” Stick right: “Pad 0: 150, ac=1, src = 257” Light Punch: “Pad 0: 113, ac=1, src = 257” Med. Punch: “Pad 0: 57, ac=1, src = 257” Heavy Punch: “Pad 0: 62, ac=1, src = 257” Light Kick: “Pad 0: 59, ac=1, src = 257” Med. Kick: “Pad 0: 54, ac=1, src = 257” Heavy Kick: “Pad 0: 52, ac=1, src = 257” Coin 1: “Pad 0: 8, ac=1, src = 257” Select(Left Side Panel Button) “Pad 0: 10, ac=1, src = 257” Bottom Left (Left Button Under six buttons) “Pad 0: 31, ac=1, src = 257” Bottom Right (Right Button Under six buttons) “Pad 0: 12, ac=1, src = 257”

Player 2 Stick up: “Pad 0: 46, ac=1, src = 257” Stick down: “Pad 0: 34, ac=1, src = 257” Stick left: “Pad 0: 32, ac=1, src = 257” Stick right: “Pad 0: 35, ac=1, src = 257” Light Punch: “Pad 0: 29, ac=1, src = 257” Med. Punch: “Pad 0: 47, ac=1, src = 257” Heavy Punch: “Pad 0: 45, ac=1, src = 257” Light Kick: “Pad 0: 51, ac=1, src = 257” Med. Kick: “Pad 0: 33, ac=1, src = 257” Heavy Kick: “Pad 0: 71, ac=1, src = 257” Coin 2: “Pad 0: 9, ac=1, src = 257” Select(Left Side Panel Button) “Pad 0: 11, ac=1, src = 257” Bottom Left (Left Button Under six buttons) “Pad 0: 72, ac=1, src = 257” Bottom Right (Right Button Under six buttons) “Pad 0: 13, ac=1, src = 257”

Submitting the gamepad info for the Mad Catz MOJO android console.

You would need the mojo button coordinates so that you can add mojo to the list of device, correct?

And you need the hex code for each button, which is here: http://www.madcatz.com/products/gamesmart/hdk/

If it helps, the Mad Catz C.T.R.L.R Mobile Gamepad, including M.O.J.O. app requirements (Developer Information Version 1.6, This PDF): http://www.madcatz.com/products/game…_Info_v1_6.pdf

Would you need to add a “save input device” feature since otherwise you have to change the input device for every game? Not sure how it works or if this is the right thread. Thanks for your time!

Moga Power’s L2 and R2 buttons won’t work. Can’t even map them with custom controls.

With debugging on, this is what displays when pressing them: L2 - Pad 0 : x 0.00, y 0.00, z 0.00, rz 0.00, src 16777232 R2 - Pad 0 : x 0.00, y 0.00, z 0.00, rz 0.00, src 16777232

Not sure why both buttons register the same identical thing…

Running CM11 also

Hi, It looks like the Moga gamepad bindings have been removed from the input_android.c source. Judging by the history it was taken out in the Jan 12 2014 update. Below are the bindings that were removed. Was this done on purpose? Now Retroarch will auto detect the Moga Pocket but doesn’t bind anything.

case DEVICE_MOGA: g_settings.input.device[port] = device; android->dpad_emulation[port] = ANALOG_DPAD_NONE; strlcpy(g_settings.input.device_names[port], “MOGA”, sizeof(g_settings.input.device_names[port]));

        android->keycode_lut[AKEYCODE_DPAD_UP] |=  ((RETRO_DEVICE_ID_JOYPAD_UP+1)      << shift);
        android->keycode_lut[AKEYCODE_DPAD_DOWN] |=  ((RETRO_DEVICE_ID_JOYPAD_DOWN+1)      << shift);
        android->keycode_lut[AKEYCODE_DPAD_LEFT] |=  ((RETRO_DEVICE_ID_JOYPAD_LEFT+1)      << shift);
        android->keycode_lut[AKEYCODE_DPAD_RIGHT] |=  ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1)      << shift);
        android->keycode_lut[AKEYCODE_BUTTON_A] |=  ((RETRO_DEVICE_ID_JOYPAD_B+1)      << shift);
        android->keycode_lut[AKEYCODE_BUTTON_X] |=  ((RETRO_DEVICE_ID_JOYPAD_Y+1)      << shift);

        android->keycode_lut[AKEYCODE_BUTTON_START] |=  ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift);
        android->keycode_lut[AKEYCODE_BUTTON_SELECT] |= ((RETRO_DEVICE_ID_JOYPAD_START+1)  << shift);

        android->keycode_lut[AKEYCODE_BUTTON_B] |=  ((RETRO_DEVICE_ID_JOYPAD_A+1)      << shift);
        android->keycode_lut[AKEYCODE_BUTTON_Y] |=  ((RETRO_DEVICE_ID_JOYPAD_X+1)      << shift);
        android->keycode_lut[AKEYCODE_BUTTON_L1] |=  ((RETRO_DEVICE_ID_JOYPAD_L+1)      << shift);
        android->keycode_lut[AKEYCODE_BUTTON_R1] |=  ((RETRO_DEVICE_ID_JOYPAD_R+1)      << shift);
        break;

Could you add support for GPD-G5A? It’s a chinese gamepad-console. Custom binds work fine, and performance is great in this machine:

Port 0: tincore-joy

Left analog:

Left: Pad 0: x -1.00, y 0.00, z 0.00, rz 0.00 Right: Pad 0: x 1.00, y 0.00, z 0.00, rz 0.00 Up: Pad 0: x 0.00, y -1.00, z 0.00, rz 0.00 Down: Pad 0: x 0.00, y 1.00, z 0.00, rz 0.00

Right analog:

Left: Pad 0: x 0.00, y 0.00, z -1.00, rz 0.00 Right: Pad 0: x 0.00, y 0.00, z 1.00, rz 0.00 Up: Pad 0: x 0.00, y 0.00, z 0.00, rz -1.00 Down: Pad 0: x 0.00, y 0.00, z 0.00, rz 1.00

D-PAD Left: Pad 0: 21, ac = 0, src = 1281 D-PAD Right: Pad 0: 22, ac = 0, src = 1281 D-PAD Up: Pad 0: 19, ac = 0, src = 1281 D-PAD Down: Pad 0: 20, ac = 0, src = 1281

Button Y: Pad 0: 100, ac = 0, src = 1281 (placed as triangle in psx layouts) Button B: Pad 0: 96, ac = 0, src = 1281 (placed as cross in psx layout) Button X: Pad 0: 99, ac = 0, src = 1281 (placed as Square in psx layouts) Button A: Pad 0: 97, ac = 0, src = 1281 (placed as Circle in Psx layouts)

L1: Pad 0: 102, ac = 0, src = 1281 R1: Pad 0: 103, ac = 0, src = 1281

L2: Pad 0: 104, ac = 0, src = 1281 R2: Pad 0: 105, ac = 0, src = 1281

button_ThumbL: Pad 0: 106, ac = 0, src = 1281 (like l3 in PS3) Button_ThumbR: Pad 0: 107, ac = 0, src = 1281 (like R3 in ps3)

START: Pad 0: 108, ac = 0, src = 1281 SELECT: Pad 0: 109, ac = 0, src = 1281

Thanks so much for this wonderful emu.

I use a ThrustMaster firestorm digital 3 via OTG cable in my Galaxy note 2 with 4.4 OmniRom.

After the last update via Play Store, I cannot use the Direction Pad. I can use in the launcher, can remap it in setting but I cannot use in game anymore, the other buttons work fine , only the direction pad is not working.

Please advise!

Addition: I used RetroArch-armv7-v1.0.0.1-r30.apk and the d-pad is working properly, so my problem exist only at the last version from Play store.

In the list of supported controllers, there’s “Zeemote Steelseries” listed. Is this referring to the Zeemote JS1, or the Zeemote Steelseries Free, or both? I have a ZSF and after trying to configure it, all I can get working is the DPAD. I dunno if I’m doing something wrong, but I feel like I’m on the cusp of success, I just can’t quite manage it. I don’t have either my tablet or the controller with me, so I can’t post controller codes, atm, but I did want to clear up this confusion. Thanks, cheers.

Android input driver is due a rewrite, until then analogs are hit and miss at best

Is that addressed to me? I can live without analog stick support, but none of the eight buttons respond in the emulator, only the DPAD responds to input. I can’t do anything with the controller except navigate menus. I guess the zeemote support is more for the JS1 than the ZSF, so I’ll be sure to post the input codes when I get a chance. Thanks.

Edit: Ok here’s the codes, the controller identifies as “Zeemote Steelseries FREE”

This is for the Joypad mode of the controller. All lines are in this format: “Pad 0: xxx, ac=0, src 1281” where xxx is the number below.

Left Trigger: 102 Right Trigger: 103 A (Select): 110 B (Start): 108 1 (Left button): 99 2 (Top button): 100 3 (Right button): 97 4 (Bottom button): 96

Left Stick: Pressed LEFT: x= -1 Pressed RIGHT: x= 1 Pressed UP: y= -1 Pressed DOWN: y= 1

Right Stick: Pressed LEFT: z= -1 Pressed RIGHT: z=1 Pressed UP: ? Pressed DOWN: ?

Unfortunately my screen cuts off the after the Z Axis, so I can’t tell what the values are for Right stick UP, and Right stick DOWN. DPAD in all directions shows 0s on X, Y, and Z axis, and as above, I can’t see further than the Z Axis.

The Zeemote Steelseries FREE also has a keyboard mode. For android, the Joypad mode is preferred to the keyboard mode, the manual only recommends the keyboard mode for IOS, nevertheless, I’m going to post the values here. Even though it was identified as a hardware keyboard in android, the IME reporter only shows my software keyboard.

As before, the controller is reported as “Zeemote Steelseries FREE” Lines below will follow this template: “Pad 0: xx, yy, ac=1, scr 257” the ac value briefly (like split second) changes to 0, then reverts to 1.
When I press each key, one value is given (xx in above example), when I release it, another value is give (yy in above example).

Left Trigger: 37, 41 Right Trigger: 39, 44 A (Select): 43, 35 B (Start): 40, 50 1 (Left button): 53, 48 2 (Top button): 49, 34 3 (Right button): 38, 42 4 (Bottom button): 36, 46

DPAD UP: 51, 33 DPAD DOWN: 52, 54 DPAD LEFT: 29, 45 DPAD RIGHT: 32, 31

Both analog sticks act as the DPAD, reporting the same values as in the block above.

Thanks again for your time and patience.

PSX Dual Analog (ps1) Controller used through a Generic PS2toPC converter - Twin USB Joystick

Since most of the fonts in retroarch get cut off on my device I will show the output of dmsg and logcat

dmesg shows this <6>[ 5967.354064] usb 1-1: new low speed USB device number 2 using usb20_otg <6>[ 5967.568815] usb 1-1: New USB device found, idVendor=0810, idProduct=0001 <6>[ 5967.568935] usb 1-1: New USB device strings: Mfr=0, Product=2, SerialNumber=0 <6>[ 5967.569062] usb 1-1: Product: Twin USB Joystick <6>[ 5967.586944] input: Twin USB Joystick as /devices/platform/usb20_otg/usb1/1-1/1-1:1.0/input/input3 <6>[ 5967.590740] input: Twin USB Joystick as /devices/platform/usb20_otg/usb1/1-1/1-1:1.0/input/input4 <6>[ 5967.596380] pantherlord 0003:0810:0001.0001: input: USB HID v1.10 Joystick [Twin USB Joystick] on usb-usb20_otg-1/input0 <6>[ 5967.596484] pantherlord 0003:0810:0001.0001: Force feedback for PantherLord/GreenAsia devices by Anssi Hannula <[email protected]>

LogCat I/RetroArch: ( 6454): device name: Twin USB Joystick I/RetroArch: ( 6454): Detecting keybinds. Device 0 port 0 id 5 keybind_action 4 I/RetroArch: ( 6454): Input debug: Port 0: Twin USB Joystick. I/RetroArch: ( 6454):

//DPad Dpad actually already works when analog button is pressed on the controller Dpad UP / Down / left / Right - [analog mode ] = Input debug: Pad 0 : x 0.00, y 0.00, z -0.00, rz -0.00, src 16777232.

When Controller is switched out of analog mode it reports these values for the Dpad // Dpad up (no analog) = Input debug: Pad 0 : x -0.00, y -1.00, z -0.00, rz -0.00, src 16777232. Dpad Down (no analog) = Input debug: Pad 0 : x -0.00, y 1.00, z -0.00, rz -0.00, src 16777232. Dpad Left (no analog) = Input debug: Pad 0 : x -1.00, y -0.00, z -0.00, rz -0.00, src 16777232. Dpad Right (no analog) = Input debug: Pad 0 : x 1.00, y -0.00, z -0.00, rz -0.00, src 16777232.

//Analog Controls “Left Analog” UP [Max] = Input debug: Pad 0 : x 0.00, y -1.00, z 0.00, rz 0.00, src 16777232. “Left Analog” Down [Max] = Input debug: Pad 0 : x 0.00, y 1.00, z -0.00, rz -0.00, src 16777232. “Left Analog” Left [Max] =Input debug: Pad 0 : x -1.00, y 0.00, z 0.00, rz 0.00, src 16777232. “Left Analog” Right [Max] = Input debug: Pad 0 : x 1.00, y 0.00, z 0.00, rz 0.00, src 16777232.

“Right Analog” UP [Max] = Input debug: Pad 0 : x -0.00, y 0.00, z -1.00, rz 0.00, src 16777232. “Right Analog” Down [Max] = Input debug: Pad 0 : x -0.00, y 0.00, z 1.00, rz 0.00, src 16777232. “Right Analog” Left [Max] = Input debug: Pad 0 : x 0.00, y 0.00, z 0.00, rz -1.00, src 16777232. “Right Analog” Right [Max] = Input debug: Pad 0 : x 0.00, y 0.00, z 0.00, rz 1.00, src 16777232.

//Buttons Start = Input debug: Pad 0 : 197, ac = 1, src = 1281. Select = Input debug: Pad 0 : 196, ac = 1, src = 1281. Triangle = Input debug: Pad 0 : 188, ac = 1, src = 1281. Square = Input debug: Pad 0 : 191, ac = 1, src = 1281. X = Input debug: Pad 0 : 190, ac = 1, src = 1281. Circle = Input debug: Pad 0 : 189, ac = 1, src = 1281. L1 = Input debug: Pad 0 : 194, ac = 1, src = 1281. L2 = Input debug: Pad 0 : 192, ac = 1, src = 1281. L3 = Input debug: Pad 0 : 198, ac = 1, src = 1281. R1 = Input debug: Pad 0 : 195, ac = 1, src = 1281. R2 = Input debug: Pad 0 : 193, ac = 1, src = 1281. R3 = Input debug: Pad 0 : 199, ac = 1, src = 1281.

Odd thing is retroarch announces the connected game pad as Broadcom 0 on my GS4 but on my xperia tab z it gets announced as steel free. On my xperia tab z I have to manually map to even use it. On my GS4 it works without having to configure only have to set I cadre profile to G910 but this doesn’t work on my Xeperia tab?

Anyways, new to the forum and I came here looking for answers regarding controller support. Happy to see this thread:)

Awesome program by the way, thank you Retroarch team :slight_smile:

Anyone post X-Arcade yet?

Cheers

I saw that someone posted the inputs to the gametel gamepad, but it doesn’t look like it was added. Here are the codes again. Port 0: Gametel

From the previous post for the gametel controller, the inputs were UP: Pad 0 : 19, ac = 0, src = 0. DOWN: Pad 0 : 20, ac = 0, src = 0. LEFT: Pad 0 : 21, ac = 0, src = 0. RIGHT: Pad 0 : 22, ac = 0, src = 0. SELECT: Pad 0 : 109, ac = 0, src = 0. START: Pad 0 : 108, ac = 0, src = 0.

SQUARE: Pad 0 : 99, ac = 0, src = 0. TRIANGLE: Pad 0 : 100, ac = 0, src = 0. CROSS: Pad 0 : 101, ac = 0, src = 0. CIRCLE: Pad 0 : 98, ac = 0, src = 0.

L1: Pad 0 : 102, ac = 0, src = 0. R1: Pad 0 : 103, ac = 0, src = 0.

I checked the inputs and the only difference in numbers was in the circle and cross positions. On my phone, src won’t completely display so I’m going to assume those are correct. I’m using a Moto x phone to run the app. Not sure it it’s supposed to do this, but the controller registers in the app menu and i can navigate through there with it, but the games don’t register the controller inputs. I’m using the controller in the HID gamepad mode required to work with Motorola phones. Thanks.

the controller identifies as “jxdkey_driver.”

The Controller is built into the phone All lines are in this format: “Pad 0: xxx, ac=0, src 1281” where xxx is the number below.

L1: 102 L2: 104 R1: 103 R2: 105 Circle: 96 X: 97 square:100 Triangle:99 Left: 21 Right: 22 Down: 20 Up: 19 Start=108 Select=109

Left Stick: Pressed LEFT: x= -1 Pressed RIGHT: x= 1 Pressed UP: y= -1 Pressed DOWN: y= 1

Right Stick: Pressed LEFT: z= -1 Pressed RIGHT: z=1 Pressed UP: ? Pressed DOWN: ?