shithub: choc

Download patch

ref: 58c0a3e0b49b19eea234f67c82b23fad97c4b6b6
parent: c37d25a662aaef7d48e6c4a40315c89a632379d9
author: Jonathan Dowland <jon+github@alcopop.org>
date: Wed Mar 29 13:15:30 EDT 2017

Adjust NES30Pro joypad settings, add FC30 Pro

Adjust the NES30 Pro button mappings to match values from a FC30 Pro
joystick with the latest firmware (v2.00, applies to both models).

Add known_joysticks entries for the FC30 Pro in USB and Bluetooth
modes.

--- a/src/setup/joystick.c
+++ b/src/setup/joystick.c
@@ -326,7 +326,7 @@
     {NULL, 0},
 };
 
-// http://www.8bitdo.com/nes30pro/
+// http://www.8bitdo.com/nes30pro/ and http://www.8bitdo.com/fc30pro/
 static const joystick_config_t nes30_pro_controller[] =
 {
     {"joystick_x_axis",        CREATE_HAT_AXIS(0, HAT_AXIS_HORIZONTAL)},
@@ -333,13 +333,14 @@
     {"joystick_y_axis",        CREATE_HAT_AXIS(0, HAT_AXIS_VERTICAL)},
     {"joyb_fire",              4},  // Y
     {"joyb_speed",             1},  // B
-    {"joyb_jump",              2},  // X
+    {"joyb_jump",              3},  // X
     {"joyb_use",               0},  // A
-    {"joyb_strafeleft",        8},  // L1
-    {"joyb_straferight",       9}, // R1
-    {"joyb_prevweapon",        6},  // L2
-    {"joyb_nextweapon",        7},  // R2
+    {"joyb_strafeleft",        6},  // L1
+    {"joyb_straferight",       7}, // R1
+    {"joyb_prevweapon",        8},  // L2
+    {"joyb_nextweapon",        9},  // R2
     {"joyb_menu_activate",     11}, // Start
+    {"joyb_toggle_automap",    10}, // Select
     {NULL, 0},
 };
 
@@ -453,9 +454,23 @@
     },
 
     // 8Bitdo NES30 Pro, http://www.8bitdo.com/nes30pro/
-    // Probably some of their other controllers can use the same config.
     {
         "8Bitdo NES30 Pro",
+        4, 16, 1,
+        nes30_pro_controller,
+    },
+
+    // 8Bitdo FC30 Pro, http://8bitdo.cn/fc30pro/
+    // variant of the above, connected over USB
+    {
+        "8Bitdo FC30 Pro",
+        4, 15, 1,
+        nes30_pro_controller,
+    },
+
+    // the above, connected over bluetooth
+    {
+        "8Bitdo FC30 Pro",
         4, 16, 1,
         nes30_pro_controller,
     },