Hi,
I need use an ipega 9026 Gamepad. It works on "Emulation Station" only. Not on Emulators. Need help to mapping "X" , "Y" , "A" , "B" , "start" and "select" buttoms. Thanks.
What I made:
Add to "/etc/udev/rules.d/99-joysticks-exotics.rules" and "/overlay/overlay/etc/udev/rules.d/99-joysticks-exotics.rules" files this line:
SUBSYSTEM=="input", ATTRS{name}=="ipega gamepad controller", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"
Start using the GUI. Pair this Gamepad with Bluetooth and Mapped joystick keys with it. It's start working fine on "emulation station" software, but not for emulators. Over them, movements works, but A,Y,B,X buttons don't.
Find where retroarch config file is I think. when start a game, it uses "/recalbox/share/system/configs/retroarch/retroarchcustom.cfg" and find another config file on "/recalbox/share/system/.config/retroarch/retroarchcustom.cfg", so made this changes...
input_autodetect_enable = "true"
joypad_autoconfig_dir = "/recalbox/share/system/configs/retroarch/inputs/"
After that, create "/recalbox/share/system/configs/retroarch/inputs/ipega.cfg" file with joystick mapping.
input_device = "ipega gamepad controller"
input_driver = "udev"
input_b_btn = "305"
input_y_btn = "308"
input_select_btn = "314"
input_start_btn = "315"
input_up_btn = "4"
input_down_btn = "6"
input_left_btn = "7"
input_right_btn = "5"
input_a_btn = "304"
input_x_btn = "307"
input_l_btn = "310"
input_r_btn = "311"
input_l2_btn = "8"
input_r2_btn = "9"
input_l3_btn = "1"
input_r3_btn = "2"
input_l_x_plus_axis = "+0"
input_l_x_minus_axis = "-0"
input_l_y_plus_axis = "+1"
input_l_y_minus_axis = "-1"
input_r_x_plus_axis = "+2"
input_r_x_minus_axis = "-2"
input_r_y_plus_axis = "+3"
input_r_y_minus_axis = "-3"
input_analog_dpad_mode = "1"
input_menu_toggle_btn = "3"
input_exit_emulator_btn = "0"
input_load_state_btn = "12"
input_save_state_btn = "15"
input_state_slot_increase_btn = "5"
input_state_slot_decrease_btn = "7"
input_screenshot_btn = "8"
input_hold_fast_forward_axis = "+2"
input_rewind_axis = "-2"
On the "Emulation Station" GUI, associate "#0 ipega gamepad controller" to "Player 1" .
After that run "/recalbox/scripts/recalbox-save-overlay.sh" to store changes.
No Lucky. Retroarch detect the Gamepad, but only movements works.
To test my device, run "sdl2-jstest -e 0" . Press all this buttoms and here is this output with the specific key that was presed:
A:# sdl2-jstest -e 0
Joystick Name: 'ipega gamepad controller'
Joystick Path: '/dev/input/event10'
Joystick GUID: 0500000049190000020400001b010000
Joystick Number: 0
Number of Axes: 6
Number of Buttons: 183
Number of Hats: 1
Number of Balls: 1
GameController:
not a gamepad
Axis code 0: 0
Axis code 1: 1
Axis code 2: 2
Axis code 3: 5
Axis code 4: 9
Axis code 5: 10
Button code 0: 1
Button code 1: 2
Button code 2: 3
Button code 3: 4
Button code 4: 5
Button code 5: 6
Button code 6: 7
Button code 7: 8
Button code 8: 9
Button code 9: 10
Button code 10: 11
Button code 11: 12
Button code 12: 13
Button code 13: 14
Button code 14: 15
Button code 15: 16
Button code 16: 17
Button code 17: 18
Button code 18: 19
Button code 19: 20
Button code 20: 21
Button code 21: 22
Button code 22: 23
Button code 23: 24
Button code 24: 25
Button code 25: 26
Button code 26: 27
Button code 27: 28
Button code 28: 29
Button code 29: 30
Button code 30: 31
Button code 31: 32
Button code 32: 33
Button code 33: 34
Button code 34: 35
Button code 35: 36
Button code 36: 37
Button code 37: 38
Button code 38: 39
Button code 39: 40
Button code 40: 41
Button code 41: 42
Button code 42: 43
Button code 43: 44
Button code 44: 45
Button code 45: 46
Button code 46: 47
Button code 47: 48
Button code 48: 49
Button code 49: 50
Button code 50: 51
Button code 51: 52
Button code 52: 53
Button code 53: 54
Button code 54: 55
Button code 55: 56
Button code 56: 57
Button code 57: 58
Button code 58: 59
Button code 59: 60
Button code 60: 61
Button code 61: 62
Button code 62: 63
Button code 63: 64
Button code 64: 65
Button code 65: 66
Button code 66: 67
Button code 67: 68
Button code 68: 69
Button code 69: 70
Button code 70: 71
Button code 71: 72
Button code 72: 73
Button code 73: 74
Button code 74: 75
Button code 75: 76
Button code 76: 77
Button code 77: 78
Button code 78: 79
Button code 79: 80
Button code 80: 81
Button code 81: 82
Button code 82: 83
Button code 83: 85
Button code 84: 86
Button code 85: 87
Button code 86: 88
Button code 87: 89
Button code 88: 90
Button code 89: 91
Button code 90: 92
Button code 91: 93
Button code 92: 94
Button code 93: 95
Button code 94: 96
Button code 95: 97
Button code 96: 98
Button code 97: 99
Button code 98: 100
Button code 99: 102
Button code 100: 103
Button code 101: 104
Button code 102: 105
Button code 103: 106
Button code 104: 107
Button code 105: 108
Button code 106: 109
Button code 107: 110
Button code 108: 111
Button code 109: 113
Button code 110: 114
Button code 111: 115
Button code 112: 116
Button code 113: 117
Button code 114: 119
Button code 115: 121
Button code 116: 122
Button code 117: 123
Button code 118: 124
Button code 119: 125
Button code 120: 126
Button code 121: 127
Button code 122: 128
Button code 123: 129
Button code 124: 130
Button code 125: 131
Button code 126: 132
Button code 127: 133
Button code 128: 134
Button code 129: 135
Button code 130: 136
Button code 131: 137
Button code 132: 138
Button code 133: 140
Button code 134: 142
Button code 135: 150
Button code 136: 152
Button code 137: 158
Button code 138: 159
Button code 139: 161
Button code 140: 163
Button code 141: 164
Button code 142: 165
Button code 143: 166
Button code 144: 172
Button code 145: 173
Button code 146: 176
Button code 147: 177
Button code 148: 178
Button code 149: 179
Button code 150: 180
Button code 151: 183
Button code 152: 184
Button code 153: 185
Button code 154: 186
Button code 155: 187
Button code 156: 188
Button code 157: 189
Button code 158: 190
Button code 159: 191
Button code 160: 192
Button code 161: 193
Button code 162: 194
Button code 163: 240
Button code 164: 272
Button code 165: 273
Button code 166: 274
Button code 167: 304
Button code 168: 305
Button code 169: 306
Button code 170: 307
Button code 171: 308
Button code 172: 309
Button code 173: 310
Button code 174: 311
Button code 175: 312
Button code 176: 313
Button code 177: 314
Button code 178: 315
Button code 179: 316
Button code 180: 317
Button code 181: 318
Button code 182: 319
Hat code 0: 16
Entering joystick test loop, press Ctrl-c to exit
SDL_JOYDEVICEADDED which:0
SDL_JOYBUTTONDOWN: joystick: 0 button: 167 state: 1 code:304
SDL_JOYBUTTONUP: joystick: 0 button: 167 state: 0 code:304
B:
SDL_JOYBUTTONDOWN: joystick: 0 button: 168 state: 1 code:305
SDL_JOYBUTTONUP: joystick: 0 button: 168 state: 0 code:305
Y:
SDL_JOYBUTTONDOWN: joystick: 0 button: 171 state: 1 code:308
SDL_JOYBUTTONUP: joystick: 0 button: 171 state: 0 code:308
X:
SDL_JOYBUTTONDOWN: joystick: 0 button: 170 state: 1 code:307
SDL_JOYBUTTONUP: joystick: 0 button: 170 state: 0 code:307
SELECT:
SDL_JOYBUTTONDOWN: joystick: 0 button: 177 state: 1 code:314
SDL_JOYBUTTONUP: joystick: 0 button: 177 state: 0 code:314
START:
SDL_JOYBUTTONDOWN: joystick: 0 button: 178 state: 1 code:315
SDL_JOYBUTTONUP: joystick: 0 button: 178 state: 0 code:315
UP_KEY:
SDL_JOYHATMOTION: joystick: 0 hat: 0 value: 1 code: 16
SDL_JOYHATMOTION: joystick: 0 hat: 0 value: 0 code: 16
DOWN_KEY:
SDL_JOYHATMOTION: joystick: 0 hat: 0 value: 4 code: 16
SDL_JOYHATMOTION: joystick: 0 hat: 0 value: 0 code: 16
LEFT_KEY:
SDL_JOYHATMOTION: joystick: 0 hat: 0 value: 8 code: 16
SDL_JOYHATMOTION: joystick: 0 hat: 0 value: 0 code: 16
RIGHT_KEY:
SDL_JOYHATMOTION: joystick: 0 hat: 0 value: 2 code: 16
SDL_JOYHATMOTION: joystick: 0 hat: 0 value: 0 code: 16
L1:
SDL_JOYBUTTONDOWN: joystick: 0 button: 173 state: 1 code:310
SDL_JOYBUTTONUP: joystick: 0 button: 173 state: 0 code:310
R1:
SDL_JOYBUTTONDOWN: joystick: 0 button: 174 state: 1 code:311
SDL_JOYBUTTONUP: joystick: 0 button: 174 state: 0 code:311
LeftAxisJoystick_UP:
SDL_JOYAXISMOTION: joystick: 0 axis: 1 value: -32768 code: 1
SDL_JOYAXISMOTION: joystick: 0 axis: 1 value: -23694 code: 1
SDL_JOYAXISMOTION: joystick: 0 axis: 1 value: -15292 code: 1
SDL_JOYAXISMOTION: joystick: 0 axis: 1 value: -6890 code: 1
SDL_JOYAXISMOTION: joystick: 0 axis: 1 value: 0 code: 1
LeftAxisJoystick_DOWN:
SDL_JOYAXISMOTION: joystick: 0 axis: 1 value: 32767 code: 1
SDL_JOYAXISMOTION: joystick: 0 axis: 1 value: 0 code: 1
LeftAxisJoystick_LEFT:
SDL_JOYAXISMOTION: joystick: 0 axis: 0 value: -15628 code: 0
SDL_JOYAXISMOTION: joystick: 0 axis: 0 value: -32768 code: 0
SDL_JOYAXISMOTION: joystick: 0 axis: 0 value: -26047 code: 0
SDL_JOYAXISMOTION: joystick: 0 axis: 0 value: 0 code: 0
LeftAxisJoystick_RIGHT:
SDL_JOYAXISMOTION: joystick: 0 axis: 0 value: 19660 code: 0
SDL_JOYAXISMOTION: joystick: 0 axis: 0 value: 32767 code: 0
SDL_JOYAXISMOTION: joystick: 0 axis: 0 value: 30751 code: 0
SDL_JOYAXISMOTION: joystick: 0 axis: 0 value: 13611 code: 0
SDL_JOYAXISMOTION: joystick: 0 axis: 0 value: 0 code: 0
RightAxisJoystick_UP:
SDL_JOYAXISMOTION: joystick: 0 axis: 3 value: -8571 code: 5
SDL_JOYAXISMOTION: joystick: 0 axis: 3 value: -32768 code: 5
SDL_JOYAXISMOTION: joystick: 0 axis: 3 value: -22350 code: 5
SDL_JOYAXISMOTION: joystick: 0 axis: 3 value: -10587 code: 5
SDL_JOYAXISMOTION: joystick: 0 axis: 3 value: 0 code: 5
RightJoystick_DOWN:SDL_JOYAXISMOTION: joystick: 0 axis: 3 value: 32767 code: 5
SDL_JOYAXISMOTION: joystick: 0 axis: 3 value: 22685 code: 5
SDL_JOYAXISMOTION: joystick: 0 axis: 3 value: 8570 code: 5
SDL_JOYAXISMOTION: joystick: 0 axis: 3 value: 0 code: 5
RightAxisJoystick_LEFT:
SDL_JOYAXISMOTION: joystick: 0 axis: 2 value: -23358 code: 2
SDL_JOYAXISMOTION: joystick: 0 axis: 2 value: -32768 code: 2
SDL_JOYAXISMOTION: joystick: 0 axis: 2 value: 0 code: 2
RightAxisJoystick_RIGHT:
SDL_JOYAXISMOTION: joystick: 0 axis: 2 value: 32767 code: 2
SDL_JOYAXISMOTION: joystick: 0 axis: 2 value: 0 code: 2
Somebody can guide me in right direction?
Thanks a lot.