You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In-depth and structured explanation of the mapping and labeling process, with a particular emphasis on analog inputs and PlayStation controllers.
Most notably, changed
```
input_l2_axis_label = "L2"
input_r2_axis_label = "R2"
```
to
```
input_l2_axis_label = "L2 Analog"
input_r2_axis_label = "R2 Analog"
```
Copy file name to clipboardExpand all lines: docs/guides/controller-autoconfiguration.md
+55-10Lines changed: 55 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -227,6 +227,7 @@ input_product_id = "3570"
227
227
228
228
The second part is the mapping itself, where each button is assigned to a button of the RetroPad (the joypad abstraction of RetroArch).
229
229
230
+
Example
230
231
```
231
232
input_b_btn = "0"
232
233
input_y_btn = "2"
@@ -255,26 +256,70 @@ input_r_y_minus_axis = "-4"
255
256
input_menu_toggle_btn = "8"
256
257
```
257
258
258
-
#### Axes (analog inputs)
259
+
Note: These values are examples and should not be directly copied to your configuration file without verification.
259
260
260
-
* Variable names ending with `_axis` define these (e.g., `input_l_x_axis`, `input_r2_axis`).
261
-
* They represent analog inputs from the controller, like joystick position (e.g., left joystick X-axis, right joystick Y-axis) or trigger pressure (e.g., left trigger, right trigger).
261
+
#### Overview
262
+
263
+
##### Axes (analog inputs)
264
+
* They represent analog inputs from the controller, like joystick position (e.g., left joystick X-axis, right joystick Y-axis) or trigger pressure (e.g., L2 trigger, R2 trigger).
265
+
* Variable names (for both mappings and labels) includes `_axis` define these (e.g., `input_l_x_plus_axis_label`, `input_r2_axis`).
266
+
267
+
| Console | Controller | Release Date | Analog Thumb Sticks | L2/R2 Analog |
* Axis definitions use `+` and `-` to indicate positive or negative direction (e.g., full press vs. no press).
263
279
* The current RetroArch configurations have axis values that ranges from `0` to `10`. However, if RetroArch does not limit the values to `10`, underlying controller hardware could offer an even wider range.
264
280
265
-
#### Buttons (digital inputs)
281
+
Mapping variables with analog L2/R2 triggers:
282
+
```
283
+
input_l2_axis = "+2"
284
+
input_r2_axis = "+5"
285
+
```
286
+
287
+
Note: These values are examples and should not be directly copied to your configuration file without verification.
288
+
289
+
###### Label variables
290
+
The term "Analog" is included in the variable values for the analog inputs to clearly indicate that these inputs are analog in nature.
291
+
292
+
Labels for analog thumb sticks:
293
+
```
294
+
input_l_x_plus_axis_label = "Left Analog X+ (right)"
295
+
input_l_x_minus_axis_label = "Left Analog X- (left)"
296
+
input_l_y_plus_axis_label = "Left Analog Y+ (down)"
297
+
input_l_y_minus_axis_label = "Left Analog Y- (up)"
298
+
input_r_x_plus_axis_label = "Right Analog X+ (right)"
299
+
input_r_x_minus_axis_label = "Right Analog X- (left)"
300
+
input_r_y_plus_axis_label = "Right Analog Y+ (down)"
301
+
input_r_y_minus_axis_label = "Right Analog Y- (up)"
302
+
```
303
+
304
+
Labels for analog L2/R2 triggers:
305
+
```
306
+
input_l2_axis_label = "L2 Analog"
307
+
input_r2_axis_label = "R2 Analog"
308
+
```
309
+
310
+
##### Buttons (digital inputs)
266
311
267
312
* These are defined by variable names ending with `_btn` (e.g., `input_a_btn`, `input_start_btn`).
268
313
* The current RetroArch configurations have button values that ranges from `0` to `203`. However, if RetroArch does not limit the values to `203`, underlying controller hardware could offer an even wider range.
269
314
* RetroArch interprets these IDs (usually 1 for pressed, 0 for not pressed) to determine the button state.
270
315
271
-
##### D-Pad directions (special digital inputs)
316
+
######D-Pad directions (special digital inputs)
272
317
273
318
* D-pad directions use variable values beginning with `h0` (e.g., `input_up_btn = "h0up"`).
274
319
* Four `h0` variables exist (`h0up`, `h0down`, `h0left`, `h0right`) for each direction on the D-pad.
275
320
* Note: The value `h1` is used by a single controller (Nintendo_Wii_Remote_Classic_Controller.cfg).
276
321
277
-
### Input descriptors
322
+
####Input descriptors
278
323
279
324
The third part are *input descriptors* used by RetroArch to display the labels of the buttons as they are written on your joypad.
280
325
@@ -307,9 +352,9 @@ input_r_y_minus_axis_label = "Right Analog Y- (up)"
307
352
input_menu_toggle_btn_label = "Guide"
308
353
```
309
354
310
-
#### Sony PlayStation controllers
355
+
#### Example: Controllers for Sony PlayStation 2 and later
311
356
312
-
So if you are using a Sony PlayStation controllers, RetroArch will refer to the buttons as Cross, Circle, Square and Triangle:
357
+
Labels for PlayStation controllers starting from PS2. Note that analog L2/R2 triggers (`input_l2_axis_label = "L2 Analog"`, and `input_r2_axis_label = "R2 Analog"`) are featured:
313
358
```
314
359
input_b_btn_label = "Cross"
315
360
input_y_btn_label = "Square"
@@ -323,8 +368,8 @@ input_a_btn_label = "Circle"
323
368
input_x_btn_label = "Triangle"
324
369
input_l_btn_label = "L1"
325
370
input_r_btn_label = "R1"
326
-
input_l2_axis_label = "L2"
327
-
input_r2_axis_label = "R2"
371
+
input_l2_axis_label = "L2 Analog"
372
+
input_r2_axis_label = "R2 Analog"
328
373
input_l3_btn_label = "L3"
329
374
input_r3_btn_label = "R3"
330
375
input_l_x_plus_axis_label = "Left Analog X+ (right)"
0 commit comments