mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-07-12 18:19:42 -07:00
62edc065ad
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>
225 lines
4.8 KiB
JSON
225 lines
4.8 KiB
JSON
{
|
|
"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"
|
|
}
|
|
]
|
|
}
|