mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-07-12 18:19:42 -07:00
inputs: single source of truth for the built-in gamepad configs
Every platform pad needed three hand-maintained files (es_input.cfg, the RetroArch autoconfig and gamecontrollerdb.txt) and nothing checked they agreed; the Soysauce pad shipped without the SDL entry, so ports saw no controller. Add projects/ArchR/inputs: one JSON definition per pad plus gen-input-configs, which verifies the three artifacts against the defs (wired as a fail-fast gate on the docker-% Makefile targets), regenerates them on demand, imports legacy entries, and computes SDL GUIDs the same way the runtime does, including the name-embedded form SDL uses when vendor*product is zero. The 17 platform pads were imported from the current artifacts and the migration already caught two real inconsistencies. The GO-Super gamecontrollerdb line carried a numeric-form GUID, but the pad reports vendor 0 so SDL derives the name-embedded GUID at runtime (the form the device-captured es_input block always had); the line is now fixed to 1900bb3e474f2d537570657220476100 and its RetroArch cfg canonicalized. And retrogame_joypad legitimately ships different mappings per bus (guide:b10 only on 0x19), now modeled explicitly as a per-GUID map. Verification is semantic for es_input blocks and RetroArch cfgs (the legacy files mix tabs and spaces) and byte-exact for gamecontrollerdb lines, with GUIDs always recomputed from the identity fields. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
# Built-in gamepad definitions (single source of truth)
|
||||
|
||||
Every built-in platform pad must exist in THREE shipped artifacts:
|
||||
|
||||
1. `packages/ui/emulationstation/config/common/es_input.cfg` (EmulationStation)
|
||||
2. `packages/emulators/libretro/retroarch/retroarch-joypads/gamepads/<name>.cfg` (RetroArch)
|
||||
3. `packages/apps/gamecontrollerdb/config/gamecontrollerdb.txt` (SDL games and ports)
|
||||
|
||||
Historically these were maintained by hand and nothing checked they agreed:
|
||||
the Soysauce pad shipped without the SDL entry, so ports saw no controller.
|
||||
The JSON files in `defs/` are now the source of truth and `gen-input-configs`
|
||||
keeps the three artifacts honest.
|
||||
|
||||
## Daily use
|
||||
|
||||
`make docker-*` refuses to build if the artifacts drifted from `defs/`:
|
||||
|
||||
./gen-input-configs verify # what CI/build runs
|
||||
./gen-input-configs write # regenerate artifacts from defs
|
||||
|
||||
Only external controllers (USB/Bluetooth pads inherited from upstream
|
||||
databases) stay unmanaged; the managed set is exactly the defs directory.
|
||||
|
||||
## Adding a new pad (example: a future R36T Max)
|
||||
|
||||
1. On the device, read the identity:
|
||||
|
||||
cat /proc/bus/input/devices # Name=, Vendor=, Product=, Version=
|
||||
|
||||
2. Compute the GUID the runtime will use (bus 0x19 for platform drivers):
|
||||
|
||||
./gen-input-configs guid "r36tmax_Gamepad" --vendor 1 --product 0x1199 --version 0x0100
|
||||
|
||||
Vendor or product zero switches SDL to the name-embedded GUID form
|
||||
automatically, exactly like the runtime does (that mismatch was the
|
||||
Soysauce bug).
|
||||
|
||||
3. Copy the closest def (`defs/r36s_Gamepad.json`), adjust name, identity,
|
||||
buses, the SDL mapping string, the ES inputs and the RetroArch keys.
|
||||
|
||||
4. Materialize and check:
|
||||
|
||||
./gen-input-configs write "r36tmax_Gamepad"
|
||||
./gen-input-configs verify
|
||||
|
||||
5. Commit the def together with the regenerated artifacts.
|
||||
|
||||
## Fidelity rules (deliberate)
|
||||
|
||||
* gamecontrollerdb line: byte-exact; the GUID is always recomputed from the
|
||||
identity fields (use `guid_override` only for entries that predate the
|
||||
tool and cannot be reproduced; none of the platform pads needs it).
|
||||
* RetroArch cfg and es_input block: semantically exact (key/value sets);
|
||||
comments, blank lines and ordering are not preserved by `write`.
|
||||
* `sdl_mapping` may be a per-GUID dict when buses legitimately differ
|
||||
(retrogame_joypad ships guide:b10 only on the 0x19 bus line).
|
||||
Binary file not shown.
@@ -0,0 +1,204 @@
|
||||
{
|
||||
"name": "GO-Super Gamepad",
|
||||
"vendor": 0,
|
||||
"product": 4352,
|
||||
"version": 256,
|
||||
"buses": [
|
||||
25
|
||||
],
|
||||
"sdl_mapping": "platform:Linux,a:b1,b:b0,dpdown:b14,dpleft:b15,+lefty:+a1,-leftx:-a0,+leftx:+a0,-lefty:-a1,leftshoulder:b4,leftstick:b11,lefttrigger:b6,dpright:b16,+righty:+a3,-rightx:-a2,+rightx:+a2,-righty:-a3,rightshoulder:b5,rightstick:b12,righttrigger:b7,back:b8,start:b9,dpup:b13,x:b2,y:b3,",
|
||||
"retroarch": {
|
||||
"input_device": "GO-Super Gamepad",
|
||||
"input_driver": "udev",
|
||||
"input_vendor_id": "0000",
|
||||
"input_product_id": "1100",
|
||||
"input_b_btn": "0",
|
||||
"input_a_btn": "1",
|
||||
"input_x_btn": "2",
|
||||
"input_y_btn": "3",
|
||||
"input_l_btn": "4",
|
||||
"input_r_btn": "5",
|
||||
"input_l2_btn": "6",
|
||||
"input_r2_btn": "7",
|
||||
"input_up_btn": "13",
|
||||
"input_down_btn": "14",
|
||||
"input_left_btn": "15",
|
||||
"input_right_btn": "16",
|
||||
"input_select_btn": "8",
|
||||
"input_start_btn": "9",
|
||||
"input_l3_btn": "11",
|
||||
"input_r3_btn": "12",
|
||||
"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_enable_hotkey_btn": "8",
|
||||
"input_exit_emulator_btn": "9",
|
||||
"input_screenshot_btn": "0",
|
||||
"input_pause_toggle_btn": "1",
|
||||
"input_menu_toggle_btn": "2",
|
||||
"input_fps_toggle_btn": "3",
|
||||
"input_state_slot_increase_btn": "13",
|
||||
"input_state_slot_decrease_btn": "14",
|
||||
"input_load_state_btn": "4",
|
||||
"input_save_state_btn": "5",
|
||||
"input_rewind_btn": "6",
|
||||
"input_toggle_fast_forward_btn": "7"
|
||||
},
|
||||
"es_inputs": [
|
||||
{
|
||||
"name": "a",
|
||||
"type": "button",
|
||||
"id": "1",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "b",
|
||||
"type": "button",
|
||||
"id": "0",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"type": "button",
|
||||
"id": "14",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "hotkeyenable",
|
||||
"type": "button",
|
||||
"id": "10",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"type": "button",
|
||||
"id": "15",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogdown",
|
||||
"type": "axis",
|
||||
"id": "1",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogleft",
|
||||
"type": "axis",
|
||||
"id": "0",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogright",
|
||||
"type": "axis",
|
||||
"id": "0",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogup",
|
||||
"type": "axis",
|
||||
"id": "1",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "leftshoulder",
|
||||
"type": "button",
|
||||
"id": "4",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftthumb",
|
||||
"type": "button",
|
||||
"id": "11",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "lefttrigger",
|
||||
"type": "button",
|
||||
"id": "6",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "right",
|
||||
"type": "button",
|
||||
"id": "16",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogdown",
|
||||
"type": "axis",
|
||||
"id": "3",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogleft",
|
||||
"type": "axis",
|
||||
"id": "2",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogright",
|
||||
"type": "axis",
|
||||
"id": "2",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogup",
|
||||
"type": "axis",
|
||||
"id": "3",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "rightshoulder",
|
||||
"type": "button",
|
||||
"id": "5",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightthumb",
|
||||
"type": "button",
|
||||
"id": "12",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "righttrigger",
|
||||
"type": "button",
|
||||
"id": "7",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "select",
|
||||
"type": "button",
|
||||
"id": "8",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "start",
|
||||
"type": "button",
|
||||
"id": "9",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"type": "button",
|
||||
"id": "13",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "x",
|
||||
"type": "button",
|
||||
"id": "2",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "y",
|
||||
"type": "button",
|
||||
"id": "3",
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,202 @@
|
||||
{
|
||||
"name": "GO-Ultra Gamepad",
|
||||
"vendor": 0,
|
||||
"product": 0,
|
||||
"version": 0,
|
||||
"buses": [
|
||||
3
|
||||
],
|
||||
"sdl_mapping": "platform:Linux,a:b1,b:b0,dpdown:b15,dpleft:b16,guide:b11,+lefty:+a1,-leftx:-a0,+leftx:+a0,-lefty:-a1,leftshoulder:b5,leftstick:b12,lefttrigger:b7,dpright:b17,+righty:+a3,-rightx:-a2,+rightx:+a2,-righty:-a3,rightshoulder:b6,rightstick:b13,righttrigger:b8,back:b9,start:b10,dpup:b14,x:b3,y:b4,",
|
||||
"retroarch": {
|
||||
"input_device": "GO-Ultra Gamepad",
|
||||
"input_driver": "udev",
|
||||
"input_b_btn": "0",
|
||||
"input_a_btn": "1",
|
||||
"input_x_btn": "3",
|
||||
"input_y_btn": "4",
|
||||
"input_l_btn": "5",
|
||||
"input_r_btn": "6",
|
||||
"input_l2_btn": "7",
|
||||
"input_r2_btn": "8",
|
||||
"input_up_btn": "14",
|
||||
"input_down_btn": "15",
|
||||
"input_left_btn": "16",
|
||||
"input_right_btn": "17",
|
||||
"input_select_btn": "9",
|
||||
"input_start_btn": "10",
|
||||
"input_l3_btn": "12",
|
||||
"input_r3_btn": "13",
|
||||
"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_enable_hotkey_btn": "11",
|
||||
"input_exit_emulator_btn": "10",
|
||||
"input_screenshot_btn": "0",
|
||||
"input_pause_toggle_btn": "1",
|
||||
"input_menu_toggle_btn": "3",
|
||||
"input_fps_toggle_btn": "4",
|
||||
"input_state_slot_increase_btn": "14",
|
||||
"input_state_slot_decrease_btn": "15",
|
||||
"input_load_state_btn": "5",
|
||||
"input_save_state_btn": "6",
|
||||
"input_rewind_btn": "7",
|
||||
"input_toggle_fast_forward_btn": "8"
|
||||
},
|
||||
"es_inputs": [
|
||||
{
|
||||
"name": "a",
|
||||
"type": "button",
|
||||
"id": "1",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "b",
|
||||
"type": "button",
|
||||
"id": "0",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"type": "button",
|
||||
"id": "15",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "hotkeyenable",
|
||||
"type": "button",
|
||||
"id": "11",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"type": "button",
|
||||
"id": "16",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogdown",
|
||||
"type": "axis",
|
||||
"id": "1",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogleft",
|
||||
"type": "axis",
|
||||
"id": "0",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogright",
|
||||
"type": "axis",
|
||||
"id": "0",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogup",
|
||||
"type": "axis",
|
||||
"id": "1",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "leftshoulder",
|
||||
"type": "button",
|
||||
"id": "5",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftthumb",
|
||||
"type": "button",
|
||||
"id": "12",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "lefttrigger",
|
||||
"type": "button",
|
||||
"id": "7",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "right",
|
||||
"type": "button",
|
||||
"id": "17",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogdown",
|
||||
"type": "axis",
|
||||
"id": "3",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogleft",
|
||||
"type": "axis",
|
||||
"id": "2",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogright",
|
||||
"type": "axis",
|
||||
"id": "2",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogup",
|
||||
"type": "axis",
|
||||
"id": "3",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "rightshoulder",
|
||||
"type": "button",
|
||||
"id": "6",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightthumb",
|
||||
"type": "button",
|
||||
"id": "13",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "righttrigger",
|
||||
"type": "button",
|
||||
"id": "8",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "select",
|
||||
"type": "button",
|
||||
"id": "9",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "start",
|
||||
"type": "button",
|
||||
"id": "10",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"type": "button",
|
||||
"id": "14",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "x",
|
||||
"type": "button",
|
||||
"id": "3",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "y",
|
||||
"type": "button",
|
||||
"id": "4",
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,191 @@
|
||||
{
|
||||
"name": "GameForce ACE Gamepad",
|
||||
"vendor": 0,
|
||||
"product": 0,
|
||||
"version": 0,
|
||||
"buses": [
|
||||
3
|
||||
],
|
||||
"sdl_mapping": "a:b1,b:b0,dpdown:b13,dpleft:b14,lefty:a1,leftx:a0,leftshoulder:b5,leftstick:b10,lefttrigger:-a2,dpright:b15,+righty:+a4,-rightx:-a3,+rightx:+a3,-righty:-a4,rightshoulder:b6,rightstick:b11,righttrigger:-a5,back:b7,guide:b9,start:b8,dpup:b12,x:b3,y:b4,platform:Linux,",
|
||||
"retroarch": {
|
||||
"input_driver": "udev",
|
||||
"input_device": "GameForce ACE Gamepad",
|
||||
"input_b_btn": "0",
|
||||
"input_y_btn": "4",
|
||||
"input_select_btn": "7",
|
||||
"input_start_btn": "8",
|
||||
"input_up_btn": "12",
|
||||
"input_down_btn": "13",
|
||||
"input_left_btn": "14",
|
||||
"input_right_btn": "15",
|
||||
"input_a_btn": "1",
|
||||
"input_x_btn": "3",
|
||||
"input_l_btn": "5",
|
||||
"input_r_btn": "6",
|
||||
"input_l2_axis": "-2",
|
||||
"input_r2_axis": "-5",
|
||||
"input_l3_btn": "10",
|
||||
"input_r3_btn": "11",
|
||||
"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": "+3",
|
||||
"input_r_x_minus_axis": "-3",
|
||||
"input_r_y_plus_axis": "+4",
|
||||
"input_r_y_minus_axis": "-4",
|
||||
"input_enable_hotkey_btn": "9"
|
||||
},
|
||||
"es_inputs": [
|
||||
{
|
||||
"name": "a",
|
||||
"type": "button",
|
||||
"id": "1",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "b",
|
||||
"type": "button",
|
||||
"id": "0",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"type": "button",
|
||||
"id": "13",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "hotkeyenable",
|
||||
"type": "button",
|
||||
"id": "9",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"type": "button",
|
||||
"id": "14",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogdown",
|
||||
"type": "axis",
|
||||
"id": "1",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogleft",
|
||||
"type": "axis",
|
||||
"id": "0",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogright",
|
||||
"type": "axis",
|
||||
"id": "0",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogup",
|
||||
"type": "axis",
|
||||
"id": "1",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "leftshoulder",
|
||||
"type": "button",
|
||||
"id": "5",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftthumb",
|
||||
"type": "button",
|
||||
"id": "10",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "lefttrigger",
|
||||
"type": "axis",
|
||||
"id": "2",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "right",
|
||||
"type": "button",
|
||||
"id": "15",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogdown",
|
||||
"type": "axis",
|
||||
"id": "4",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogleft",
|
||||
"type": "axis",
|
||||
"id": "3",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogright",
|
||||
"type": "axis",
|
||||
"id": "3",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogup",
|
||||
"type": "axis",
|
||||
"id": "4",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "rightshoulder",
|
||||
"type": "button",
|
||||
"id": "6",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightthumb",
|
||||
"type": "button",
|
||||
"id": "11",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "righttrigger",
|
||||
"type": "axis",
|
||||
"id": "5",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "select",
|
||||
"type": "button",
|
||||
"id": "7",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "start",
|
||||
"type": "button",
|
||||
"id": "8",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"type": "button",
|
||||
"id": "12",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "x",
|
||||
"type": "button",
|
||||
"id": "3",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "y",
|
||||
"type": "button",
|
||||
"id": "4",
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,209 @@
|
||||
{
|
||||
"name": "H700 Gamepad",
|
||||
"vendor": 18507,
|
||||
"product": 5343,
|
||||
"version": 256,
|
||||
"buses": [
|
||||
25
|
||||
],
|
||||
"sdl_mapping": "platform:Linux,x:b3,a:b1,b:b0,y:b2,back:b8,guide:b10,start:b9,dpleft:b15,dpdown:b14,dpright:b16,dpup:b13,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftstick:b11,rightstick:b12,leftx:a0,lefty:a1,rightx:a2,righty:a3,",
|
||||
"retroarch": {
|
||||
"input_driver": "udev",
|
||||
"input_device": "H700 Gamepad",
|
||||
"input_device_display_name": "Anbernic RG35XX Gamepad",
|
||||
"input_vendor_id": "18507",
|
||||
"input_product_id": "5343",
|
||||
"input_b_btn": "0",
|
||||
"input_a_btn": "1",
|
||||
"input_y_btn": "2",
|
||||
"input_x_btn": "3",
|
||||
"input_l_btn": "4",
|
||||
"input_r_btn": "5",
|
||||
"input_l2_btn": "6",
|
||||
"input_r2_btn": "7",
|
||||
"input_select_btn": "8",
|
||||
"input_start_btn": "9",
|
||||
"input_l3_btn": "11",
|
||||
"input_r3_btn": "12",
|
||||
"input_up_btn": "13",
|
||||
"input_down_btn": "14",
|
||||
"input_left_btn": "15",
|
||||
"input_right_btn": "16",
|
||||
"input_enable_hotkey_btn": "10",
|
||||
"input_exit_emulator_btn": "9",
|
||||
"input_pause_toggle_btn": "1",
|
||||
"input_menu_toggle_btn": "3",
|
||||
"input_fps_toggle_btn": "2",
|
||||
"input_screenshot_btn": "nul",
|
||||
"input_load_state_btn": "4",
|
||||
"input_save_state_btn": "5",
|
||||
"input_toggle_fast_forward_btn": "7",
|
||||
"input_rewind_btn": "6",
|
||||
"input_analog_dpad_mode": "0",
|
||||
"input_gun_trigger_mbtn": "1",
|
||||
"input_joypad_index": "0",
|
||||
"input_l_x_minus_axis": "-0",
|
||||
"input_l_x_plus_axis": "+0",
|
||||
"input_l_y_minus_axis": "-1",
|
||||
"input_l_y_plus_axis": "+1",
|
||||
"input_mouse_index": "0",
|
||||
"input_r_x_minus_axis": "-2",
|
||||
"input_r_x_plus_axis": "+2",
|
||||
"input_r_y_minus_axis": "-3",
|
||||
"input_r_y_plus_axis": "+3",
|
||||
"input_state_slot_increase_btn": "nul",
|
||||
"input_state_slot_decrease_btn": "nul"
|
||||
},
|
||||
"es_inputs": [
|
||||
{
|
||||
"name": "a",
|
||||
"type": "button",
|
||||
"id": "1",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "b",
|
||||
"type": "button",
|
||||
"id": "0",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"type": "button",
|
||||
"id": "14",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "hotkeyenable",
|
||||
"type": "button",
|
||||
"id": "10",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"type": "button",
|
||||
"id": "15",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogdown",
|
||||
"type": "axis",
|
||||
"id": "1",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogleft",
|
||||
"type": "axis",
|
||||
"id": "0",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogright",
|
||||
"type": "axis",
|
||||
"id": "0",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogup",
|
||||
"type": "axis",
|
||||
"id": "1",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "leftshoulder",
|
||||
"type": "button",
|
||||
"id": "4",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftthumb",
|
||||
"type": "button",
|
||||
"id": "11",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "lefttrigger",
|
||||
"type": "button",
|
||||
"id": "6",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "right",
|
||||
"type": "button",
|
||||
"id": "16",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogdown",
|
||||
"type": "axis",
|
||||
"id": "3",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogleft",
|
||||
"type": "axis",
|
||||
"id": "2",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogright",
|
||||
"type": "axis",
|
||||
"id": "2",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogup",
|
||||
"type": "axis",
|
||||
"id": "3",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "rightshoulder",
|
||||
"type": "button",
|
||||
"id": "5",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightthumb",
|
||||
"type": "button",
|
||||
"id": "12",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "righttrigger",
|
||||
"type": "button",
|
||||
"id": "7",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "select",
|
||||
"type": "button",
|
||||
"id": "8",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "start",
|
||||
"type": "button",
|
||||
"id": "9",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"type": "button",
|
||||
"id": "13",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "x",
|
||||
"type": "button",
|
||||
"id": "3",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "y",
|
||||
"type": "button",
|
||||
"id": "2",
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,199 @@
|
||||
{
|
||||
"name": "RGB20S Gamepad",
|
||||
"vendor": 18507,
|
||||
"product": 4471,
|
||||
"version": 375,
|
||||
"buses": [
|
||||
25
|
||||
],
|
||||
"sdl_mapping": "platform:Linux,x:b2,a:b1,b:b0,y:b3,back:b12,start:b13,dpleft:b10,dpdown:b9,dpright:b11,dpup:b8,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftstick:b14,rightstick:b15,leftx:a0,lefty:a1,rightx:a2,righty:a3,",
|
||||
"retroarch": {
|
||||
"input_driver": "udev",
|
||||
"input_device": "RGB20S Gamepad",
|
||||
"input_device_display_name": "RGB20S Gamepad",
|
||||
"input_b_btn": "0",
|
||||
"input_y_btn": "3",
|
||||
"input_select_btn": "12",
|
||||
"input_start_btn": "13",
|
||||
"input_a_btn": "1",
|
||||
"input_x_btn": "2",
|
||||
"input_l_btn": "4",
|
||||
"input_r_btn": "5",
|
||||
"input_l2_btn": "6",
|
||||
"input_r2_btn": "7",
|
||||
"input_l3_btn": "14",
|
||||
"input_r3_btn": "15",
|
||||
"input_up_btn": "8",
|
||||
"input_down_btn": "9",
|
||||
"input_left_btn": "10",
|
||||
"input_right_btn": "11",
|
||||
"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_enable_hotkey_btn": "12",
|
||||
"input_exit_emulator_btn": "13",
|
||||
"input_menu_toggle_btn": "2",
|
||||
"input_fps_toggle_btn": "3",
|
||||
"input_load_state_btn": "4",
|
||||
"input_save_state_btn": "5",
|
||||
"input_rewind_btn": "6",
|
||||
"input_toggle_fast_forward_btn": "7"
|
||||
},
|
||||
"es_inputs": [
|
||||
{
|
||||
"name": "a",
|
||||
"type": "button",
|
||||
"id": "1",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "b",
|
||||
"type": "button",
|
||||
"id": "0",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"type": "button",
|
||||
"id": "9",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "hotkeyenable",
|
||||
"type": "button",
|
||||
"id": "12",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"type": "button",
|
||||
"id": "10",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogdown",
|
||||
"type": "axis",
|
||||
"id": "1",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogleft",
|
||||
"type": "axis",
|
||||
"id": "0",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogright",
|
||||
"type": "axis",
|
||||
"id": "0",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogup",
|
||||
"type": "axis",
|
||||
"id": "1",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "leftshoulder",
|
||||
"type": "button",
|
||||
"id": "4",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftthumb",
|
||||
"type": "button",
|
||||
"id": "14",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "lefttrigger",
|
||||
"type": "button",
|
||||
"id": "6",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "right",
|
||||
"type": "button",
|
||||
"id": "11",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogdown",
|
||||
"type": "axis",
|
||||
"id": "3",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogleft",
|
||||
"type": "axis",
|
||||
"id": "2",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogright",
|
||||
"type": "axis",
|
||||
"id": "2",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogup",
|
||||
"type": "axis",
|
||||
"id": "3",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "rightshoulder",
|
||||
"type": "button",
|
||||
"id": "5",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightthumb",
|
||||
"type": "button",
|
||||
"id": "15",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "righttrigger",
|
||||
"type": "button",
|
||||
"id": "7",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "select",
|
||||
"type": "button",
|
||||
"id": "12",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "start",
|
||||
"type": "button",
|
||||
"id": "13",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"type": "button",
|
||||
"id": "8",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "x",
|
||||
"type": "button",
|
||||
"id": "2",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "y",
|
||||
"type": "button",
|
||||
"id": "3",
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,203 @@
|
||||
{
|
||||
"name": "XU10 Gamepad",
|
||||
"vendor": 50096,
|
||||
"product": 512,
|
||||
"version": 16,
|
||||
"buses": [
|
||||
25
|
||||
],
|
||||
"sdl_mapping": "platform:Linux,x:b3,a:b2,b:b1,y:b0,back:b8,guide:b16,start:b9,dpleft:b14,dpdown:b13,dpright:b15,dpup:b12,leftshoulder:b4,lefttrigger:b7,rightshoulder:b5,righttrigger:b6,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,",
|
||||
"retroarch": {
|
||||
"input_device": "XU10 Gamepad",
|
||||
"input_driver": "udev",
|
||||
"input_device_display_name": "MagicX XU10 Gamepad",
|
||||
"input_b_btn": "1",
|
||||
"input_a_btn": "2",
|
||||
"input_x_btn": "3",
|
||||
"input_y_btn": "0",
|
||||
"input_l_btn": "4",
|
||||
"input_r_btn": "5",
|
||||
"input_l2_btn": "7",
|
||||
"input_r2_btn": "6",
|
||||
"input_up_btn": "12",
|
||||
"input_down_btn": "13",
|
||||
"input_left_btn": "14",
|
||||
"input_right_btn": "15",
|
||||
"input_select_btn": "8",
|
||||
"input_start_btn": "9",
|
||||
"input_l3_btn": "10",
|
||||
"input_r3_btn": "11",
|
||||
"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_enable_hotkey_btn": "16",
|
||||
"input_exit_emulator_btn": "9",
|
||||
"input_screenshot_btn": "0",
|
||||
"input_pause_toggle_btn": "1",
|
||||
"input_menu_toggle_btn": "2",
|
||||
"input_fps_toggle_btn": "3",
|
||||
"input_state_slot_increase_btn": "7",
|
||||
"input_state_slot_decrease_btn": "6",
|
||||
"input_load_state_btn": "4",
|
||||
"input_save_state_btn": "5",
|
||||
"input_rewind_btn": "10",
|
||||
"input_toggle_fast_forward_btn": "11"
|
||||
},
|
||||
"es_inputs": [
|
||||
{
|
||||
"name": "a",
|
||||
"type": "button",
|
||||
"id": "2",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "b",
|
||||
"type": "button",
|
||||
"id": "1",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"type": "button",
|
||||
"id": "13",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "hotkeyenable",
|
||||
"type": "button",
|
||||
"id": "16",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"type": "button",
|
||||
"id": "14",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogdown",
|
||||
"type": "axis",
|
||||
"id": "1",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogleft",
|
||||
"type": "axis",
|
||||
"id": "0",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogright",
|
||||
"type": "axis",
|
||||
"id": "0",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogup",
|
||||
"type": "axis",
|
||||
"id": "1",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "leftshoulder",
|
||||
"type": "button",
|
||||
"id": "4",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftthumb",
|
||||
"type": "button",
|
||||
"id": "10",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "lefttrigger",
|
||||
"type": "button",
|
||||
"id": "7",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "right",
|
||||
"type": "button",
|
||||
"id": "15",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogdown",
|
||||
"type": "axis",
|
||||
"id": "3",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogleft",
|
||||
"type": "axis",
|
||||
"id": "2",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogright",
|
||||
"type": "axis",
|
||||
"id": "2",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogup",
|
||||
"type": "axis",
|
||||
"id": "3",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "rightshoulder",
|
||||
"type": "button",
|
||||
"id": "5",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightthumb",
|
||||
"type": "button",
|
||||
"id": "11",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "righttrigger",
|
||||
"type": "button",
|
||||
"id": "6",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "select",
|
||||
"type": "button",
|
||||
"id": "8",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "start",
|
||||
"type": "button",
|
||||
"id": "9",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"type": "button",
|
||||
"id": "12",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "x",
|
||||
"type": "button",
|
||||
"id": "3",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "y",
|
||||
"type": "button",
|
||||
"id": "0",
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,199 @@
|
||||
{
|
||||
"name": "XU Mini M Gamepad",
|
||||
"vendor": 50096,
|
||||
"product": 512,
|
||||
"version": 16,
|
||||
"buses": [
|
||||
25
|
||||
],
|
||||
"sdl_mapping": "platform:Linux,x:b2,a:b1,b:b0,y:b3,back:b8,guide:b16,start:b9,dpleft:b14,dpdown:b13,dpright:b15,dpup:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,",
|
||||
"retroarch": {
|
||||
"input_driver": "udev",
|
||||
"input_device": "XU Mini M Gamepad",
|
||||
"input_device_display_name": "MagicX XU Mini M Gamepad",
|
||||
"input_b_btn": "0",
|
||||
"input_y_btn": "3",
|
||||
"input_select_btn": "8",
|
||||
"input_start_btn": "9",
|
||||
"input_up_btn": "12",
|
||||
"input_down_btn": "13",
|
||||
"input_left_btn": "14",
|
||||
"input_right_btn": "15",
|
||||
"input_a_btn": "1",
|
||||
"input_x_btn": "2",
|
||||
"input_l_btn": "4",
|
||||
"input_r_btn": "5",
|
||||
"input_l2_btn": "6",
|
||||
"input_r2_btn": "7",
|
||||
"input_l3_btn": "10",
|
||||
"input_r3_btn": "11",
|
||||
"input_l_x_plus_axis": "+1",
|
||||
"input_l_x_minus_axis": "-1",
|
||||
"input_l_y_plus_axis": "-0",
|
||||
"input_l_y_minus_axis": "+0",
|
||||
"input_r_x_plus_axis": "+3",
|
||||
"input_r_x_minus_axis": "-3",
|
||||
"input_r_y_plus_axis": "-2",
|
||||
"input_r_y_minus_axis": "+2",
|
||||
"input_enable_hotkey_btn": "16",
|
||||
"input_exit_emulator_btn": "9",
|
||||
"input_menu_toggle_btn": "2",
|
||||
"input_fps_toggle_btn": "3",
|
||||
"input_load_state_btn": "4",
|
||||
"input_save_state_btn": "5",
|
||||
"input_rewind_btn": "6",
|
||||
"input_toggle_fast_forward_btn": "7"
|
||||
},
|
||||
"es_inputs": [
|
||||
{
|
||||
"name": "a",
|
||||
"type": "button",
|
||||
"id": "1",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "b",
|
||||
"type": "button",
|
||||
"id": "0",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"type": "button",
|
||||
"id": "13",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "hotkeyenable",
|
||||
"type": "button",
|
||||
"id": "16",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"type": "button",
|
||||
"id": "14",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogdown",
|
||||
"type": "axis",
|
||||
"id": "0",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogleft",
|
||||
"type": "axis",
|
||||
"id": "1",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogright",
|
||||
"type": "axis",
|
||||
"id": "1",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogup",
|
||||
"type": "axis",
|
||||
"id": "0",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftshoulder",
|
||||
"type": "button",
|
||||
"id": "4",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftthumb",
|
||||
"type": "button",
|
||||
"id": "10",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "lefttrigger",
|
||||
"type": "button",
|
||||
"id": "6",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "right",
|
||||
"type": "button",
|
||||
"id": "15",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogdown",
|
||||
"type": "axis",
|
||||
"id": "2",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogleft",
|
||||
"type": "axis",
|
||||
"id": "3",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogright",
|
||||
"type": "axis",
|
||||
"id": "3",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogup",
|
||||
"type": "axis",
|
||||
"id": "2",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightshoulder",
|
||||
"type": "button",
|
||||
"id": "5",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightthumb",
|
||||
"type": "button",
|
||||
"id": "11",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "righttrigger",
|
||||
"type": "button",
|
||||
"id": "7",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "select",
|
||||
"type": "button",
|
||||
"id": "8",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "start",
|
||||
"type": "button",
|
||||
"id": "9",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"type": "button",
|
||||
"id": "12",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "x",
|
||||
"type": "button",
|
||||
"id": "2",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "y",
|
||||
"type": "button",
|
||||
"id": "3",
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,157 @@
|
||||
{
|
||||
"name": "odroidgo2_joypad",
|
||||
"vendor": 1,
|
||||
"product": 1,
|
||||
"version": 257,
|
||||
"buses": [
|
||||
25
|
||||
],
|
||||
"sdl_mapping": "platform:Linux,x:b2,a:b1,b:b0,y:b3,back:b10,start:b13,dpleft:b8,dpdown:b7,dpright:b9,dpup:b6,leftshoulder:b4,lefttrigger:b11,rightshoulder:b5,righttrigger:b12,leftx:a0,lefty:a1,",
|
||||
"retroarch": {
|
||||
"input_driver": "udev",
|
||||
"input_device": "odroidgo2_joypad",
|
||||
"input_device_display_name": "Odroid GO Advance Joypad",
|
||||
"input_b_btn": "0",
|
||||
"input_y_btn": "3",
|
||||
"input_select_btn": "10",
|
||||
"input_start_btn": "13",
|
||||
"input_a_btn": "1",
|
||||
"input_x_btn": "2",
|
||||
"input_l_btn": "4",
|
||||
"input_r_btn": "5",
|
||||
"input_l2_btn": "11",
|
||||
"input_r2_btn": "12",
|
||||
"input_up_btn": "6",
|
||||
"input_down_btn": "7",
|
||||
"input_left_btn": "8",
|
||||
"input_right_btn": "9",
|
||||
"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_enable_hotkey_btn": "10",
|
||||
"input_exit_emulator_btn": "13",
|
||||
"input_menu_toggle_btn": "2",
|
||||
"input_fps_toggle_btn": "3",
|
||||
"input_load_state_btn": "4",
|
||||
"input_save_state_btn": "5",
|
||||
"input_rewind_btn": "11",
|
||||
"input_toggle_fast_forward_btn": "12"
|
||||
},
|
||||
"es_inputs": [
|
||||
{
|
||||
"name": "a",
|
||||
"type": "button",
|
||||
"id": "1",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "b",
|
||||
"type": "button",
|
||||
"id": "0",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"type": "button",
|
||||
"id": "7",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "hotkeyenable",
|
||||
"type": "button",
|
||||
"id": "10",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"type": "button",
|
||||
"id": "8",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogdown",
|
||||
"type": "axis",
|
||||
"id": "1",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogleft",
|
||||
"type": "axis",
|
||||
"id": "0",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogright",
|
||||
"type": "axis",
|
||||
"id": "0",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogup",
|
||||
"type": "axis",
|
||||
"id": "1",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "leftshoulder",
|
||||
"type": "button",
|
||||
"id": "4",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "lefttrigger",
|
||||
"type": "button",
|
||||
"id": "11",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "right",
|
||||
"type": "button",
|
||||
"id": "9",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightshoulder",
|
||||
"type": "button",
|
||||
"id": "5",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "righttrigger",
|
||||
"type": "button",
|
||||
"id": "12",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "select",
|
||||
"type": "button",
|
||||
"id": "10",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "start",
|
||||
"type": "button",
|
||||
"id": "13",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"type": "button",
|
||||
"id": "6",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "x",
|
||||
"type": "button",
|
||||
"id": "2",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "y",
|
||||
"type": "button",
|
||||
"id": "3",
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
{
|
||||
"name": "odroidgo2_v11_joypad",
|
||||
"vendor": 1,
|
||||
"product": 2,
|
||||
"version": 257,
|
||||
"buses": [
|
||||
25
|
||||
],
|
||||
"sdl_mapping": "platform:Linux,x:b2,a:b1,b:b0,y:b3,back:b8,start:b9,dpleft:b14,dpdown:b13,dpright:b15,dpup:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,",
|
||||
"retroarch": {
|
||||
"input_driver": "udev",
|
||||
"input_device": "odroidgo2_v11_joypad",
|
||||
"input_device_display_name": "Odroid GO Advance Joypad v1.1",
|
||||
"input_b_btn": "0",
|
||||
"input_y_btn": "3",
|
||||
"input_select_btn": "8",
|
||||
"input_start_btn": "9",
|
||||
"input_a_btn": "1",
|
||||
"input_x_btn": "2",
|
||||
"input_l_btn": "4",
|
||||
"input_r_btn": "5",
|
||||
"input_l2_btn": "6",
|
||||
"input_r2_btn": "7",
|
||||
"input_l3_btn": "10",
|
||||
"input_r3_btn": "11",
|
||||
"input_up_btn": "12",
|
||||
"input_down_btn": "13",
|
||||
"input_left_btn": "14",
|
||||
"input_right_btn": "15",
|
||||
"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_enable_hotkey_btn": "8",
|
||||
"input_exit_emulator_btn": "9",
|
||||
"input_menu_toggle_btn": "2",
|
||||
"input_fps_toggle_btn": "3",
|
||||
"input_load_state_btn": "4",
|
||||
"input_save_state_btn": "5",
|
||||
"input_rewind_btn": "6",
|
||||
"input_toggle_fast_forward_btn": "7"
|
||||
},
|
||||
"es_inputs": [
|
||||
{
|
||||
"name": "a",
|
||||
"type": "button",
|
||||
"id": "1",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "b",
|
||||
"type": "button",
|
||||
"id": "0",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"type": "button",
|
||||
"id": "13",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "hotkeyenable",
|
||||
"type": "button",
|
||||
"id": "8",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"type": "button",
|
||||
"id": "14",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogdown",
|
||||
"type": "axis",
|
||||
"id": "1",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogleft",
|
||||
"type": "axis",
|
||||
"id": "0",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogright",
|
||||
"type": "axis",
|
||||
"id": "0",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogup",
|
||||
"type": "axis",
|
||||
"id": "1",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "leftshoulder",
|
||||
"type": "button",
|
||||
"id": "4",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftthumb",
|
||||
"type": "button",
|
||||
"id": "10",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "lefttrigger",
|
||||
"type": "button",
|
||||
"id": "6",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "right",
|
||||
"type": "button",
|
||||
"id": "15",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightshoulder",
|
||||
"type": "button",
|
||||
"id": "5",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightthumb",
|
||||
"type": "button",
|
||||
"id": "11",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "righttrigger",
|
||||
"type": "button",
|
||||
"id": "7",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "select",
|
||||
"type": "button",
|
||||
"id": "8",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "start",
|
||||
"type": "button",
|
||||
"id": "9",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"type": "button",
|
||||
"id": "12",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "x",
|
||||
"type": "button",
|
||||
"id": "2",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "y",
|
||||
"type": "button",
|
||||
"id": "3",
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,199 @@
|
||||
{
|
||||
"name": "odroidgo3_joypad",
|
||||
"vendor": 1,
|
||||
"product": 1,
|
||||
"version": 257,
|
||||
"buses": [
|
||||
25
|
||||
],
|
||||
"sdl_mapping": "a:b1,b:b0,dpdown:b13,dpleft:b14,+lefty:+a1,-leftx:-a0,+leftx:+a0,-lefty:-a1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,dpright:b15,+righty:+a3,-rightx:-a2,+rightx:+a2,-righty:-a3,rightshoulder:b5,rightstick:b11,righttrigger:b7,back:b8,start:b9,dpup:b12,x:b2,y:b3,platform:Linux,",
|
||||
"retroarch": {
|
||||
"input_driver": "udev",
|
||||
"input_device": "odroidgo3_joypad",
|
||||
"input_device_display_name": "Odroid GO Super",
|
||||
"input_b_btn": "0",
|
||||
"input_y_btn": "3",
|
||||
"input_select_btn": "8",
|
||||
"input_start_btn": "9",
|
||||
"input_a_btn": "1",
|
||||
"input_x_btn": "2",
|
||||
"input_l_btn": "4",
|
||||
"input_r_btn": "5",
|
||||
"input_l2_btn": "6",
|
||||
"input_r2_btn": "7",
|
||||
"input_l3_btn": "10",
|
||||
"input_r3_btn": "11",
|
||||
"input_up_btn": "12",
|
||||
"input_down_btn": "13",
|
||||
"input_left_btn": "14",
|
||||
"input_right_btn": "15",
|
||||
"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_enable_hotkey_btn": "8",
|
||||
"input_exit_emulator_btn": "9",
|
||||
"input_menu_toggle_btn": "2",
|
||||
"input_fps_toggle_btn": "3",
|
||||
"input_load_state_btn": "4",
|
||||
"input_save_state_btn": "5",
|
||||
"input_rewind_btn": "6",
|
||||
"input_toggle_fast_forward_btn": "7"
|
||||
},
|
||||
"es_inputs": [
|
||||
{
|
||||
"name": "a",
|
||||
"type": "button",
|
||||
"id": "1",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "b",
|
||||
"type": "button",
|
||||
"id": "0",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"type": "button",
|
||||
"id": "13",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "hotkeyenable",
|
||||
"type": "button",
|
||||
"id": "8",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"type": "button",
|
||||
"id": "14",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogdown",
|
||||
"type": "axis",
|
||||
"id": "1",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogleft",
|
||||
"type": "axis",
|
||||
"id": "0",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogright",
|
||||
"type": "axis",
|
||||
"id": "0",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogup",
|
||||
"type": "axis",
|
||||
"id": "1",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "leftshoulder",
|
||||
"type": "button",
|
||||
"id": "4",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftthumb",
|
||||
"type": "button",
|
||||
"id": "10",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "lefttrigger",
|
||||
"type": "button",
|
||||
"id": "6",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "right",
|
||||
"type": "button",
|
||||
"id": "15",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogdown",
|
||||
"type": "axis",
|
||||
"id": "3",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogleft",
|
||||
"type": "axis",
|
||||
"id": "2",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogright",
|
||||
"type": "axis",
|
||||
"id": "2",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogup",
|
||||
"type": "axis",
|
||||
"id": "3",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "rightshoulder",
|
||||
"type": "button",
|
||||
"id": "5",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightthumb",
|
||||
"type": "button",
|
||||
"id": "11",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "righttrigger",
|
||||
"type": "button",
|
||||
"id": "7",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "select",
|
||||
"type": "button",
|
||||
"id": "8",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "start",
|
||||
"type": "button",
|
||||
"id": "9",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"type": "button",
|
||||
"id": "12",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "x",
|
||||
"type": "button",
|
||||
"id": "2",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "y",
|
||||
"type": "button",
|
||||
"id": "3",
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
{
|
||||
"name": "r33s_joypad",
|
||||
"vendor": 1,
|
||||
"product": 2722,
|
||||
"version": 256,
|
||||
"buses": [
|
||||
25
|
||||
],
|
||||
"sdl_mapping": "platform:Linux,x:b2,a:b1,b:b0,y:b3,back:b8,start:b9,dpleft:b12,dpdown:b11,dpright:b13,dpup:b10,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,",
|
||||
"retroarch": {
|
||||
"input_driver": "udev",
|
||||
"input_device": "r33s_joypad",
|
||||
"input_device_display_name": "R33S Joypad",
|
||||
"input_b_btn": "0",
|
||||
"input_y_btn": "3",
|
||||
"input_select_btn": "8",
|
||||
"input_start_btn": "9",
|
||||
"input_a_btn": "1",
|
||||
"input_x_btn": "2",
|
||||
"input_l_btn": "4",
|
||||
"input_r_btn": "5",
|
||||
"input_l2_btn": "6",
|
||||
"input_r2_btn": "7",
|
||||
"input_up_btn": "10",
|
||||
"input_left_btn": "12",
|
||||
"input_right_btn": "13",
|
||||
"input_enable_hotkey_btn": "8",
|
||||
"input_exit_emulator_btn": "9",
|
||||
"input_menu_toggle_btn": "2",
|
||||
"input_fps_toggle_btn": "3",
|
||||
"input_load_state_btn": "4",
|
||||
"input_save_state_btn": "5",
|
||||
"input_rewind_btn": "6",
|
||||
"input_toggle_fast_forward_btn": "7"
|
||||
},
|
||||
"es_inputs": [
|
||||
{
|
||||
"name": "a",
|
||||
"type": "button",
|
||||
"id": "1",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "b",
|
||||
"type": "button",
|
||||
"id": "0",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"type": "button",
|
||||
"id": "11",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "hotkeyenable",
|
||||
"type": "button",
|
||||
"id": "8",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"type": "button",
|
||||
"id": "12",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftshoulder",
|
||||
"type": "button",
|
||||
"id": "4",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "lefttrigger",
|
||||
"type": "button",
|
||||
"id": "6",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "right",
|
||||
"type": "button",
|
||||
"id": "13",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightshoulder",
|
||||
"type": "button",
|
||||
"id": "5",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "righttrigger",
|
||||
"type": "button",
|
||||
"id": "7",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "select",
|
||||
"type": "button",
|
||||
"id": "8",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "start",
|
||||
"type": "button",
|
||||
"id": "9",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"type": "button",
|
||||
"id": "10",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "x",
|
||||
"type": "button",
|
||||
"id": "2",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "y",
|
||||
"type": "button",
|
||||
"id": "3",
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,199 @@
|
||||
{
|
||||
"name": "r36s_Gamepad",
|
||||
"vendor": 1,
|
||||
"product": 4488,
|
||||
"version": 392,
|
||||
"buses": [
|
||||
25
|
||||
],
|
||||
"sdl_mapping": "platform:Linux,a:b1,b:b0,dpdown:b14,dpleft:b15,+lefty:+a1,-leftx:-a0,+leftx:+a0,-lefty:-a1,leftshoulder:b4,leftstick:b11,lefttrigger:b6,dpright:b16,+righty:+a3,-rightx:-a2,+rightx:+a2,-righty:-a3,rightshoulder:b5,rightstick:b12,righttrigger:b7,back:b8,start:b9,dpup:b13,x:b2,y:b3,",
|
||||
"retroarch": {
|
||||
"input_driver": "udev",
|
||||
"input_device": "r36s_Gamepad",
|
||||
"input_device_display_name": "R36S",
|
||||
"input_b_btn": "0",
|
||||
"input_y_btn": "3",
|
||||
"input_select_btn": "8",
|
||||
"input_start_btn": "9",
|
||||
"input_a_btn": "1",
|
||||
"input_x_btn": "2",
|
||||
"input_l_btn": "4",
|
||||
"input_r_btn": "5",
|
||||
"input_l2_btn": "6",
|
||||
"input_r2_btn": "7",
|
||||
"input_l3_btn": "11",
|
||||
"input_r3_btn": "12",
|
||||
"input_up_btn": "13",
|
||||
"input_down_btn": "14",
|
||||
"input_left_btn": "15",
|
||||
"input_right_btn": "16",
|
||||
"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_enable_hotkey_btn": "8",
|
||||
"input_exit_emulator_btn": "9",
|
||||
"input_menu_toggle_btn": "2",
|
||||
"input_fps_toggle_btn": "3",
|
||||
"input_load_state_btn": "4",
|
||||
"input_save_state_btn": "5",
|
||||
"input_rewind_btn": "6",
|
||||
"input_toggle_fast_forward_btn": "7"
|
||||
},
|
||||
"es_inputs": [
|
||||
{
|
||||
"name": "a",
|
||||
"type": "button",
|
||||
"id": "1",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "b",
|
||||
"type": "button",
|
||||
"id": "0",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"type": "button",
|
||||
"id": "14",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "hotkeyenable",
|
||||
"type": "button",
|
||||
"id": "10",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"type": "button",
|
||||
"id": "15",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogdown",
|
||||
"type": "axis",
|
||||
"id": "1",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogleft",
|
||||
"type": "axis",
|
||||
"id": "0",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogright",
|
||||
"type": "axis",
|
||||
"id": "0",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogup",
|
||||
"type": "axis",
|
||||
"id": "1",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "leftshoulder",
|
||||
"type": "button",
|
||||
"id": "4",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftthumb",
|
||||
"type": "button",
|
||||
"id": "11",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "lefttrigger",
|
||||
"type": "button",
|
||||
"id": "6",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "right",
|
||||
"type": "button",
|
||||
"id": "16",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogdown",
|
||||
"type": "axis",
|
||||
"id": "3",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogleft",
|
||||
"type": "axis",
|
||||
"id": "2",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogright",
|
||||
"type": "axis",
|
||||
"id": "2",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogup",
|
||||
"type": "axis",
|
||||
"id": "3",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "rightshoulder",
|
||||
"type": "button",
|
||||
"id": "5",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightthumb",
|
||||
"type": "button",
|
||||
"id": "12",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "righttrigger",
|
||||
"type": "button",
|
||||
"id": "7",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "select",
|
||||
"type": "button",
|
||||
"id": "8",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "start",
|
||||
"type": "button",
|
||||
"id": "9",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"type": "button",
|
||||
"id": "13",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "x",
|
||||
"type": "button",
|
||||
"id": "2",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "y",
|
||||
"type": "button",
|
||||
"id": "3",
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,224 @@
|
||||
{
|
||||
"name": "retrogame_joypad",
|
||||
"vendor": 18507,
|
||||
"product": 4353,
|
||||
"version": 256,
|
||||
"buses": [
|
||||
3,
|
||||
25
|
||||
],
|
||||
"sdl_mapping": {
|
||||
"03009b4d4b4800000111000000010000": "platform:Linux,x:b2,a:b0,b:b1,y:b3,back:b8,start:b9,dpleft:b15,dpdown:b14,dpright:b16,dpup:b13,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftstick:b11,rightstick:b12,leftx:a0,lefty:a1,rightx:a2,righty:a3,",
|
||||
"19009b4d4b4800000111000000010000": "platform:Linux,x:b2,a:b0,b:b1,y:b3,back:b8,guide:b10,start:b9,dpleft:b15,dpdown:b14,dpright:b16,dpup:b13,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftstick:b11,rightstick:b12,leftx:a0,lefty:a1,rightx:a2,righty:a3,"
|
||||
},
|
||||
"retroarch": {
|
||||
"input_driver": "udev",
|
||||
"input_device": "retrogame_joypad",
|
||||
"input_vendor_id": "18507",
|
||||
"input_product_id": "4353",
|
||||
"input_a": "x",
|
||||
"input_a_btn": "1",
|
||||
"input_analog_dpad_mode": "0",
|
||||
"input_b": "z",
|
||||
"input_b_btn": "0",
|
||||
"input_down": "down",
|
||||
"input_down_btn": "14",
|
||||
"input_gun_trigger_mbtn": "1",
|
||||
"input_joypad_index": "0",
|
||||
"input_l": "q",
|
||||
"input_l2_btn": "6",
|
||||
"input_l3_btn": "11",
|
||||
"input_l_btn": "4",
|
||||
"input_l_x_minus_axis": "-0",
|
||||
"input_l_x_plus_axis": "+0",
|
||||
"input_l_y_minus_axis": "-1",
|
||||
"input_l_y_plus_axis": "+1",
|
||||
"input_left": "left",
|
||||
"input_left_btn": "15",
|
||||
"input_mouse_index": "0",
|
||||
"input_r": "w",
|
||||
"input_r2_btn": "7",
|
||||
"input_r3_btn": "12",
|
||||
"input_r_btn": "5",
|
||||
"input_r_x_minus_axis": "-2",
|
||||
"input_r_x_plus_axis": "+2",
|
||||
"input_r_y_minus_axis": "-3",
|
||||
"input_r_y_plus_axis": "+3",
|
||||
"input_right": "right",
|
||||
"input_right_btn": "16",
|
||||
"input_select": "rshift",
|
||||
"input_select_btn": "8",
|
||||
"input_start": "enter",
|
||||
"input_start_btn": "9",
|
||||
"input_up": "up",
|
||||
"input_up_btn": "13",
|
||||
"input_x": "s",
|
||||
"input_x_btn": "2",
|
||||
"input_y": "a",
|
||||
"input_y_btn": "3",
|
||||
"input_enable_hotkey_btn": "8",
|
||||
"input_exit_emulator_btn": "9",
|
||||
"input_screenshot_btn": "nul",
|
||||
"input_pause_toggle_btn": "nul",
|
||||
"input_menu_toggle_btn": "2",
|
||||
"input_fps_toggle_btn": "3",
|
||||
"input_state_slot_increase_btn": "nul",
|
||||
"input_state_slot_decrease_btn": "nul",
|
||||
"input_load_state_btn": "4",
|
||||
"input_save_state_btn": "5",
|
||||
"input_rewind_btn": "6",
|
||||
"input_toggle_fast_forward_btn": "7"
|
||||
},
|
||||
"es_inputs": [
|
||||
{
|
||||
"name": "a",
|
||||
"type": "button",
|
||||
"id": "1",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "b",
|
||||
"type": "button",
|
||||
"id": "0",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"type": "button",
|
||||
"id": "14",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "hotkeyenable",
|
||||
"type": "button",
|
||||
"id": "8",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"type": "button",
|
||||
"id": "15",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogdown",
|
||||
"type": "axis",
|
||||
"id": "1",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogleft",
|
||||
"type": "axis",
|
||||
"id": "0",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogright",
|
||||
"type": "axis",
|
||||
"id": "0",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogup",
|
||||
"type": "axis",
|
||||
"id": "1",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "leftshoulder",
|
||||
"type": "button",
|
||||
"id": "4",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftthumb",
|
||||
"type": "button",
|
||||
"id": "11",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "lefttrigger",
|
||||
"type": "button",
|
||||
"id": "6",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "right",
|
||||
"type": "button",
|
||||
"id": "16",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogdown",
|
||||
"type": "axis",
|
||||
"id": "3",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogleft",
|
||||
"type": "axis",
|
||||
"id": "2",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogright",
|
||||
"type": "axis",
|
||||
"id": "2",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogup",
|
||||
"type": "axis",
|
||||
"id": "3",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "rightshoulder",
|
||||
"type": "button",
|
||||
"id": "5",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightthumb",
|
||||
"type": "button",
|
||||
"id": "12",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "righttrigger",
|
||||
"type": "button",
|
||||
"id": "7",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "select",
|
||||
"type": "button",
|
||||
"id": "8",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "start",
|
||||
"type": "button",
|
||||
"id": "9",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"type": "button",
|
||||
"id": "13",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "x",
|
||||
"type": "button",
|
||||
"id": "2",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "y",
|
||||
"type": "button",
|
||||
"id": "3",
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,195 @@
|
||||
{
|
||||
"name": "retrogame_joypad_s1_f2",
|
||||
"vendor": 18507,
|
||||
"product": 4370,
|
||||
"version": 256,
|
||||
"buses": [
|
||||
25
|
||||
],
|
||||
"sdl_mapping": "platform:Linux,x:b2,a:b1,b:b0,y:b3,back:b8,guide:b10,start:b9,dpleft:b15,dpdown:b14,dpright:b16,dpup:b13,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftstick:b11,rightstick:b12,leftx:a0,lefty:a1,rightx:a2,righty:a3,",
|
||||
"retroarch": {
|
||||
"input_driver": "udev",
|
||||
"input_device": "retrogame_joypad_s1_f2",
|
||||
"input_device_display_name": "Retro console gamepad",
|
||||
"input_b_btn": "0",
|
||||
"input_y_btn": "3",
|
||||
"input_select_btn": "8",
|
||||
"input_start_btn": "9",
|
||||
"input_up_btn": "13",
|
||||
"input_down_btn": "14",
|
||||
"input_left_btn": "15",
|
||||
"input_right_btn": "16",
|
||||
"input_a_btn": "1",
|
||||
"input_x_btn": "2",
|
||||
"input_l_btn": "4",
|
||||
"input_r_btn": "5",
|
||||
"input_l2_btn": "6",
|
||||
"input_r2_btn": "7",
|
||||
"input_l3_btn": "11",
|
||||
"input_r3_btn": "12",
|
||||
"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_enable_hotkey_btn": "10",
|
||||
"input_exit_emulator_btn": "9",
|
||||
"input_menu_toggle_btn": "2",
|
||||
"input_fps_toggle_btn": "3",
|
||||
"input_load_state_btn": "4",
|
||||
"input_save_state_btn": "5",
|
||||
"input_rewind_btn": "6",
|
||||
"input_toggle_fast_forward_btn": "7"
|
||||
},
|
||||
"es_inputs": [
|
||||
{
|
||||
"name": "a",
|
||||
"type": "button",
|
||||
"id": "1",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "b",
|
||||
"type": "button",
|
||||
"id": "0",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"type": "button",
|
||||
"id": "14",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "hotkeyenable",
|
||||
"type": "button",
|
||||
"id": "10",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"type": "button",
|
||||
"id": "15",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogdown",
|
||||
"type": "axis",
|
||||
"id": "1",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogleft",
|
||||
"type": "axis",
|
||||
"id": "0",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogright",
|
||||
"type": "axis",
|
||||
"id": "0",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogup",
|
||||
"type": "axis",
|
||||
"id": "1",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "leftshoulder",
|
||||
"type": "button",
|
||||
"id": "4",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftthumb",
|
||||
"type": "button",
|
||||
"id": "11",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "lefttrigger",
|
||||
"type": "button",
|
||||
"id": "6",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "right",
|
||||
"type": "button",
|
||||
"id": "16",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogdown",
|
||||
"type": "axis",
|
||||
"id": "3",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogleft",
|
||||
"type": "axis",
|
||||
"id": "2",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogright",
|
||||
"type": "axis",
|
||||
"id": "2",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogup",
|
||||
"type": "axis",
|
||||
"id": "3",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "rightshoulder",
|
||||
"type": "button",
|
||||
"id": "5",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightthumb",
|
||||
"type": "button",
|
||||
"id": "12",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "righttrigger",
|
||||
"type": "button",
|
||||
"id": "7",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "select",
|
||||
"type": "button",
|
||||
"id": "8",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "start",
|
||||
"type": "button",
|
||||
"id": "9",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"type": "button",
|
||||
"id": "13",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "x",
|
||||
"type": "button",
|
||||
"id": "2",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "y",
|
||||
"type": "button",
|
||||
"id": "3",
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,199 @@
|
||||
{
|
||||
"name": "rg552_joypad",
|
||||
"vendor": 18507,
|
||||
"product": 4353,
|
||||
"version": 564,
|
||||
"buses": [
|
||||
25
|
||||
],
|
||||
"sdl_mapping": "platform:Linux,x:b2,a:b1,b:b0,y:b3,back:b8,start:b9,dpleft:b15,dpdown:b14,dpright:b16,dpup:b13,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftstick:b11,rightstick:b12,leftx:a0,lefty:a1,rightx:a2,righty:a3,",
|
||||
"retroarch": {
|
||||
"input_driver": "udev",
|
||||
"input_device": "rg552_joypad",
|
||||
"input_device_display_name": "Anbernic RG552 Joypad",
|
||||
"input_b_btn": "0",
|
||||
"input_a_btn": "1",
|
||||
"input_x_btn": "2",
|
||||
"input_y_btn": "3",
|
||||
"input_select_btn": "8",
|
||||
"input_start_btn": "9",
|
||||
"input_l_btn": "4",
|
||||
"input_r_btn": "5",
|
||||
"input_l2_btn": "6",
|
||||
"input_r2_btn": "7",
|
||||
"input_l3_btn": "11",
|
||||
"input_r3_btn": "12",
|
||||
"input_up_btn": "13",
|
||||
"input_down_btn": "14",
|
||||
"input_left_btn": "15",
|
||||
"input_right_btn": "16",
|
||||
"input_l_x_minus_axis": "-0",
|
||||
"input_l_x_plus_axis": "+0",
|
||||
"input_l_y_minus_axis": "-1",
|
||||
"input_l_y_plus_axis": "+1",
|
||||
"input_r_x_minus_axis": "-2",
|
||||
"input_r_x_plus_axis": "+2",
|
||||
"input_r_y_minus_axis": "-3",
|
||||
"input_r_y_plus_axis": "+3",
|
||||
"input_enable_hotkey_btn": "8",
|
||||
"input_exit_emulator_btn": "9",
|
||||
"input_menu_toggle_btn": "2",
|
||||
"input_fps_toggle_btn": "3",
|
||||
"input_load_state_btn": "4",
|
||||
"input_save_state_btn": "5",
|
||||
"input_rewind_btn": "11",
|
||||
"input_toggle_fast_forward_btn": "12"
|
||||
},
|
||||
"es_inputs": [
|
||||
{
|
||||
"name": "a",
|
||||
"type": "button",
|
||||
"id": "1",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "b",
|
||||
"type": "button",
|
||||
"id": "0",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"type": "button",
|
||||
"id": "14",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "hotkeyenable",
|
||||
"type": "button",
|
||||
"id": "8",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"type": "button",
|
||||
"id": "15",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogdown",
|
||||
"type": "axis",
|
||||
"id": "1",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogleft",
|
||||
"type": "axis",
|
||||
"id": "0",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogright",
|
||||
"type": "axis",
|
||||
"id": "0",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogup",
|
||||
"type": "axis",
|
||||
"id": "1",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "leftshoulder",
|
||||
"type": "button",
|
||||
"id": "4",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftthumb",
|
||||
"type": "button",
|
||||
"id": "11",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "lefttrigger",
|
||||
"type": "button",
|
||||
"id": "6",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "right",
|
||||
"type": "button",
|
||||
"id": "16",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogdown",
|
||||
"type": "axis",
|
||||
"id": "3",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogleft",
|
||||
"type": "axis",
|
||||
"id": "2",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogright",
|
||||
"type": "axis",
|
||||
"id": "2",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogup",
|
||||
"type": "axis",
|
||||
"id": "3",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "rightshoulder",
|
||||
"type": "button",
|
||||
"id": "5",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightthumb",
|
||||
"type": "button",
|
||||
"id": "12",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "righttrigger",
|
||||
"type": "button",
|
||||
"id": "7",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "select",
|
||||
"type": "button",
|
||||
"id": "8",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "start",
|
||||
"type": "button",
|
||||
"id": "9",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"type": "button",
|
||||
"id": "13",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "x",
|
||||
"type": "button",
|
||||
"id": "2",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "y",
|
||||
"type": "button",
|
||||
"id": "3",
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,148 @@
|
||||
{
|
||||
"name": "rg_arc_joypad",
|
||||
"vendor": 1,
|
||||
"product": 2604,
|
||||
"version": 256,
|
||||
"buses": [
|
||||
25
|
||||
],
|
||||
"sdl_mapping": "platform:Linux,x:b4,a:b0,b:b1,y:b3,back:b10,start:b11,dpleft:b14,dpdown:b13,dpright:b15,dpup:b12,leftshoulder:b6,lefttrigger:b8,rightshoulder:b7,righttrigger:b9,rightstick:b2,leftstick:b5,platform:Linux,",
|
||||
"retroarch": {
|
||||
"input_driver": "udev",
|
||||
"input_device": "rg_arc_joypad",
|
||||
"input_device_display_name": "Anbernic RG ARC",
|
||||
"input_b_btn": "1",
|
||||
"input_b_btn_label": "A",
|
||||
"input_y_btn": "3",
|
||||
"input_y_btn_label": "X",
|
||||
"input_select_btn": "10",
|
||||
"input_start_btn": "11",
|
||||
"input_a_btn": "0",
|
||||
"input_a_btn_label": "B",
|
||||
"input_x_btn": "4",
|
||||
"input_x_btn_label": "Y",
|
||||
"input_l_btn": "6",
|
||||
"input_r_btn": "7",
|
||||
"input_l2_btn": "8",
|
||||
"input_r2_btn": "9",
|
||||
"input_up_btn": "12",
|
||||
"input_left_btn": "14",
|
||||
"input_right_btn": "15",
|
||||
"input_l3_btn": "5",
|
||||
"input_l3_btn_label": "Z",
|
||||
"input_r3_btn": "2",
|
||||
"input_r3_btn_label": "C",
|
||||
"input_enable_hotkey_btn": "10",
|
||||
"input_exit_emulator_btn": "11",
|
||||
"input_menu_toggle_btn": "4",
|
||||
"input_fps_toggle_btn": "3",
|
||||
"input_load_state_btn": "6",
|
||||
"input_save_state_btn": "7",
|
||||
"input_rewind_btn": "8",
|
||||
"input_toggle_fast_forward_btn": "9"
|
||||
},
|
||||
"es_inputs": [
|
||||
{
|
||||
"name": "a",
|
||||
"type": "button",
|
||||
"id": "0",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "b",
|
||||
"type": "button",
|
||||
"id": "1",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"type": "button",
|
||||
"id": "13",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "hotkeyenable",
|
||||
"type": "button",
|
||||
"id": "10",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"type": "button",
|
||||
"id": "14",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftshoulder",
|
||||
"type": "button",
|
||||
"id": "6",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftthumb",
|
||||
"type": "button",
|
||||
"id": "5",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "lefttrigger",
|
||||
"type": "button",
|
||||
"id": "8",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "right",
|
||||
"type": "button",
|
||||
"id": "15",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightshoulder",
|
||||
"type": "button",
|
||||
"id": "7",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightthumb",
|
||||
"type": "button",
|
||||
"id": "2",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "righttrigger",
|
||||
"type": "button",
|
||||
"id": "9",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "select",
|
||||
"type": "button",
|
||||
"id": "10",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "start",
|
||||
"type": "button",
|
||||
"id": "11",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"type": "button",
|
||||
"id": "12",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "x",
|
||||
"type": "button",
|
||||
"id": "4",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "y",
|
||||
"type": "button",
|
||||
"id": "3",
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,203 @@
|
||||
{
|
||||
"name": "zed_joystick",
|
||||
"vendor": 0,
|
||||
"product": 0,
|
||||
"version": 0,
|
||||
"buses": [
|
||||
25
|
||||
],
|
||||
"sdl_mapping": "platform:Linux,x:b2,a:b0,b:b1,y:b3,back:b8,start:b9,dpleft:b15,dpdown:b14,dpright:b16,dpup:b13,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftstick:b11,rightstick:b12,leftx:a0,lefty:a1,rightx:a2,righty:a3,",
|
||||
"retroarch": {
|
||||
"input_driver": "udev",
|
||||
"input_device": "zed_joystick",
|
||||
"input_b_btn": "1",
|
||||
"input_y_btn": "3",
|
||||
"input_select_btn": "8",
|
||||
"input_start_btn": "9",
|
||||
"input_up_btn": "13",
|
||||
"input_down_btn": "14",
|
||||
"input_left_btn": "15",
|
||||
"input_right_btn": "16",
|
||||
"input_a_btn": "0",
|
||||
"input_x_btn": "2",
|
||||
"input_l_btn": "4",
|
||||
"input_r_btn": "5",
|
||||
"input_l2_btn": "6",
|
||||
"input_r2_btn": "7",
|
||||
"input_l3_btn": "11",
|
||||
"input_r3_btn": "12",
|
||||
"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_gun_trigger_mbtn": "1",
|
||||
"input_enable_hotkey_btn": "8",
|
||||
"input_exit_emulator_btn": "9",
|
||||
"input_screenshot_btn": "nul",
|
||||
"input_pause_toggle_btn": "nul",
|
||||
"input_menu_toggle_btn": "2",
|
||||
"input_fps_toggle_btn": "3",
|
||||
"input_state_slot_increase_btn": "nul",
|
||||
"input_state_slot_decrease_btn": "nul",
|
||||
"input_load_state_btn": "4",
|
||||
"input_save_state_btn": "5",
|
||||
"input_rewind_btn": "6",
|
||||
"input_toggle_fast_forward_btn": "7"
|
||||
},
|
||||
"es_inputs": [
|
||||
{
|
||||
"name": "a",
|
||||
"type": "button",
|
||||
"id": "0",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "b",
|
||||
"type": "button",
|
||||
"id": "1",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"type": "button",
|
||||
"id": "14",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "hotkeyenable",
|
||||
"type": "button",
|
||||
"id": "8",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"type": "button",
|
||||
"id": "15",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogdown",
|
||||
"type": "axis",
|
||||
"id": "1",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogleft",
|
||||
"type": "axis",
|
||||
"id": "0",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogright",
|
||||
"type": "axis",
|
||||
"id": "0",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftanalogup",
|
||||
"type": "axis",
|
||||
"id": "1",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "leftshoulder",
|
||||
"type": "button",
|
||||
"id": "4",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "leftthumb",
|
||||
"type": "button",
|
||||
"id": "11",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "lefttrigger",
|
||||
"type": "button",
|
||||
"id": "6",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "right",
|
||||
"type": "button",
|
||||
"id": "16",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogdown",
|
||||
"type": "axis",
|
||||
"id": "3",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogleft",
|
||||
"type": "axis",
|
||||
"id": "2",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogright",
|
||||
"type": "axis",
|
||||
"id": "2",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightanalogup",
|
||||
"type": "axis",
|
||||
"id": "3",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"name": "rightshoulder",
|
||||
"type": "button",
|
||||
"id": "5",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "rightthumb",
|
||||
"type": "button",
|
||||
"id": "12",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "righttrigger",
|
||||
"type": "button",
|
||||
"id": "7",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "select",
|
||||
"type": "button",
|
||||
"id": "8",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "start",
|
||||
"type": "button",
|
||||
"id": "9",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"type": "button",
|
||||
"id": "13",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "x",
|
||||
"type": "button",
|
||||
"id": "2",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "y",
|
||||
"type": "button",
|
||||
"id": "3",
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
}
|
||||
Executable
+365
@@ -0,0 +1,365 @@
|
||||
#!/usr/bin/env python3
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2026-present ArchR (https://github.com/archr-linux/Arch-R)
|
||||
#
|
||||
# Single source of truth for the built-in gamepad configs.
|
||||
#
|
||||
# Every platform pad historically needed THREE hand-maintained files:
|
||||
# 1. es_input.cfg (EmulationStation)
|
||||
# 2. retroarch-joypads/gamepads/<name>.cfg (RetroArch udev autoconfig)
|
||||
# 3. gamecontrollerdb.txt (SDL games and ports)
|
||||
# and nothing checked they agreed. The Soysauce pad shipped with only
|
||||
# two of the three, so SDL ports saw no controller at all.
|
||||
#
|
||||
# This tool keeps one JSON definition per pad in defs/ and can:
|
||||
# verify compare defs against the three shipped artifacts (CI check)
|
||||
# write regenerate the managed sections of the artifacts from defs
|
||||
# import bootstrap a def from the current artifacts (migration aid)
|
||||
# guid print the SDL GUIDs a given identity produces
|
||||
#
|
||||
# SDL GUID layout (SDL2 >= 2.26, matches what the devices report at
|
||||
# runtime): bus u16 LE + crc16-ARC(name) u16 LE, then
|
||||
# vendor and product both non-zero:
|
||||
# vendor LE, 0000, product LE, 0000, version LE, 0000
|
||||
# otherwise (vendor*product == 0):
|
||||
# first 11 bytes of the name, zero padded
|
||||
# The second form matters: the Soysauce pad reports vendor 0, so its
|
||||
# real GUID embeds the name ("GO-Super Ga"), not the product id.
|
||||
#
|
||||
# Round-trip fidelity (documented, deliberate):
|
||||
# gamecontrollerdb line : byte-exact (GUID recomputed from identity,
|
||||
# mapping stored verbatim)
|
||||
# retroarch cfg : semantic (key = value set; comments, blank
|
||||
# lines and ordering are not modeled)
|
||||
# es_input block : semantic (device attrs + set of <input>
|
||||
# tuples; the legacy file mixes tabs/spaces)
|
||||
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
import argparse
|
||||
|
||||
HERE = os.path.dirname(os.path.abspath(__file__))
|
||||
ROOT = os.path.abspath(os.path.join(HERE, '..', '..', '..'))
|
||||
DEFS = os.path.join(HERE, 'defs')
|
||||
|
||||
ES_INPUT = os.path.join(
|
||||
ROOT, 'projects/ArchR/packages/ui/emulationstation/config/common/es_input.cfg')
|
||||
RA_DIR = os.path.join(
|
||||
ROOT, 'projects/ArchR/packages/emulators/libretro/retroarch/retroarch-joypads/gamepads')
|
||||
GCDB = os.path.join(
|
||||
ROOT, 'projects/ArchR/packages/apps/gamecontrollerdb/config/gamecontrollerdb.txt')
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# GUID machinery
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
def crc16_arc(data: bytes) -> int:
|
||||
crc = 0
|
||||
for b in data:
|
||||
crc ^= b
|
||||
for _ in range(8):
|
||||
crc = (crc >> 1) ^ 0xA001 if crc & 1 else crc >> 1
|
||||
return crc
|
||||
|
||||
|
||||
def _u16le(v):
|
||||
return bytes((v & 0xff, (v >> 8) & 0xff))
|
||||
|
||||
|
||||
def sdl_guid(name, bus, vendor, product, version):
|
||||
head = _u16le(bus) + _u16le(crc16_arc(name.encode()))
|
||||
if vendor and product:
|
||||
body = (_u16le(vendor) + b'\x00\x00' + _u16le(product) + b'\x00\x00'
|
||||
+ _u16le(version) + b'\x00\x00')
|
||||
else:
|
||||
body = name.encode()[:11].ljust(12, b'\x00')
|
||||
return (head + body).hex()
|
||||
|
||||
|
||||
def guids_for(pad):
|
||||
return [sdl_guid(pad['name'], bus, pad['vendor'], pad['product'],
|
||||
pad['version']) for bus in pad['buses']]
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Artifact parsing
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
def parse_retroarch_cfg(text):
|
||||
out = {}
|
||||
for line in text.splitlines():
|
||||
m = re.match(r'^\s*([A-Za-z0-9_]+)\s*=\s*"(.*)"\s*$', line)
|
||||
if m:
|
||||
out[m.group(1)] = m.group(2)
|
||||
return out
|
||||
|
||||
|
||||
_ES_BLOCK = re.compile(
|
||||
r'<inputConfig[^>]*deviceGUID="(?P<guid>[0-9a-fA-F]{32})"[^>]*>'
|
||||
r'(?P<body>.*?)</inputConfig>', re.S)
|
||||
_ES_ATTR = re.compile(r'(\w+)="([^"]*)"')
|
||||
|
||||
|
||||
def es_blocks(text):
|
||||
"""guid -> (deviceName, set of (name,type,id,value), full block span)."""
|
||||
blocks = {}
|
||||
for m in _ES_BLOCK.finditer(text):
|
||||
head = text[m.start():text.index('>', m.start()) + 1]
|
||||
attrs = dict(_ES_ATTR.findall(head))
|
||||
inputs = set()
|
||||
for im in re.finditer(r'<input\s+([^/>]*)/>', m.group('body')):
|
||||
a = dict(_ES_ATTR.findall(im.group(1)))
|
||||
inputs.add((a.get('name'), a.get('type'), a.get('id'), a.get('value')))
|
||||
blocks[m.group('guid').lower()] = (attrs.get('deviceName'), inputs,
|
||||
(m.start(), m.end()))
|
||||
return blocks
|
||||
|
||||
|
||||
def gcdb_lines(text):
|
||||
"""name -> {guid: full line}"""
|
||||
out = {}
|
||||
for line in text.splitlines():
|
||||
if not line or line.startswith('#'):
|
||||
continue
|
||||
parts = line.split(',', 2)
|
||||
if len(parts) < 3:
|
||||
continue
|
||||
out.setdefault(parts[1], {})[parts[0].lower()] = line
|
||||
return out
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Generation from a definition
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
def gen_gcdb_line(pad, guid):
|
||||
# sdl_mapping is a plain string, or a {guid: mapping} dict when the
|
||||
# shipped lines genuinely differ per bus (retrogame_joypad's 0x19
|
||||
# line carries guide:b10, its 0x03 line does not).
|
||||
m = pad['sdl_mapping']
|
||||
if isinstance(m, dict):
|
||||
m = m[guid]
|
||||
return f"{guid},{pad['name']},{m}"
|
||||
|
||||
|
||||
def gen_retroarch_text(pad):
|
||||
ra = pad['retroarch']
|
||||
ident = ['input_driver', 'input_device', 'input_device_display_name',
|
||||
'input_vendor_id', 'input_product_id']
|
||||
lines = [f'{k} = "{ra[k]}"' for k in ident if k in ra]
|
||||
lines += [f'{k} = "{ra[k]}"' for k in sorted(ra) if k not in ident]
|
||||
return '\n'.join(lines) + '\n'
|
||||
|
||||
|
||||
def gen_es_block(pad, guid, indent=' '):
|
||||
rows = sorted(pad['es_inputs'], key=lambda r: r['name'])
|
||||
out = [f'{indent}<inputConfig type="joystick" deviceName="{pad["name"]}" '
|
||||
f'deviceGUID="{guid}">']
|
||||
for r in rows:
|
||||
out.append(f'{indent} <input name="{r["name"]}" type="{r["type"]}" '
|
||||
f'id="{r["id"]}" value="{r["value"]}" />')
|
||||
out.append(f'{indent}</inputConfig>')
|
||||
return '\n'.join(out)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Subcommands
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
def load_defs(names=None):
|
||||
pads = []
|
||||
for f in sorted(os.listdir(DEFS)):
|
||||
if not f.endswith('.json'):
|
||||
continue
|
||||
pad = json.load(open(os.path.join(DEFS, f)))
|
||||
if names and pad['name'] not in names:
|
||||
continue
|
||||
pads.append(pad)
|
||||
return pads
|
||||
|
||||
|
||||
def cmd_verify(args):
|
||||
pads = load_defs(args.names)
|
||||
gcdb = gcdb_lines(open(GCDB).read())
|
||||
es = es_blocks(open(ES_INPUT).read())
|
||||
failed = False
|
||||
|
||||
def bad(msg):
|
||||
nonlocal failed
|
||||
failed = True
|
||||
print(f'DRIFT {msg}')
|
||||
|
||||
for pad in pads:
|
||||
name = pad['name']
|
||||
guids = guids_for(pad)
|
||||
if pad.get('guid_override'):
|
||||
guids = pad['guid_override']
|
||||
|
||||
# 1. gamecontrollerdb: byte-exact line per GUID
|
||||
have = gcdb.get(name, {})
|
||||
for g in guids:
|
||||
want = gen_gcdb_line(pad, g)
|
||||
if g not in have:
|
||||
bad(f'{name}: gamecontrollerdb missing GUID {g}')
|
||||
elif have[g] != want:
|
||||
bad(f'{name}: gamecontrollerdb line differs for {g}\n'
|
||||
f' have: {have[g]}\n want: {want}')
|
||||
for g in have:
|
||||
if g not in guids:
|
||||
bad(f'{name}: gamecontrollerdb has stale GUID {g}')
|
||||
|
||||
# 2. retroarch cfg: semantic key=value equality
|
||||
ra_path = os.path.join(RA_DIR, f'{name}.cfg')
|
||||
if not os.path.exists(ra_path):
|
||||
bad(f'{name}: retroarch cfg missing ({ra_path})')
|
||||
else:
|
||||
have_ra = parse_retroarch_cfg(open(ra_path).read())
|
||||
want_ra = pad['retroarch']
|
||||
for k in sorted(set(have_ra) | set(want_ra)):
|
||||
if have_ra.get(k) != want_ra.get(k):
|
||||
bad(f'{name}: retroarch {k}: '
|
||||
f'have {have_ra.get(k)!r} want {want_ra.get(k)!r}')
|
||||
|
||||
# 3. es_input: semantic block per GUID
|
||||
want_es = {(r['name'], r['type'], str(r['id']), str(r['value']))
|
||||
for r in pad['es_inputs']}
|
||||
for g in guids:
|
||||
if g not in es:
|
||||
bad(f'{name}: es_input block missing for GUID {g}')
|
||||
continue
|
||||
dev, have_es, _ = es[g]
|
||||
if dev != name:
|
||||
bad(f'{name}: es_input deviceName is {dev!r} for {g}')
|
||||
if have_es != want_es:
|
||||
bad(f'{name}: es_input inputs differ for {g}: '
|
||||
f'only-in-file {sorted(have_es - want_es)} '
|
||||
f'only-in-def {sorted(want_es - have_es)}')
|
||||
|
||||
if not failed:
|
||||
print(f'OK {name} ({len(guids)} guid)')
|
||||
return 1 if failed else 0
|
||||
|
||||
|
||||
def cmd_write(args):
|
||||
pads = load_defs(args.names)
|
||||
|
||||
gcdb_text = open(GCDB).read()
|
||||
name_lines = gcdb_lines(gcdb_text)
|
||||
lines = gcdb_text.splitlines()
|
||||
for pad in pads:
|
||||
guids = pad.get('guid_override') or guids_for(pad)
|
||||
wanted = {g: gen_gcdb_line(pad, g) for g in guids}
|
||||
old = set(name_lines.get(pad['name'], {}).values())
|
||||
lines = [l for l in lines if l not in old or l in wanted.values()]
|
||||
present = set(lines)
|
||||
for g, l in wanted.items():
|
||||
if l not in present:
|
||||
lines.append(l)
|
||||
open(GCDB, 'w').write('\n'.join(lines).rstrip('\n') + '\n')
|
||||
|
||||
for pad in pads:
|
||||
ra_path = os.path.join(RA_DIR, f"{pad['name']}.cfg")
|
||||
open(ra_path, 'w').write(gen_retroarch_text(pad))
|
||||
|
||||
es_text = open(ES_INPUT).read()
|
||||
for pad in pads:
|
||||
guids = pad.get('guid_override') or guids_for(pad)
|
||||
for g in guids:
|
||||
blocks = es_blocks(es_text)
|
||||
new_block = gen_es_block(pad, g)
|
||||
if g in blocks:
|
||||
s, e = blocks[g][2]
|
||||
# keep the original leading indentation of the block
|
||||
ls = es_text.rfind('\n', 0, s) + 1
|
||||
indent = es_text[ls:s]
|
||||
new_block = gen_es_block(pad, g, indent=indent or ' ')
|
||||
es_text = es_text[:ls] + new_block + es_text[e:]
|
||||
else:
|
||||
end = es_text.rindex('</inputList>')
|
||||
es_text = es_text[:end] + new_block + '\n' + es_text[end:]
|
||||
open(ES_INPUT, 'w').write(es_text)
|
||||
print(f'wrote {len(pads)} pad(s)')
|
||||
return 0
|
||||
|
||||
|
||||
def cmd_import(args):
|
||||
gcdb = gcdb_lines(open(GCDB).read())
|
||||
es = es_blocks(open(ES_INPUT).read())
|
||||
for name in args.names:
|
||||
entry = gcdb.get(name)
|
||||
if not entry:
|
||||
print(f'skip {name}: not in gamecontrollerdb')
|
||||
continue
|
||||
guids = sorted(entry)
|
||||
# identity from the first numeric-form GUID, else name-form
|
||||
vendor = product = version = 0
|
||||
buses = []
|
||||
for g in guids:
|
||||
raw = bytes.fromhex(g)
|
||||
buses.append(raw[0] | raw[1] << 8)
|
||||
body = raw[4:]
|
||||
if body[:11] == name.encode()[:11].ljust(11, b'\x00')[:11]:
|
||||
continue
|
||||
vendor = raw[4] | raw[5] << 8
|
||||
product = raw[8] | raw[9] << 8
|
||||
version = raw[12] | raw[13] << 8
|
||||
pad = {
|
||||
'name': name,
|
||||
'vendor': vendor, 'product': product, 'version': version,
|
||||
'buses': sorted(set(buses)),
|
||||
'sdl_mapping': (entry[guids[0]].split(',', 2)[2]
|
||||
if len({l.split(',', 2)[2] for l in entry.values()}) == 1
|
||||
else {g: entry[g].split(',', 2)[2] for g in guids}),
|
||||
}
|
||||
# cross-check: do the recomputed GUIDs reproduce the file?
|
||||
recomputed = set(guids_for(pad))
|
||||
if recomputed != set(guids):
|
||||
pad['guid_override'] = guids
|
||||
print(f'note {name}: GUIDs not reproducible from identity, '
|
||||
f'stored verbatim ({guids} vs {sorted(recomputed)})')
|
||||
ra_path = os.path.join(RA_DIR, f'{name}.cfg')
|
||||
pad['retroarch'] = (parse_retroarch_cfg(open(ra_path).read())
|
||||
if os.path.exists(ra_path) else {})
|
||||
rows = []
|
||||
for g in guids:
|
||||
if g in es:
|
||||
rows = [{'name': n, 'type': t, 'id': i, 'value': v}
|
||||
for (n, t, i, v) in sorted(es[g][1])]
|
||||
break
|
||||
pad['es_inputs'] = rows
|
||||
out = os.path.join(DEFS, re.sub(r'[^A-Za-z0-9._-]', '_', name) + '.json')
|
||||
json.dump(pad, open(out, 'w'), indent=2, ensure_ascii=False)
|
||||
open(out, 'a').write('\n')
|
||||
print(f'imported {name} -> {os.path.relpath(out, HERE)} '
|
||||
f'({len(guids)} guid, {len(rows)} es inputs, '
|
||||
f'{len(pad["retroarch"])} ra keys)')
|
||||
return 0
|
||||
|
||||
|
||||
def cmd_guid(args):
|
||||
print(sdl_guid(args.name, args.bus, args.vendor, args.product, args.version))
|
||||
return 0
|
||||
|
||||
|
||||
def main():
|
||||
p = argparse.ArgumentParser(description=__doc__)
|
||||
sub = p.add_subparsers(dest='cmd', required=True)
|
||||
for c in ('verify', 'write', 'import'):
|
||||
sp = sub.add_parser(c)
|
||||
sp.add_argument('names', nargs='*' if c != 'import' else '+')
|
||||
g = sub.add_parser('guid')
|
||||
g.add_argument('name')
|
||||
g.add_argument('--bus', type=lambda x: int(x, 0), default=0x19)
|
||||
g.add_argument('--vendor', type=lambda x: int(x, 0), default=0)
|
||||
g.add_argument('--product', type=lambda x: int(x, 0), default=0)
|
||||
g.add_argument('--version', type=lambda x: int(x, 0), default=0)
|
||||
args = p.parse_args()
|
||||
return {'verify': cmd_verify, 'write': cmd_write,
|
||||
'import': cmd_import, 'guid': cmd_guid}[args.cmd](args)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user