Retrozord pid (#860)

* RetroZord VID:PID

Added the VID;PID to make_unique, and to the two special input modes.
Removed the Arduino Leonardo specific PID, leaving only he main arduino VID. So any DIY adapter using an arduino will work.

* Use UNIQ field on RetroZord Adapter
This commit is contained in:
Matheus Fraguas
2023-12-09 11:12:53 -03:00
committed by GitHub
parent e9340593f4
commit 490c99dd6f

View File

@@ -3707,6 +3707,7 @@ void mergedevs()
make_unique(0x8282, 0x3201, 1); // Irken Labs JAMMA Expander / Mojo Retro Adapter
make_unique(0x1209, 0xFACA, 1); // ControllaBLE
make_unique(0x16D0, 0x127E, 1); // Reflex Adapt to USB
make_unique(0x1209, 0x595A, 1); // RetroZord adapter
if (cfg.no_merge_vid)
{
@@ -4569,8 +4570,8 @@ static void setup_wheels()
}
}
//Namco NeGcon via RetroZord adapter or Reflex Adapt
else if ((input[i].vid == 0x2341 && input[i].pid == 0x8036 && strstr(input[i].name, "RZordPsWheel")) ||
//Namco NeGcon via Arduino, RetroZord or Reflex Adapt
else if (((input[i].vid == 0x2341 || (input[i].vid == 0x1209 && input[i].pid == 0x595A)) && strstr(input[i].name, "RZordPsWheel")) ||
(input[i].vid == 0x16D0 && input[i].pid == 0x127E && strstr(input[i].name, "ReflexPSWheel")))
{
input[i].wh_accel = 6;
@@ -4807,8 +4808,8 @@ int input_test(int getchar)
input[n].lightgun = 1;
}
//Namco Guncon via RetroZord adapter or Reflex Adapt
if ((input[n].vid == 0x2341 && input[n].pid == 0x8036 && (strstr(uniq, "RZordPsGun") || strstr(input[n].name, "RZordPsGun"))) ||
//Namco Guncon via Arduino, RetroZord or Reflex Adapt
if (((input[n].vid == 0x2341 || (input[n].vid == 0x1209 && input[n].pid == 0x595A)) && (strstr(uniq, "RZordPsGun") || strstr(input[n].name, "RZordPsGun"))) ||
(input[n].vid == 0x16D0 && input[n].pid == 0x127E && (strstr(uniq, "ReflexPSGun") || strstr(input[n].name, "ReflexPSGun"))))
{
input[n].quirk = QUIRK_LIGHTGUN;
@@ -4896,7 +4897,8 @@ int input_test(int getchar)
//Arduino and Teensy devices may share the same VID:PID, so additional field UNIQ is used to differentiate them
//Reflex Adapt also uses the UNIQ field to differentiate between device modes
if ((input[n].vid == 0x2341 || (input[n].vid == 0x16C0 && (input[n].pid>>8) == 0x4) || (input[n].vid == 0x16D0 && input[n].pid == 0x127E)) && strlen(uniq))
//RetroZord Adapter also uses the UNIQ field to differentiate between device modes
if ((input[n].vid == 0x2341 || (input[n].vid == 0x16C0 && (input[n].pid>>8) == 0x4) || (input[n].vid == 0x16D0 && input[n].pid == 0x127E) || (input[n].vid == 0x1209 && input[n].pid == 0x595A)) && strlen(uniq))
{
snprintf(input[n].idstr, sizeof(input[n].idstr), "%04x_%04x_%s", input[n].vid, input[n].pid, uniq);
char *p;