Skip to content

Commit 1e2a83a

Browse files
authored
Update controller-autoconfiguration.md
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" ```
1 parent 8a8a234 commit 1e2a83a

File tree

1 file changed

+55
-10
lines changed

1 file changed

+55
-10
lines changed

docs/guides/controller-autoconfiguration.md

Lines changed: 55 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ input_product_id = "3570"
227227

228228
The second part is the mapping itself, where each button is assigned to a button of the RetroPad (the joypad abstraction of RetroArch).
229229

230+
Example
230231
```
231232
input_b_btn = "0"
232233
input_y_btn = "2"
@@ -255,26 +256,70 @@ input_r_y_minus_axis = "-4"
255256
input_menu_toggle_btn = "8"
256257
```
257258

258-
#### Axes (analog inputs)
259+
Note: These values are examples and should not be directly copied to your configuration file without verification.
259260

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 |
268+
|------------------|----------------------------------|----------------|---------------------|--------------|
269+
| PlayStation 1 | Sony Dual Analog Controller | April 1997 | Yes | No |
270+
| PlayStation 1 | Sony DualShock | November 1997 | Yes | No |
271+
| PlayStation 2 | DualShock 2 | 2000 | Yes | Yes |
272+
| PlayStation 3 | Sixaxis | 2006 | Yes | Yes |
273+
| PlayStation 3 | DualShock 3 | 2008 | Yes | Yes |
274+
| PlayStation 4 | DualShock 4 | 2013 | Yes | Yes |
275+
| PlayStation 5 | DualSense | 2020 | Yes | Yes |
276+
277+
###### Mapping variables
262278
* Axis definitions use `+` and `-` to indicate positive or negative direction (e.g., full press vs. no press).
263279
* 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.
264280

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)
266311

267312
* These are defined by variable names ending with `_btn` (e.g., `input_a_btn`, `input_start_btn`).
268313
* 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.
269314
* RetroArch interprets these IDs (usually 1 for pressed, 0 for not pressed) to determine the button state.
270315

271-
##### D-Pad directions (special digital inputs)
316+
###### D-Pad directions (special digital inputs)
272317

273318
* D-pad directions use variable values beginning with `h0` (e.g., `input_up_btn = "h0up"`).
274319
* Four `h0` variables exist (`h0up`, `h0down`, `h0left`, `h0right`) for each direction on the D-pad.
275320
* Note: The value `h1` is used by a single controller (Nintendo_Wii_Remote_Classic_Controller.cfg).
276321

277-
### Input descriptors
322+
#### Input descriptors
278323

279324
The third part are *input descriptors* used by RetroArch to display the labels of the buttons as they are written on your joypad.
280325

@@ -307,9 +352,9 @@ input_r_y_minus_axis_label = "Right Analog Y- (up)"
307352
input_menu_toggle_btn_label = "Guide"
308353
```
309354

310-
#### Sony PlayStation controllers
355+
#### Example: Controllers for Sony PlayStation 2 and later
311356

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:
313358
```
314359
input_b_btn_label = "Cross"
315360
input_y_btn_label = "Square"
@@ -323,8 +368,8 @@ input_a_btn_label = "Circle"
323368
input_x_btn_label = "Triangle"
324369
input_l_btn_label = "L1"
325370
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"
328373
input_l3_btn_label = "L3"
329374
input_r3_btn_label = "R3"
330375
input_l_x_plus_axis_label = "Left Analog X+ (right)"

0 commit comments

Comments
 (0)