Skip to content

Commit

Permalink
Merge pull request #951 from davidhedlund/master
Browse files Browse the repository at this point in the history
Update controller-autoconfiguration.md -- Mapping sub-sections
  • Loading branch information
fpscan committed Jun 15, 2024
2 parents 9c5d842 + 4cb9f86 commit 4a4eba7
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion docs/guides/controller-autoconfiguration.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ input_product_id = "3570"

### Mapping

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

```
input_b_btn = "0"
Expand Down Expand Up @@ -139,6 +139,25 @@ input_r_y_minus_axis = "-4"
input_menu_toggle_btn = "8"
```

#### Axes (analog inputs)

* Variable names ending with `_axis` define these (e.g., `input_l_x_axis`, `input_r2_axis`).
* 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).
* Axis definitions use `+` and `-` to indicate positive or negative direction (e.g., full press vs. no press).
* 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.

#### Buttons (digital inputs)

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

##### D-Pad directions (special digital inputs)

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

### Input descriptors

The third part are *input descriptors* used by RetroArch to display the labels of the buttons as they are written on your joypad. So if you are using a DualShock pad, RetroArch will refer to the buttons as Cross, Circle, Square and Triangle.
Expand Down

0 comments on commit 4a4eba7

Please sign in to comment.