GPIO PinXY Assignment in Board Config (#796)

* First initial draft of pin-assignment in board config

* Clean-ups to board configs

* Quick fix on gpioaction

* Pulling main into my gpio pin config branch (#797)

* use if-else block logic instead of switch in jslider debouncer (#793)

I'm not going to say we *understand* why this fixes #790, but it appears
to.

* Adds a "pin viewer" in pin mapping page (#794)

---------

Co-authored-by: Brian S. Stephan <bss@incorporeal.org>
Co-authored-by: Pelsin <ian@vidales.se>

---------

Co-authored-by: Brian S. Stephan <bss@incorporeal.org>
Co-authored-by: Pelsin <ian@vidales.se>
This commit is contained in:
Luke Arntson
2024-01-15 23:45:32 -05:00
committed by GitHub
parent e9124514e2
commit 4bbeebc92e
46 changed files with 752 additions and 865 deletions

View File

@@ -11,26 +11,25 @@
#define BOARD_CONFIG_LABEL "BentoBox"
// Main pin mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define PIN_DPAD_UP 2 // UP | UP | UP | UP | UP | UP |
#define PIN_DPAD_DOWN 12 // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define PIN_DPAD_RIGHT 11 // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define PIN_DPAD_LEFT 13 // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define PIN_BUTTON_B1 3 // B1 | A | B | Cross | 2 | K1 |
#define PIN_BUTTON_B2 4 // B2 | B | A | Circle | 3 | K2 |
#define PIN_BUTTON_R2 5 // R2 | RT | ZR | R2 | 8 | K3 |
#define PIN_BUTTON_L2 6 // L2 | LT | ZL | L2 | 7 | K4 |
#define PIN_BUTTON_B3 10 // B3 | X | Y | Square | 1 | P1 |
#define PIN_BUTTON_B4 9 // B4 | Y | X | Triangle | 4 | P2 |
#define PIN_BUTTON_R1 8 // R1 | RB | R | R1 | 6 | P3 |
#define PIN_BUTTON_L1 7 // L1 | LB | L | L1 | 5 | P4 |
#define PIN_BUTTON_S1 21 // S1 | Back | Minus | Select | 9 | Coin |
#define PIN_BUTTON_S2 22 // S2 | Start | Plus | Start | 10 | Start |
#define PIN_BUTTON_L3 18 // L3 | LS | LS | L3 | 11 | LS |
#define PIN_BUTTON_R3 17 // R3 | RS | RS | R3 | 12 | RS |
#define PIN_BUTTON_A1 20 // A1 | Guide | Home | PS | 13 | ~ |
#define PIN_BUTTON_A2 19 // A2 | ~ | Capture | ~ | 14 | ~ |
#define PIN_BUTTON_FN -1 // Hotkey Function |
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define GPIO_PIN_02 GpioAction::BUTTON_PRESS_UP // UP | UP | UP | UP | UP | UP |
#define GPIO_PIN_12 GpioAction::BUTTON_PRESS_DOWN // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define GPIO_PIN_11 GpioAction::BUTTON_PRESS_RIGHT // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define GPIO_PIN_13 GpioAction::BUTTON_PRESS_LEFT // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define GPIO_PIN_03 GpioAction::BUTTON_PRESS_B1 // B1 | A | B | Cross | 2 | K1 |
#define GPIO_PIN_04 GpioAction::BUTTON_PRESS_B2 // B2 | B | A | Circle | 3 | K2 |
#define GPIO_PIN_05 GpioAction::BUTTON_PRESS_R2 // R2 | RT | ZR | R2 | 8 | K3 |
#define GPIO_PIN_06 GpioAction::BUTTON_PRESS_L2 // L2 | LT | ZL | L2 | 7 | K4 |
#define GPIO_PIN_10 GpioAction::BUTTON_PRESS_B3 // B3 | X | Y | Square | 1 | P1 |
#define GPIO_PIN_09 GpioAction::BUTTON_PRESS_B4 // B4 | Y | X | Triangle | 4 | P2 |
#define GPIO_PIN_08 GpioAction::BUTTON_PRESS_R1 // R1 | RB | R | R1 | 6 | P3 |
#define GPIO_PIN_07 GpioAction::BUTTON_PRESS_L1 // L1 | LB | L | L1 | 5 | P4 |
#define GPIO_PIN_21 GpioAction::BUTTON_PRESS_S1 // S1 | Back | Minus | Select | 9 | Coin |
#define GPIO_PIN_22 GpioAction::BUTTON_PRESS_S2 // S2 | Start | Plus | Start | 10 | Start |
#define GPIO_PIN_18 GpioAction::BUTTON_PRESS_L3 // L3 | LS | LS | L3 | 11 | LS |
#define GPIO_PIN_17 GpioAction::BUTTON_PRESS_R3 // R3 | RS | RS | R3 | 12 | RS |
#define GPIO_PIN_20 GpioAction::BUTTON_PRESS_A1 // A1 | Guide | Home | PS | 13 | ~ |
#define GPIO_PIN_19 GpioAction::BUTTON_PRESS_A2 // A2 | ~ | Capture | ~ | 14 | ~ |
// Keyboard Mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |

View File

@@ -11,26 +11,25 @@
#define BOARD_CONFIG_LABEL "Fightboard V3"
// Main pin mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define PIN_DPAD_UP 29 // UP | UP | UP | UP | UP | UP |
#define PIN_DPAD_DOWN 27 // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define PIN_DPAD_RIGHT 26 // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define PIN_DPAD_LEFT 28 // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define PIN_BUTTON_B1 5 // B1 | A | B | Cross | 2 | K1 |
#define PIN_BUTTON_B2 6 // B2 | B | A | Circle | 3 | K2 |
#define PIN_BUTTON_R2 7 // R2 | RT | ZR | R2 | 8 | K3 |
#define PIN_BUTTON_L2 8 // L2 | LT | ZL | L2 | 7 | K4 |
#define PIN_BUTTON_B3 1 // B3 | X | Y | Square | 1 | P1 |
#define PIN_BUTTON_B4 2 // B4 | Y | X | Triangle | 4 | P2 |
#define PIN_BUTTON_R1 3 // R1 | RB | R | R1 | 6 | P3 |
#define PIN_BUTTON_L1 4 // L1 | LB | L | L1 | 5 | P4 |
#define PIN_BUTTON_S1 10 // S1 | Back | Minus | Select | 9 | Coin |
#define PIN_BUTTON_S2 12 // S2 | Start | Plus | Start | 10 | Start |
#define PIN_BUTTON_L3 9 // L3 | LS | LS | L3 | 11 | LS |
#define PIN_BUTTON_R3 13 // R3 | RS | RS | R3 | 12 | RS |
#define PIN_BUTTON_A1 11 // A1 | Guide | Home | PS | 13 | ~ |
#define PIN_BUTTON_A2 17 // A2 | ~ | Capture | ~ | 14 | ~ |
#define PIN_BUTTON_FN -1 // Hotkey Function |
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define GPIO_PIN_29 GpioAction::BUTTON_PRESS_UP // UP | UP | UP | UP | UP | UP |
#define GPIO_PIN_27 GpioAction::BUTTON_PRESS_DOWN // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define GPIO_PIN_26 GpioAction::BUTTON_PRESS_RIGHT // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define GPIO_PIN_28 GpioAction::BUTTON_PRESS_LEFT // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define GPIO_PIN_05 GpioAction::BUTTON_PRESS_B1 // B1 | A | B | Cross | 2 | K1 |
#define GPIO_PIN_06 GpioAction::BUTTON_PRESS_B2 // B2 | B | A | Circle | 3 | K2 |
#define GPIO_PIN_07 GpioAction::BUTTON_PRESS_R2 // R2 | RT | ZR | R2 | 8 | K3 |
#define GPIO_PIN_08 GpioAction::BUTTON_PRESS_L2 // L2 | LT | ZL | L2 | 7 | K4 |
#define GPIO_PIN_01 GpioAction::BUTTON_PRESS_B3 // B3 | X | Y | Square | 1 | P1 |
#define GPIO_PIN_02 GpioAction::BUTTON_PRESS_B4 // B4 | Y | X | Triangle | 4 | P2 |
#define GPIO_PIN_03 GpioAction::BUTTON_PRESS_R1 // R1 | RB | R | R1 | 6 | P3 |
#define GPIO_PIN_04 GpioAction::BUTTON_PRESS_L1 // L1 | LB | L | L1 | 5 | P4 |
#define GPIO_PIN_10 GpioAction::BUTTON_PRESS_S1 // S1 | Back | Minus | Select | 9 | Coin |
#define GPIO_PIN_12 GpioAction::BUTTON_PRESS_S2 // S2 | Start | Plus | Start | 10 | Start |
#define GPIO_PIN_09 GpioAction::BUTTON_PRESS_L3 // L3 | LS | LS | L3 | 11 | LS |
#define GPIO_PIN_13 GpioAction::BUTTON_PRESS_R3 // R3 | RS | RS | R3 | 12 | RS |
#define GPIO_PIN_11 GpioAction::BUTTON_PRESS_A1 // A1 | Guide | Home | PS | 13 | ~ |
#define GPIO_PIN_17 GpioAction::BUTTON_PRESS_A2 // A2 | ~ | Capture | ~ | 14 | ~ |
// Keyboard Mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |

View File

@@ -11,26 +11,25 @@
#define BOARD_CONFIG_LABEL "Fightboard V3 Mirrored"
// Main pin mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define PIN_DPAD_UP 0 // UP | UP | UP | UP | UP | UP |
#define PIN_DPAD_DOWN 2 // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define PIN_DPAD_RIGHT 3 // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define PIN_DPAD_LEFT 1 // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define PIN_BUTTON_B1 9 // B1 | A | B | Cross | 2 | K1 |
#define PIN_BUTTON_B2 12 // B2 | B | A | Circle | 3 | K2 |
#define PIN_BUTTON_R2 13 // R2 | RT | ZR | R2 | 8 | K3 |
#define PIN_BUTTON_L2 14 // L2 | LT | ZL | L2 | 7 | K4 |
#define PIN_BUTTON_B3 15 // B3 | X | Y | Square | 1 | P1 |
#define PIN_BUTTON_B4 28 // B4 | Y | X | Triangle | 4 | P2 |
#define PIN_BUTTON_R1 27 // R1 | RB | R | R1 | 6 | P3 |
#define PIN_BUTTON_L1 26 // L1 | LB | L | L1 | 5 | P4 |
#define PIN_BUTTON_S1 7 // S1 | Back | Minus | Select | 9 | Coin |
#define PIN_BUTTON_S2 5 // S2 | Start | Plus | Start | 10 | Start |
#define PIN_BUTTON_L3 8 // L3 | LS | LS | L3 | 11 | LS |
#define PIN_BUTTON_R3 4 // R3 | RS | RS | R3 | 12 | RS |
#define PIN_BUTTON_A1 6 // A1 | Guide | Home | PS | 13 | ~ |
#define PIN_BUTTON_A2 17 // A2 | ~ | Capture | ~ | 14 | ~ |
#define PIN_BUTTON_FN -1 // Hotkey Function |
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define GPIO_PIN_00 GpioAction::BUTTON_PRESS_UP // UP | UP | UP | UP | UP | UP |
#define GPIO_PIN_02 GpioAction::BUTTON_PRESS_DOWN // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define GPIO_PIN_03 GpioAction::BUTTON_PRESS_RIGHT // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define GPIO_PIN_01 GpioAction::BUTTON_PRESS_LEFT // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define GPIO_PIN_09 GpioAction::BUTTON_PRESS_B1 // B1 | A | B | Cross | 2 | K1 |
#define GPIO_PIN_12 GpioAction::BUTTON_PRESS_B2 // B2 | B | A | Circle | 3 | K2 |
#define GPIO_PIN_13 GpioAction::BUTTON_PRESS_R2 // R2 | RT | ZR | R2 | 8 | K3 |
#define GPIO_PIN_14 GpioAction::BUTTON_PRESS_L2 // L2 | LT | ZL | L2 | 7 | K4 |
#define GPIO_PIN_15 GpioAction::BUTTON_PRESS_B3 // B3 | X | Y | Square | 1 | P1 |
#define GPIO_PIN_28 GpioAction::BUTTON_PRESS_B4 // B4 | Y | X | Triangle | 4 | P2 |
#define GPIO_PIN_27 GpioAction::BUTTON_PRESS_R1 // R1 | RB | R | R1 | 6 | P3 |
#define GPIO_PIN_26 GpioAction::BUTTON_PRESS_L1 // L1 | LB | L | L1 | 5 | P4 |
#define GPIO_PIN_07 GpioAction::BUTTON_PRESS_S1 // S1 | Back | Minus | Select | 9 | Coin |
#define GPIO_PIN_05 GpioAction::BUTTON_PRESS_S2 // S2 | Start | Plus | Start | 10 | Start |
#define GPIO_PIN_08 GpioAction::BUTTON_PRESS_L3 // L3 | LS | LS | L3 | 11 | LS |
#define GPIO_PIN_04 GpioAction::BUTTON_PRESS_R3 // R3 | RS | RS | R3 | 12 | RS |
#define GPIO_PIN_06 GpioAction::BUTTON_PRESS_A1 // A1 | Guide | Home | PS | 13 | ~ |
#define GPIO_PIN_17 GpioAction::BUTTON_PRESS_A2 // A2 | ~ | Capture | ~ | 14 | ~ |
// Keyboard Mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |

View File

@@ -12,26 +12,25 @@
// Main pin mapping Configuration
// Mapping between Flatbox Rev4 switch number (as silkscreened) and GPIO pin listed under "Flatbox Rev4 SW#"
// // Flatbox Rev4 SW# | GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define PIN_DPAD_UP 16 // SW18 | UP | UP | UP | UP | UP | UP |
#define PIN_DPAD_DOWN 10 // SW8 | DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define PIN_DPAD_RIGHT 11 // SW9 | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define PIN_DPAD_LEFT 9 // SW7 | LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define PIN_BUTTON_B1 19 // SW14 | B1 | A | B | Cross | 2 | K1 |
#define PIN_BUTTON_B2 24 // SW15 | B2 | B | A | Circle | 3 | K2 |
#define PIN_BUTTON_R2 26 // SW16 | R2 | RT | ZR | R2 | 8 | K3 |
#define PIN_BUTTON_L2 28 // SW17 | L2 | LT | ZL | L2 | 7 | K4 |
#define PIN_BUTTON_B3 18 // SW10 | B3 | X | Y | Square | 1 | P1 |
#define PIN_BUTTON_B4 25 // SW11 | B4 | Y | X | Triangle | 4 | P2 |
#define PIN_BUTTON_R1 27 // SW12 | R1 | RB | R | R1 | 6 | P3 |
#define PIN_BUTTON_L1 29 // SW13 | L1 | LB | L | L1 | 5 | P4 |
#define PIN_BUTTON_S1 5 // SW2 | S1 | Back | Minus | Select | 9 | Coin |
#define PIN_BUTTON_S2 6 // SW1 | S2 | Start | Plus | Start | 10 | Start |
#define PIN_BUTTON_L3 2 // SW5 | L3 | LS | LS | L3 | 11 | LS |
#define PIN_BUTTON_R3 1 // SW6 | R3 | RS | RS | R3 | 12 | RS |
#define PIN_BUTTON_A1 4 // SW3 | A1 | Guide | Home | PS | 13 | ~ |
#define PIN_BUTTON_A2 3 // SW4 | A2 | ~ | Capture | ~ | 14 | ~ |
#define PIN_BUTTON_FN -1 // Hotkey Function |
// // Flatbox Rev4 SW# | GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define GPIO_PIN_16 GpioAction::BUTTON_PRESS_UP // UP | UP | UP | UP | UP | UP |
#define GPIO_PIN_10 GpioAction::BUTTON_PRESS_DOWN // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define GPIO_PIN_11 GpioAction::BUTTON_PRESS_RIGHT // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define GPIO_PIN_09 GpioAction::BUTTON_PRESS_LEFT // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define GPIO_PIN_19 GpioAction::BUTTON_PRESS_B1 // B1 | A | B | Cross | 2 | K1 |
#define GPIO_PIN_24 GpioAction::BUTTON_PRESS_B2 // B2 | B | A | Circle | 3 | K2 |
#define GPIO_PIN_26 GpioAction::BUTTON_PRESS_R2 // R2 | RT | ZR | R2 | 8 | K3 |
#define GPIO_PIN_28 GpioAction::BUTTON_PRESS_L2 // L2 | LT | ZL | L2 | 7 | K4 |
#define GPIO_PIN_18 GpioAction::BUTTON_PRESS_B3 // B3 | X | Y | Square | 1 | P1 |
#define GPIO_PIN_25 GpioAction::BUTTON_PRESS_B4 // B4 | Y | X | Triangle | 4 | P2 |
#define GPIO_PIN_27 GpioAction::BUTTON_PRESS_R1 // R1 | RB | R | R1 | 6 | P3 |
#define GPIO_PIN_29 GpioAction::BUTTON_PRESS_L1 // L1 | LB | L | L1 | 5 | P4 |
#define GPIO_PIN_05 GpioAction::BUTTON_PRESS_S1 // S1 | Back | Minus | Select | 9 | Coin |
#define GPIO_PIN_06 GpioAction::BUTTON_PRESS_S2 // S2 | Start | Plus | Start | 10 | Start |
#define GPIO_PIN_02 GpioAction::BUTTON_PRESS_L3 // L3 | LS | LS | L3 | 11 | LS |
#define GPIO_PIN_01 GpioAction::BUTTON_PRESS_R3 // R3 | RS | RS | R3 | 12 | RS |
#define GPIO_PIN_04 GpioAction::BUTTON_PRESS_A1 // A1 | Guide | Home | PS | 13 | ~ |
#define GPIO_PIN_03 GpioAction::BUTTON_PRESS_A2 // A2 | ~ | Capture | ~ | 14 | ~ |
// Keyboard Mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |

View File

@@ -12,26 +12,25 @@
// Main pin mapping Configuration
// Mapping between Flatbox Rev4 switch number (as silkscreened) and GPIO pin listed under "Flatbox Rev4 SW#"
// // Flatbox Rev4 SW# | GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define PIN_DPAD_UP 10 // SW18 | UP | UP | UP | UP | UP | UP |
#define PIN_DPAD_DOWN 12 // SW8 | DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define PIN_DPAD_RIGHT 11 // SW9 | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define PIN_DPAD_LEFT 13 // SW7 | LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define PIN_BUTTON_B1 9 // SW14 | B1 | A | B | Cross | 2 | K1 |
#define PIN_BUTTON_B2 7 // SW15 | B2 | B | A | Circle | 3 | K2 |
#define PIN_BUTTON_R2 5 // SW16 | R2 | RT | ZR | R2 | 8 | K3 |
#define PIN_BUTTON_L2 3 // SW17 | L2 | LT | ZL | L2 | 7 | K4 |
#define PIN_BUTTON_B3 8 // SW10 | B3 | X | Y | Square | 1 | P1 |
#define PIN_BUTTON_B4 6 // SW11 | B4 | Y | X | Triangle | 4 | P2 |
#define PIN_BUTTON_R1 4 // SW12 | R1 | RB | R | R1 | 6 | P3 |
#define PIN_BUTTON_L1 2 // SW13 | L1 | LB | L | L1 | 5 | P4 |
#define PIN_BUTTON_S1 15 // SW2 | S1 | Back | Minus | Select | 9 | Coin |
#define PIN_BUTTON_S2 14 // SW1 | S2 | Start | Plus | Start | 10 | Start |
#define PIN_BUTTON_L3 28 // SW5 | L3 | LS | LS | L3 | 11 | LS |
#define PIN_BUTTON_R3 29 // SW6 | R3 | RS | RS | R3 | 12 | RS |
#define PIN_BUTTON_A1 26 // SW3 | A1 | Guide | Home | PS | 13 | ~ |
#define PIN_BUTTON_A2 27 // SW4 | A2 | ~ | Capture | ~ | 14 | ~ |
#define PIN_BUTTON_FN -1 // Hotkey Function |
// // Flatbox Rev5 SW# | GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define GPIO_PIN_10 GpioAction::BUTTON_PRESS_UP // UP | UP | UP | UP | UP | UP |
#define GPIO_PIN_12 GpioAction::BUTTON_PRESS_DOWN // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define GPIO_PIN_11 GpioAction::BUTTON_PRESS_RIGHT // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define GPIO_PIN_13 GpioAction::BUTTON_PRESS_LEFT // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define GPIO_PIN_09 GpioAction::BUTTON_PRESS_B1 // B1 | A | B | Cross | 2 | K1 |
#define GPIO_PIN_07 GpioAction::BUTTON_PRESS_B2 // B2 | B | A | Circle | 3 | K2 |
#define GPIO_PIN_05 GpioAction::BUTTON_PRESS_R2 // R2 | RT | ZR | R2 | 8 | K3 |
#define GPIO_PIN_03 GpioAction::BUTTON_PRESS_L2 // L2 | LT | ZL | L2 | 7 | K4 |
#define GPIO_PIN_08 GpioAction::BUTTON_PRESS_B3 // B3 | X | Y | Square | 1 | P1 |
#define GPIO_PIN_06 GpioAction::BUTTON_PRESS_B4 // B4 | Y | X | Triangle | 4 | P2 |
#define GPIO_PIN_04 GpioAction::BUTTON_PRESS_R1 // R1 | RB | R | R1 | 6 | P3 |
#define GPIO_PIN_02 GpioAction::BUTTON_PRESS_L1 // L1 | LB | L | L1 | 5 | P4 |
#define GPIO_PIN_15 GpioAction::BUTTON_PRESS_S1 // S1 | Back | Minus | Select | 9 | Coin |
#define GPIO_PIN_14 GpioAction::BUTTON_PRESS_S2 // S2 | Start | Plus | Start | 10 | Start |
#define GPIO_PIN_28 GpioAction::BUTTON_PRESS_L3 // L3 | LS | LS | L3 | 11 | LS |
#define GPIO_PIN_29 GpioAction::BUTTON_PRESS_R3 // R3 | RS | RS | R3 | 12 | RS |
#define GPIO_PIN_26 GpioAction::BUTTON_PRESS_A1 // A1 | Guide | Home | PS | 13 | ~ |
#define GPIO_PIN_27 GpioAction::BUTTON_PRESS_A2 // A2 | ~ | Capture | ~ | 14 | ~ |
// Keyboard Mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |

View File

@@ -12,26 +12,25 @@
// Main pin mapping Configuration
// Mapping between Flatbox Rev4 switch number (as silkscreened) and GPIO pin listed under "Flatbox Rev4 SW#"
// // Flatbox Rev4 SW# | GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define PIN_DPAD_UP 10 // SW18 | UP | UP | UP | UP | UP | UP |
#define PIN_DPAD_DOWN 12 // SW8 | DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define PIN_DPAD_RIGHT 11 // SW9 | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define PIN_DPAD_LEFT 13 // SW7 | LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define PIN_BUTTON_B1 9 // SW14 | B1 | A | B | Cross | 2 | K1 |
#define PIN_BUTTON_B2 7 // SW15 | B2 | B | A | Circle | 3 | K2 |
#define PIN_BUTTON_R2 5 // SW16 | R2 | RT | ZR | R2 | 8 | K3 |
#define PIN_BUTTON_L2 3 // SW17 | L2 | LT | ZL | L2 | 7 | K4 |
#define PIN_BUTTON_B3 8 // SW10 | B3 | X | Y | Square | 1 | P1 |
#define PIN_BUTTON_B4 6 // SW11 | B4 | Y | X | Triangle | 4 | P2 |
#define PIN_BUTTON_R1 4 // SW12 | R1 | RB | R | R1 | 6 | P3 |
#define PIN_BUTTON_L1 2 // SW13 | L1 | LB | L | L1 | 5 | P4 |
#define PIN_BUTTON_S1 15 // SW2 | S1 | Back | Minus | Select | 9 | Coin |
#define PIN_BUTTON_S2 14 // SW1 | S2 | Start | Plus | Start | 10 | Start |
#define PIN_BUTTON_L3 28 // SW5 | L3 | LS | LS | L3 | 11 | LS |
#define PIN_BUTTON_R3 29 // SW6 | R3 | RS | RS | R3 | 12 | RS |
#define PIN_BUTTON_A1 26 // SW3 | A1 | Guide | Home | PS | 13 | ~ |
#define PIN_BUTTON_A2 27 // SW4 | A2 | ~ | Capture | ~ | 14 | ~ |
#define PIN_BUTTON_FN -1 // Hotkey Function |
// // Flatbox Rev5 SW# | GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define GPIO_PIN_10 GpioAction::BUTTON_PRESS_UP // UP | UP | UP | UP | UP | UP |
#define GPIO_PIN_12 GpioAction::BUTTON_PRESS_DOWN // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define GPIO_PIN_11 GpioAction::BUTTON_PRESS_RIGHT // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define GPIO_PIN_13 GpioAction::BUTTON_PRESS_LEFT // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define GPIO_PIN_09 GpioAction::BUTTON_PRESS_B1 // B1 | A | B | Cross | 2 | K1 |
#define GPIO_PIN_07 GpioAction::BUTTON_PRESS_B2 // B2 | B | A | Circle | 3 | K2 |
#define GPIO_PIN_05 GpioAction::BUTTON_PRESS_R2 // R2 | RT | ZR | R2 | 8 | K3 |
#define GPIO_PIN_03 GpioAction::BUTTON_PRESS_L2 // L2 | LT | ZL | L2 | 7 | K4 |
#define GPIO_PIN_08 GpioAction::BUTTON_PRESS_B3 // B3 | X | Y | Square | 1 | P1 |
#define GPIO_PIN_06 GpioAction::BUTTON_PRESS_B4 // B4 | Y | X | Triangle | 4 | P2 |
#define GPIO_PIN_04 GpioAction::BUTTON_PRESS_R1 // R1 | RB | R | R1 | 6 | P3 |
#define GPIO_PIN_02 GpioAction::BUTTON_PRESS_L1 // L1 | LB | L | L1 | 5 | P4 |
#define GPIO_PIN_15 GpioAction::BUTTON_PRESS_S1 // S1 | Back | Minus | Select | 9 | Coin |
#define GPIO_PIN_14 GpioAction::BUTTON_PRESS_S2 // S2 | Start | Plus | Start | 10 | Start |
#define GPIO_PIN_28 GpioAction::BUTTON_PRESS_L3 // L3 | LS | LS | L3 | 11 | LS |
#define GPIO_PIN_29 GpioAction::BUTTON_PRESS_R3 // R3 | RS | RS | R3 | 12 | RS |
#define GPIO_PIN_26 GpioAction::BUTTON_PRESS_A1 // A1 | Guide | Home | PS | 13 | ~ |
#define GPIO_PIN_27 GpioAction::BUTTON_PRESS_A2 // A2 | ~ | Capture | ~ | 14 | ~ |
// Keyboard Mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |

View File

@@ -12,26 +12,25 @@
// Main pin mapping Configuration
// Mapping between Flatbox Rev4 switch number (as silkscreened) and GPIO pin listed under "Flatbox Rev4 SW#"
// // Flatbox Rev4 SW# | GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define PIN_DPAD_UP 10 // SW18 | UP | UP | UP | UP | UP | UP |
#define PIN_DPAD_DOWN 12 // SW8 | DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define PIN_DPAD_RIGHT 11 // SW9 | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define PIN_DPAD_LEFT 13 // SW7 | LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define PIN_BUTTON_B1 9 // SW14 | B1 | A | B | Cross | 2 | K1 |
#define PIN_BUTTON_B2 15 // SW15 | B2 | B | A | Circle | 3 | K2 |
#define PIN_BUTTON_R2 27 // SW16 | R2 | RT | ZR | R2 | 8 | K3 |
#define PIN_BUTTON_L2 14 // SW17 | L2 | LT | ZL | L2 | 7 | K4 |
#define PIN_BUTTON_B3 8 // SW10 | B3 | X | Y | Square | 1 | P1 |
#define PIN_BUTTON_B4 26 // SW11 | B4 | Y | X | Triangle | 4 | P2 |
#define PIN_BUTTON_R1 28 // SW12 | R1 | RB | R | R1 | 6 | P3 |
#define PIN_BUTTON_L1 29 // SW13 | L1 | LB | L | L1 | 5 | P4 |
#define PIN_BUTTON_S1 3 // SW2 | S1 | Back | Minus | Select | 9 | Coin |
#define PIN_BUTTON_S2 4 // SW1 | S2 | Start | Plus | Start | 10 | Start |
#define PIN_BUTTON_L3 6 // SW5 | L3 | LS | LS | L3 | 11 | LS |
#define PIN_BUTTON_R3 7 // SW6 | R3 | RS | RS | R3 | 12 | RS |
#define PIN_BUTTON_A1 2 // SW3 | A1 | Guide | Home | PS | 13 | ~ |
#define PIN_BUTTON_A2 5 // SW4 | A2 | ~ | Capture | ~ | 14 | ~ |
#define PIN_BUTTON_FN -1 // Hotkey Function |
// // Flatbox Rev5 SW# | GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define GPIO_PIN_10 GpioAction::BUTTON_PRESS_UP // UP | UP | UP | UP | UP | UP |
#define GPIO_PIN_12 GpioAction::BUTTON_PRESS_DOWN // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define GPIO_PIN_11 GpioAction::BUTTON_PRESS_RIGHT // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define GPIO_PIN_13 GpioAction::BUTTON_PRESS_LEFT // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define GPIO_PIN_09 GpioAction::BUTTON_PRESS_B1 // B1 | A | B | Cross | 2 | K1 |
#define GPIO_PIN_15 GpioAction::BUTTON_PRESS_B2 // B2 | B | A | Circle | 3 | K2 |
#define GPIO_PIN_27 GpioAction::BUTTON_PRESS_R2 // R2 | RT | ZR | R2 | 8 | K3 |
#define GPIO_PIN_14 GpioAction::BUTTON_PRESS_L2 // L2 | LT | ZL | L2 | 7 | K4 |
#define GPIO_PIN_08 GpioAction::BUTTON_PRESS_B3 // B3 | X | Y | Square | 1 | P1 |
#define GPIO_PIN_26 GpioAction::BUTTON_PRESS_B4 // B4 | Y | X | Triangle | 4 | P2 |
#define GPIO_PIN_28 GpioAction::BUTTON_PRESS_R1 // R1 | RB | R | R1 | 6 | P3 |
#define GPIO_PIN_29 GpioAction::BUTTON_PRESS_L1 // L1 | LB | L | L1 | 5 | P4 |
#define GPIO_PIN_03 GpioAction::BUTTON_PRESS_S1 // S1 | Back | Minus | Select | 9 | Coin |
#define GPIO_PIN_04 GpioAction::BUTTON_PRESS_S2 // S2 | Start | Plus | Start | 10 | Start |
#define GPIO_PIN_06 GpioAction::BUTTON_PRESS_L3 // L3 | LS | LS | L3 | 11 | LS |
#define GPIO_PIN_07 GpioAction::BUTTON_PRESS_R3 // R3 | RS | RS | R3 | 12 | RS |
#define GPIO_PIN_02 GpioAction::BUTTON_PRESS_A1 // A1 | Guide | Home | PS | 13 | ~ |
#define GPIO_PIN_05 GpioAction::BUTTON_PRESS_A2 // A2 | ~ | Capture | ~ | 14 | ~ |
// Keyboard Mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |

View File

@@ -12,25 +12,24 @@
// Main pin mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define PIN_DPAD_UP 2 // UP | UP | UP | UP | UP | UP |
#define PIN_DPAD_DOWN 3 // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define PIN_DPAD_RIGHT 4 // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define PIN_DPAD_LEFT 5 // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define PIN_BUTTON_B1 6 // B1 | A | B | Cross | 2 | K1 |
#define PIN_BUTTON_B2 7 // B2 | B | A | Circle | 3 | K2 |
#define PIN_BUTTON_R2 8 // R2 | RT | ZR | R2 | 8 | K3 |
#define PIN_BUTTON_L2 9 // L2 | LT | ZL | L2 | 7 | K4 |
#define PIN_BUTTON_B3 10 // B3 | X | Y | Square | 1 | P1 |
#define PIN_BUTTON_B4 11 // B4 | Y | X | Triangle | 4 | P2 |
#define PIN_BUTTON_R1 12 // R1 | RB | R | R1 | 6 | P3 |
#define PIN_BUTTON_L1 13 // L1 | LB | L | L1 | 5 | P4 |
#define PIN_BUTTON_S1 16 // S1 | Back | Minus | Select | 9 | Coin |
#define PIN_BUTTON_S2 17 // S2 | Start | Plus | Start | 10 | Start |
#define PIN_BUTTON_L3 18 // L3 | LS | LS | L3 | 11 | LS |
#define PIN_BUTTON_R3 19 // R3 | RS | RS | R3 | 12 | RS |
#define PIN_BUTTON_A1 20 // A1 | Guide | Home | PS | 13 | ~ |
#define PIN_BUTTON_A2 21 // A2 | ~ | Capture | ~ | 14 | ~ |
#define PIN_BUTTON_FN -1 // Hotkey Function |
#define GPIO_PIN_02 GpioAction::BUTTON_PRESS_UP // UP | UP | UP | UP | UP | UP |
#define GPIO_PIN_03 GpioAction::BUTTON_PRESS_DOWN // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define GPIO_PIN_04 GpioAction::BUTTON_PRESS_RIGHT // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define GPIO_PIN_05 GpioAction::BUTTON_PRESS_LEFT // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define GPIO_PIN_06 GpioAction::BUTTON_PRESS_B1 // B1 | A | B | Cross | 2 | K1 |
#define GPIO_PIN_07 GpioAction::BUTTON_PRESS_B2 // B2 | B | A | Circle | 3 | K2 |
#define GPIO_PIN_08 GpioAction::BUTTON_PRESS_R2 // R2 | RT | ZR | R2 | 8 | K3 |
#define GPIO_PIN_09 GpioAction::BUTTON_PRESS_L2 // L2 | LT | ZL | L2 | 7 | K4 |
#define GPIO_PIN_10 GpioAction::BUTTON_PRESS_B3 // B3 | X | Y | Square | 1 | P1 |
#define GPIO_PIN_11 GpioAction::BUTTON_PRESS_B4 // B4 | Y | X | Triangle | 4 | P2 |
#define GPIO_PIN_12 GpioAction::BUTTON_PRESS_R1 // R1 | RB | R | R1 | 6 | P3 |
#define GPIO_PIN_13 GpioAction::BUTTON_PRESS_L1 // L1 | LB | L | L1 | 5 | P4 |
#define GPIO_PIN_16 GpioAction::BUTTON_PRESS_S1 // S1 | Back | Minus | Select | 9 | Coin |
#define GPIO_PIN_17 GpioAction::BUTTON_PRESS_S2 // S2 | Start | Plus | Start | 10 | Start |
#define GPIO_PIN_18 GpioAction::BUTTON_PRESS_L3 // L3 | LS | LS | L3 | 11 | LS |
#define GPIO_PIN_19 GpioAction::BUTTON_PRESS_R3 // R3 | RS | RS | R3 | 12 | RS |
#define GPIO_PIN_20 GpioAction::BUTTON_PRESS_A1 // A1 | Guide | Home | PS | 13 | ~ |
#define GPIO_PIN_21 GpioAction::BUTTON_PRESS_A2 // A2 | ~ | Capture | ~ | 14 | ~ |
// Keyboard Mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
@@ -57,7 +56,7 @@
#define DEFAULT_INPUT_MODE_R1 INPUT_MODE_XBONE
#define TURBO_ENABLED 1
#define PIN_BUTTON_TURBO 14
#define GPIO_PIN_14 GpioAction::BUTTON_PRESS_TURBO
#define BOARD_LEDS_PIN 28
#define LED_BRIGHTNESS_MAXIMUM 100
@@ -89,13 +88,9 @@
#define BUTTON_LAYOUT_RIGHT BUTTON_LAYOUT_STICKLESSB
#define SPLASH_MODE SPLASH_MODE_STATIC
#define DUAL_DIRECTIONAL_ENABLED 1
#define PIN_DUAL_DIRECTIONAL_UP 27
#define DUAL_DIRECTIONAL_STICK_MODE DPAD_MODE_DIGITAL
#define DUAL_DIRECTIONAL_COMBINE_MODE DUAL_COMBINE_MODE_MIXED
#define EXTRA_BUTTON_MASK GAMEPAD_MASK_L3
#define EXTRA_BUTTON_PIN 26
// Additional Button Support
#define GPIO_PIN_27 GpioAction::BUTTON_PRESS_UP
#define GPIO_PIN_26 GpioAction::BUTTON_PRESS_L3
#define USB_PERIPHERAL_ENABLED 1
#define USB_PERIPHERAL_PIN_DPLUS 23

View File

@@ -10,26 +10,25 @@
#define BOARD_CONFIG_LABEL "KB2040"
// Main pin mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define PIN_DPAD_UP 27 // UP | UP | UP | UP | UP | UP |
#define PIN_DPAD_DOWN 29 // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define PIN_DPAD_RIGHT 28 // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define PIN_DPAD_LEFT 26 // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define PIN_BUTTON_B1 3 // B1 | A | B | Cross | 2 | K1 |
#define PIN_BUTTON_B2 2 // B2 | B | A | Circle | 3 | K2 |
#define PIN_BUTTON_R2 8 // R2 | RT | ZR | R2 | 8 | K3 |
#define PIN_BUTTON_L2 9 // L2 | LT | ZL | L2 | 7 | K4 |
#define PIN_BUTTON_B3 5 // B3 | X | Y | Square | 1 | P1 |
#define PIN_BUTTON_B4 4 // B4 | Y | X | Triangle | 4 | P2 |
#define PIN_BUTTON_R1 10 // R1 | RB | R | R1 | 6 | P3 |
#define PIN_BUTTON_L1 19 // L1 | LB | L | L1 | 5 | P4 |
#define PIN_BUTTON_S1 20 // S1 | Back | Minus | Select | 9 | Coin |
#define PIN_BUTTON_S2 18 // S2 | Start | Plus | Start | 10 | Start |
#define PIN_BUTTON_L3 13 // L3 | LS | LS | L3 | 11 | LS |
#define PIN_BUTTON_R3 12 // R3 | RS | RS | R3 | 12 | RS |
#define PIN_BUTTON_A1 0 // A1 | Guide | Home | PS | 13 | ~ |
#define PIN_BUTTON_A2 1 // A2 | ~ | Capture | ~ | 14 | ~ |
#define PIN_BUTTON_FN -1 // Hotkey Function |
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define GPIO_PIN_27 GpioAction::BUTTON_PRESS_UP // UP | UP | UP | UP | UP | UP |
#define GPIO_PIN_29 GpioAction::BUTTON_PRESS_DOWN // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define GPIO_PIN_28 GpioAction::BUTTON_PRESS_RIGHT // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define GPIO_PIN_26 GpioAction::BUTTON_PRESS_LEFT // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define GPIO_PIN_03 GpioAction::BUTTON_PRESS_B1 // B1 | A | B | Cross | 2 | K1 |
#define GPIO_PIN_02 GpioAction::BUTTON_PRESS_B2 // B2 | B | A | Circle | 3 | K2 |
#define GPIO_PIN_08 GpioAction::BUTTON_PRESS_R2 // R2 | RT | ZR | R2 | 8 | K3 |
#define GPIO_PIN_09 GpioAction::BUTTON_PRESS_L2 // L2 | LT | ZL | L2 | 7 | K4 |
#define GPIO_PIN_05 GpioAction::BUTTON_PRESS_B3 // B3 | X | Y | Square | 1 | P1 |
#define GPIO_PIN_04 GpioAction::BUTTON_PRESS_B4 // B4 | Y | X | Triangle | 4 | P2 |
#define GPIO_PIN_10 GpioAction::BUTTON_PRESS_R1 // R1 | RB | R | R1 | 6 | P3 |
#define GPIO_PIN_19 GpioAction::BUTTON_PRESS_L1 // L1 | LB | L | L1 | 5 | P4 |
#define GPIO_PIN_20 GpioAction::BUTTON_PRESS_S1 // S1 | Back | Minus | Select | 9 | Coin |
#define GPIO_PIN_18 GpioAction::BUTTON_PRESS_S2 // S2 | Start | Plus | Start | 10 | Start |
#define GPIO_PIN_13 GpioAction::BUTTON_PRESS_L3 // L3 | LS | LS | L3 | 11 | LS |
#define GPIO_PIN_12 GpioAction::BUTTON_PRESS_R3 // R3 | RS | RS | R3 | 12 | RS |
#define GPIO_PIN_00 GpioAction::BUTTON_PRESS_A1 // A1 | Guide | Home | PS | 13 | ~ |
#define GPIO_PIN_01 GpioAction::BUTTON_PRESS_A2 // A2 | ~ | Capture | ~ | 14 | ~ |
// Keyboard Mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |

View File

@@ -12,25 +12,24 @@
// Main pin mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define PIN_DPAD_UP 2 // UP | UP | UP | UP | UP | UP |
#define PIN_DPAD_DOWN 3 // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define PIN_DPAD_RIGHT 4 // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define PIN_DPAD_LEFT 5 // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define PIN_BUTTON_B1 6 // B1 | A | B | Cross | 2 | K1 |
#define PIN_BUTTON_B2 7 // B2 | B | A | Circle | 3 | K2 |
#define PIN_BUTTON_R2 8 // R2 | RT | ZR | R2 | 8 | K3 |
#define PIN_BUTTON_L2 9 // L2 | LT | ZL | L2 | 7 | K4 |
#define PIN_BUTTON_B3 10 // B3 | X | Y | Square | 1 | P1 |
#define PIN_BUTTON_B4 11 // B4 | Y | X | Triangle | 4 | P2 |
#define PIN_BUTTON_R1 12 // R1 | RB | R | R1 | 6 | P3 |
#define PIN_BUTTON_L1 13 // L1 | LB | L | L1 | 5 | P4 |
#define PIN_BUTTON_S1 0 // S1 | Back | Minus | Select | 9 | Coin |
#define PIN_BUTTON_S2 1 // S2 | Start | Plus | Start | 10 | Start |
#define PIN_BUTTON_L3 26 // L3 | LS | LS | L3 | 11 | LS |
#define PIN_BUTTON_R3 27 // R3 | RS | RS | R3 | 12 | RS |
#define PIN_BUTTON_A1 14 // A1 | Guide | Home | PS | 13 | ~ |
#define PIN_BUTTON_A2 15 // A2 | ~ | Capture | ~ | 14 | ~ |
#define PIN_BUTTON_FN -1 // Hotkey Function
#define GPIO_PIN_02 GpioAction::BUTTON_PRESS_UP // UP | UP | UP | UP | UP | UP |
#define GPIO_PIN_03 GpioAction::BUTTON_PRESS_DOWN // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define GPIO_PIN_04 GpioAction::BUTTON_PRESS_RIGHT // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define GPIO_PIN_05 GpioAction::BUTTON_PRESS_LEFT // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define GPIO_PIN_06 GpioAction::BUTTON_PRESS_B1 // B1 | A | B | Cross | 2 | K1 |
#define GPIO_PIN_07 GpioAction::BUTTON_PRESS_B2 // B2 | B | A | Circle | 3 | K2 |
#define GPIO_PIN_08 GpioAction::BUTTON_PRESS_R2 // R2 | RT | ZR | R2 | 8 | K3 |
#define GPIO_PIN_09 GpioAction::BUTTON_PRESS_L2 // L2 | LT | ZL | L2 | 7 | K4 |
#define GPIO_PIN_10 GpioAction::BUTTON_PRESS_B3 // B3 | X | Y | Square | 1 | P1 |
#define GPIO_PIN_11 GpioAction::BUTTON_PRESS_B4 // B4 | Y | X | Triangle | 4 | P2 |
#define GPIO_PIN_12 GpioAction::BUTTON_PRESS_R1 // R1 | RB | R | R1 | 6 | P3 |
#define GPIO_PIN_13 GpioAction::BUTTON_PRESS_L1 // L1 | LB | L | L1 | 5 | P4 |
#define GPIO_PIN_00 GpioAction::BUTTON_PRESS_S1 // S1 | Back | Minus | Select | 9 | Coin |
#define GPIO_PIN_01 GpioAction::BUTTON_PRESS_S2 // S2 | Start | Plus | Start | 10 | Start |
#define GPIO_PIN_26 GpioAction::BUTTON_PRESS_L3 // L3 | LS | LS | L3 | 11 | LS |
#define GPIO_PIN_27 GpioAction::BUTTON_PRESS_R3 // R3 | RS | RS | R3 | 12 | RS |
#define GPIO_PIN_14 GpioAction::BUTTON_PRESS_A1 // A1 | Guide | Home | PS | 13 | ~ |
#define GPIO_PIN_15 GpioAction::BUTTON_PRESS_A2 // A2 | ~ | Capture | ~ | 14 | ~ |
// Keyboard Mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |

View File

@@ -6,26 +6,25 @@
#define BOARD_CONFIG_LABEL "Liatris"
// Main pin mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define PIN_DPAD_UP 26 // UP | UP | UP | UP | UP | UP |
#define PIN_DPAD_DOWN 27 // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define PIN_DPAD_RIGHT 29 // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define PIN_DPAD_LEFT 28 // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define PIN_BUTTON_B1 3 // B1 | A | B | Cross | 2 | K1 |
#define PIN_BUTTON_B2 2 // B2 | B | A | Circle | 3 | K2 |
#define PIN_BUTTON_R2 21 // R2 | RT | ZR | R2 | 8 | K3 |
#define PIN_BUTTON_L2 6 // L2 | LT | ZL | L2 | 7 | K4 |
#define PIN_BUTTON_B3 0 // B3 | X | Y | Square | 1 | P1 |
#define PIN_BUTTON_B4 1 // B4 | Y | X | Triangle | 4 | P2 |
#define PIN_BUTTON_R1 22 // R1 | RB | R | R1 | 6 | P3 |
#define PIN_BUTTON_L1 4 // L1 | LB | L | L1 | 5 | P4 |
#define PIN_BUTTON_S1 23 // S1 | Back | Minus | Select | 9 | Coin |
#define PIN_BUTTON_S2 20 // S2 | Start | Plus | Start | 10 | Start |
#define PIN_BUTTON_L3 15 // L3 | LS | LS | L3 | 11 | LS |
#define PIN_BUTTON_R3 16 // R3 | RS | RS | R3 | 12 | RS |
#define PIN_BUTTON_A1 7 // A1 | Guide | Home | PS | 13 | ~ |
#define PIN_BUTTON_A2 8 // A2 | ~ | Capture | ~ | 14 | ~ |
#define PIN_BUTTON_FN -1 // Hotkey Function |
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define GPIO_PIN_26 GpioAction::BUTTON_PRESS_UP // UP | UP | UP | UP | UP | UP |
#define GPIO_PIN_27 GpioAction::BUTTON_PRESS_DOWN // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define GPIO_PIN_29 GpioAction::BUTTON_PRESS_RIGHT // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define GPIO_PIN_28 GpioAction::BUTTON_PRESS_LEFT // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define GPIO_PIN_03 GpioAction::BUTTON_PRESS_B1 // B1 | A | B | Cross | 2 | K1 |
#define GPIO_PIN_02 GpioAction::BUTTON_PRESS_B2 // B2 | B | A | Circle | 3 | K2 |
#define GPIO_PIN_21 GpioAction::BUTTON_PRESS_R2 // R2 | RT | ZR | R2 | 8 | K3 |
#define GPIO_PIN_06 GpioAction::BUTTON_PRESS_L2 // L2 | LT | ZL | L2 | 7 | K4 |
#define GPIO_PIN_00 GpioAction::BUTTON_PRESS_B3 // B3 | X | Y | Square | 1 | P1 |
#define GPIO_PIN_01 GpioAction::BUTTON_PRESS_B4 // B4 | Y | X | Triangle | 4 | P2 |
#define GPIO_PIN_22 GpioAction::BUTTON_PRESS_R1 // R1 | RB | R | R1 | 6 | P3 |
#define GPIO_PIN_04 GpioAction::BUTTON_PRESS_L1 // L1 | LB | L | L1 | 5 | P4 |
#define GPIO_PIN_23 GpioAction::BUTTON_PRESS_S1 // S1 | Back | Minus | Select | 9 | Coin |
#define GPIO_PIN_20 GpioAction::BUTTON_PRESS_S2 // S2 | Start | Plus | Start | 10 | Start |
#define GPIO_PIN_15 GpioAction::BUTTON_PRESS_L3 // L3 | LS | LS | L3 | 11 | LS |
#define GPIO_PIN_16 GpioAction::BUTTON_PRESS_R3 // R3 | RS | RS | R3 | 12 | RS |
#define GPIO_PIN_07 GpioAction::BUTTON_PRESS_A1 // A1 | Guide | Home | PS | 13 | ~ |
#define GPIO_PIN_08 GpioAction::BUTTON_PRESS_A2 // A2 | ~ | Capture | ~ | 14 | ~ |
// Keyboard Mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |

View File

@@ -12,26 +12,25 @@
// Main pin mapping Configuration
// Mapping between Flatbox Rev4 switch number (as silkscreened) and GPIO pin listed under "Flatbox Rev4 SW#"
// // Flatbox Rev4 SW# | GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define PIN_DPAD_UP 10 // SW18 | UP | UP | UP | UP | UP | UP |
#define PIN_DPAD_DOWN 12 // SW8 | DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define PIN_DPAD_RIGHT 11 // SW9 | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define PIN_DPAD_LEFT 13 // SW7 | LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define PIN_BUTTON_B1 9 // SW14 | B1 | A | B | Cross | 2 | K1 |
#define PIN_BUTTON_B2 7 // SW15 | B2 | B | A | Circle | 3 | K2 |
#define PIN_BUTTON_R2 5 // SW16 | R2 | RT | ZR | R2 | 8 | K3 |
#define PIN_BUTTON_L2 3 // SW17 | L2 | LT | ZL | L2 | 7 | K4 |
#define PIN_BUTTON_B3 8 // SW10 | B3 | X | Y | Square | 1 | P1 |
#define PIN_BUTTON_B4 6 // SW11 | B4 | Y | X | Triangle | 4 | P2 |
#define PIN_BUTTON_R1 4 // SW12 | R1 | RB | R | R1 | 6 | P3 |
#define PIN_BUTTON_L1 2 // SW13 | L1 | LB | L | L1 | 5 | P4 |
#define PIN_BUTTON_S1 15 // SW2 | S1 | Back | Minus | Select | 9 | Coin |
#define PIN_BUTTON_S2 14 // SW1 | S2 | Start | Plus | Start | 10 | Start |
#define PIN_BUTTON_L3 28 // SW5 | L3 | LS | LS | L3 | 11 | LS |
#define PIN_BUTTON_R3 29 // SW6 | R3 | RS | RS | R3 | 12 | RS |
#define PIN_BUTTON_A1 26 // SW3 | A1 | Guide | Home | PS | 13 | ~ |
#define PIN_BUTTON_A2 27 // SW4 | A2 | ~ | Capture | ~ | 14 | ~ |
#define PIN_BUTTON_FN -1 // Hotkey Function |
// // Flatbox Rev4 SW# | GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define GPIO_PIN_10 GpioAction::BUTTON_PRESS_UP // UP | UP | UP | UP | UP | UP |
#define GPIO_PIN_12 GpioAction::BUTTON_PRESS_DOWN // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define GPIO_PIN_11 GpioAction::BUTTON_PRESS_RIGHT // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define GPIO_PIN_13 GpioAction::BUTTON_PRESS_LEFT // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define GPIO_PIN_09 GpioAction::BUTTON_PRESS_B1 // B1 | A | B | Cross | 2 | K1 |
#define GPIO_PIN_07 GpioAction::BUTTON_PRESS_B2 // B2 | B | A | Circle | 3 | K2 |
#define GPIO_PIN_05 GpioAction::BUTTON_PRESS_R2 // R2 | RT | ZR | R2 | 8 | K3 |
#define GPIO_PIN_03 GpioAction::BUTTON_PRESS_L2 // L2 | LT | ZL | L2 | 7 | K4 |
#define GPIO_PIN_08 GpioAction::BUTTON_PRESS_B3 // B3 | X | Y | Square | 1 | P1 |
#define GPIO_PIN_06 GpioAction::BUTTON_PRESS_B4 // B4 | Y | X | Triangle | 4 | P2 |
#define GPIO_PIN_04 GpioAction::BUTTON_PRESS_R1 // R1 | RB | R | R1 | 6 | P3 |
#define GPIO_PIN_02 GpioAction::BUTTON_PRESS_L1 // L1 | LB | L | L1 | 5 | P4 |
#define GPIO_PIN_15 GpioAction::BUTTON_PRESS_S1 // S1 | Back | Minus | Select | 9 | Coin |
#define GPIO_PIN_14 GpioAction::BUTTON_PRESS_S2 // S2 | Start | Plus | Start | 10 | Start |
#define GPIO_PIN_28 GpioAction::BUTTON_PRESS_L3 // L3 | LS | LS | L3 | 11 | LS |
#define GPIO_PIN_29 GpioAction::BUTTON_PRESS_R3 // R3 | RS | RS | R3 | 12 | RS |
#define GPIO_PIN_26 GpioAction::BUTTON_PRESS_A1 // A1 | Guide | Home | PS | 13 | ~ |
#define GPIO_PIN_27 GpioAction::BUTTON_PRESS_A2 // A2 | ~ | Capture | ~ | 14 | ~ |
// Keyboard Mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |

View File

@@ -12,25 +12,24 @@
// Main pin mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define PIN_DPAD_UP 12 // UP | UP | UP | UP | UP | UP |
#define PIN_DPAD_DOWN 10 // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define PIN_DPAD_RIGHT 11 // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define PIN_DPAD_LEFT 9 // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define PIN_BUTTON_B1 13 // B1 | A | B | Cross | 2 | K1 |
#define PIN_BUTTON_B2 14 // B2 | B | A | Circle | 3 | K2 |
#define PIN_BUTTON_R2 15 // R2 | RT | ZR | R2 | 8 | K3 |
#define PIN_BUTTON_L2 16 // L2 | LT | ZL | L2 | 7 | K4 |
#define PIN_BUTTON_B3 17 // B3 | X | Y | Square | 1 | P1 |
#define PIN_BUTTON_B4 18 // B4 | Y | X | Triangle | 4 | P2 |
#define PIN_BUTTON_R1 19 // R1 | RB | R | R1 | 6 | P3 |
#define PIN_BUTTON_L1 20 // L1 | LB | L | L1 | 5 | P4 |
#define PIN_BUTTON_S1 6 // S1 | Back | Minus | Select | 9 | Coin |
#define PIN_BUTTON_S2 7 // S2 | Start | Plus | Start | 10 | Start |
#define PIN_BUTTON_L3 3 // L3 | LS | LS | L3 | 11 | LS |
#define PIN_BUTTON_R3 2 // R3 | RS | RS | R3 | 12 | RS |
#define PIN_BUTTON_A1 5 // A1 | Guide | Home | PS | 13 | ~ |
#define PIN_BUTTON_A2 4 // A2 | ~ | Capture | ~ | 14 | ~ |
#define PIN_BUTTON_FN -1 // Hotkey Function |
#define GPIO_PIN_12 GpioAction::BUTTON_PRESS_UP // UP | UP | UP | UP | UP | UP |
#define GPIO_PIN_10 GpioAction::BUTTON_PRESS_DOWN // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define GPIO_PIN_11 GpioAction::BUTTON_PRESS_RIGHT // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define GPIO_PIN_09 GpioAction::BUTTON_PRESS_LEFT // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define GPIO_PIN_13 GpioAction::BUTTON_PRESS_B1 // B1 | A | B | Cross | 2 | K1 |
#define GPIO_PIN_14 GpioAction::BUTTON_PRESS_B2 // B2 | B | A | Circle | 3 | K2 |
#define GPIO_PIN_15 GpioAction::BUTTON_PRESS_R2 // R2 | RT | ZR | R2 | 8 | K3 |
#define GPIO_PIN_16 GpioAction::BUTTON_PRESS_L2 // L2 | LT | ZL | L2 | 7 | K4 |
#define GPIO_PIN_17 GpioAction::BUTTON_PRESS_B3 // B3 | X | Y | Square | 1 | P1 |
#define GPIO_PIN_18 GpioAction::BUTTON_PRESS_B4 // B4 | Y | X | Triangle | 4 | P2 |
#define GPIO_PIN_19 GpioAction::BUTTON_PRESS_R1 // R1 | RB | R | R1 | 6 | P3 |
#define GPIO_PIN_20 GpioAction::BUTTON_PRESS_L1 // L1 | LB | L | L1 | 5 | P4 |
#define GPIO_PIN_06 GpioAction::BUTTON_PRESS_S1 // S1 | Back | Minus | Select | 9 | Coin |
#define GPIO_PIN_07 GpioAction::BUTTON_PRESS_S2 // S2 | Start | Plus | Start | 10 | Start |
#define GPIO_PIN_03 GpioAction::BUTTON_PRESS_L3 // L3 | LS | LS | L3 | 11 | LS |
#define GPIO_PIN_02 GpioAction::BUTTON_PRESS_R3 // R3 | RS | RS | R3 | 12 | RS |
#define GPIO_PIN_05 GpioAction::BUTTON_PRESS_A1 // A1 | Guide | Home | PS | 13 | ~ |
#define GPIO_PIN_04 GpioAction::BUTTON_PRESS_A2 // A2 | ~ | Capture | ~ | 14 | ~ |
// Keyboard Mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
@@ -55,17 +54,15 @@
#define KEY_BUTTON_FN -1 // Hotkey Function |
#define TURBO_ENABLED 1
#define PIN_BUTTON_TURBO 27
#define GPIO_PIN_27 GpioAction::BUTTON_PRESS_TURBO
#define JSLIDER_ENABLED 1
#define PIN_SLIDER_ONE 25
#define PIN_SLIDER_TWO 24
#define GPIO_PIN_25 GpioAction::SUSTAIN_DP_MODE_LS
#define GPIO_PIN_24 GpioAction::SUSTAIN_DP_MODE_RS
#define SLIDER_SOCD_ENABLED 1
#define PIN_SLIDER_SOCD_ONE 23
#define PIN_SLIDER_SOCD_TWO 22
#define SLIDER_SOCD_SLOT_ONE SOCD_MODE_UP_PRIORITY
#define SLIDER_SOCD_SLOT_TWO SOCD_MODE_SECOND_INPUT_PRIORITY
#define GPIO_PIN_23 GpioAction::SUSTAIN_SOCD_MODE_UP_PRIO
#define GPIO_PIN_22 GpioAction::SUSTAIN_SOCD_MODE_SECOND_WIN
#define SLIDER_SOCD_SLOT_DEFAULT SOCD_MODE_NEUTRAL
#define DEFAULT_PS4CONTROLLER_TYPE PS4_ARCADESTICK

View File

@@ -11,26 +11,25 @@
#define BOARD_CONFIG_LABEL "Open_Core0 WASD"
// Main pin mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define PIN_DPAD_UP 10 // UP | UP | UP | UP | UP | UP |
#define PIN_DPAD_DOWN 11 // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define PIN_DPAD_RIGHT 12 // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define PIN_DPAD_LEFT 9 // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define PIN_BUTTON_B1 14 // B1 | A | B | Cross | 2 | K1 |
#define PIN_BUTTON_B2 15 // B2 | B | A | Circle | 3 | K2 |
#define PIN_BUTTON_R2 16 // R2 | RT | ZR | R2 | 8 | K3 |
#define PIN_BUTTON_L2 17 // L2 | LT | ZL | L2 | 7 | K4 |
#define PIN_BUTTON_B3 18 // B3 | X | Y | Square | 1 | P1 |
#define PIN_BUTTON_B4 19 // B4 | Y | X | Triangle | 4 | P2 |
#define PIN_BUTTON_R1 20 // R1 | RB | R | R1 | 6 | P3 |
#define PIN_BUTTON_L1 21 // L1 | LB | L | L1 | 5 | P4 |
#define PIN_BUTTON_S1 6 // S1 | Back | Minus | Select | 9 | Coin |
#define PIN_BUTTON_S2 7 // S2 | Start | Plus | Start | 10 | Start |
#define PIN_BUTTON_L3 3 // L3 | LS | LS | L3 | 11 | LS |
#define PIN_BUTTON_R3 2 // R3 | RS | RS | R3 | 12 | RS |
#define PIN_BUTTON_A1 5 // A1 | Guide | Home | PS | 13 | ~ |
#define PIN_BUTTON_A2 4 // A2 | ~ | Capture | ~ | 14 | ~ |
#define PIN_BUTTON_FN -1 // Hotkey Function |
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define GPIO_PIN_10 GpioAction::BUTTON_PRESS_UP // UP | UP | UP | UP | UP | UP |
#define GPIO_PIN_11 GpioAction::BUTTON_PRESS_DOWN // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define GPIO_PIN_12 GpioAction::BUTTON_PRESS_RIGHT // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define GPIO_PIN_09 GpioAction::BUTTON_PRESS_LEFT // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define GPIO_PIN_14 GpioAction::BUTTON_PRESS_B1 // B1 | A | B | Cross | 2 | K1 |
#define GPIO_PIN_15 GpioAction::BUTTON_PRESS_B2 // B2 | B | A | Circle | 3 | K2 |
#define GPIO_PIN_16 GpioAction::BUTTON_PRESS_R2 // R2 | RT | ZR | R2 | 8 | K3 |
#define GPIO_PIN_17 GpioAction::BUTTON_PRESS_L2 // L2 | LT | ZL | L2 | 7 | K4 |
#define GPIO_PIN_18 GpioAction::BUTTON_PRESS_B3 // B3 | X | Y | Square | 1 | P1 |
#define GPIO_PIN_19 GpioAction::BUTTON_PRESS_B4 // B4 | Y | X | Triangle | 4 | P2 |
#define GPIO_PIN_20 GpioAction::BUTTON_PRESS_R1 // R1 | RB | R | R1 | 6 | P3 |
#define GPIO_PIN_21 GpioAction::BUTTON_PRESS_L1 // L1 | LB | L | L1 | 5 | P4 |
#define GPIO_PIN_06 GpioAction::BUTTON_PRESS_S1 // S1 | Back | Minus | Select | 9 | Coin |
#define GPIO_PIN_07 GpioAction::BUTTON_PRESS_S2 // S2 | Start | Plus | Start | 10 | Start |
#define GPIO_PIN_03 GpioAction::BUTTON_PRESS_L3 // L3 | LS | LS | L3 | 11 | LS |
#define GPIO_PIN_02 GpioAction::BUTTON_PRESS_R3 // R3 | RS | RS | R3 | 12 | RS |
#define GPIO_PIN_05 GpioAction::BUTTON_PRESS_A1 // A1 | Guide | Home | PS | 13 | ~ |
#define GPIO_PIN_04 GpioAction::BUTTON_PRESS_A2 // A2 | ~ | Capture | ~ | 14 | ~ |
// Keyboard Mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
@@ -59,14 +58,16 @@
#define DEFAULT_INPUT_MODE_R1 INPUT_MODE_XBONE
#define TURBO_ENABLED 1
#define PIN_BUTTON_TURBO 27
#define GPIO_PIN_27 GpioAction::BUTTON_PRESS_TURBO
#define JSLIDER_ENABLED 1
#define PIN_SLIDER_ONE 26
#define PIN_SLIDER_TWO 25
#define GPIO_PIN_26 GpioAction::SUSTAIN_DP_MODE_LS
#define GPIO_PIN_25 GpioAction::SUSTAIN_DP_MODE_RS
#define SLIDER_SOCD_ENABLED 1
#define PIN_SLIDER_SOCD_ONE 24
#define PIN_SLIDER_SOCD_TWO 23
#define GPIO_PIN_24 GpioAction::SUSTAIN_SOCD_MODE_UP_PRIO
#define GPIO_PIN_23 GpioAction::SUSTAIN_SOCD_MODE_SECOND_WIN
#define SLIDER_SOCD_SLOT_DEFAULT SOCD_MODE_NEUTRAL
#define BOARD_LEDS_PIN 8
#define LED_BRIGHTNESS_MAXIMUM 50
@@ -102,8 +103,7 @@
#define BUTTON_LAYOUT_RIGHT BUTTON_LAYOUT_OPENCORE0WASDB
#define SPLASH_MODE SPLASH_MODE_STATIC
#define EXTRA_BUTTON_MASK GAMEPAD_MASK_DU
#define EXTRA_BUTTON_PIN 13
#define GPIO_PIN_13 GpioAction::BUTTON_PRESS_UP
#define FOCUS_MODE_ENABLED 1
#define FOCUS_MODE_BUTTON_MASK GAMEPAD_MASK_S1 | GAMEPAD_MASK_S2 | GAMEPAD_MASK_A1 | GAMEPAD_MASK_A2 | GAMEPAD_MASK_L3 | GAMEPAD_MASK_R3

View File

@@ -11,26 +11,25 @@
#define BOARD_CONFIG_LABEL "Pico"
// Main pin mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define PIN_DPAD_UP 2 // UP | UP | UP | UP | UP | UP |
#define PIN_DPAD_DOWN 3 // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define PIN_DPAD_RIGHT 4 // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define PIN_DPAD_LEFT 5 // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define PIN_BUTTON_B1 6 // B1 | A | B | Cross | 2 | K1 |
#define PIN_BUTTON_B2 7 // B2 | B | A | Circle | 3 | K2 |
#define PIN_BUTTON_R2 8 // R2 | RT | ZR | R2 | 8 | K3 |
#define PIN_BUTTON_L2 9 // L2 | LT | ZL | L2 | 7 | K4 |
#define PIN_BUTTON_B3 10 // B3 | X | Y | Square | 1 | P1 |
#define PIN_BUTTON_B4 11 // B4 | Y | X | Triangle | 4 | P2 |
#define PIN_BUTTON_R1 12 // R1 | RB | R | R1 | 6 | P3 |
#define PIN_BUTTON_L1 13 // L1 | LB | L | L1 | 5 | P4 |
#define PIN_BUTTON_S1 16 // S1 | Back | Minus | Select | 9 | Coin |
#define PIN_BUTTON_S2 17 // S2 | Start | Plus | Start | 10 | Start |
#define PIN_BUTTON_L3 18 // L3 | LS | LS | L3 | 11 | LS |
#define PIN_BUTTON_R3 19 // R3 | RS | RS | R3 | 12 | RS |
#define PIN_BUTTON_A1 20 // A1 | Guide | Home | PS | 13 | ~ |
#define PIN_BUTTON_A2 21 // A2 | ~ | Capture | ~ | 14 | ~ |
#define PIN_BUTTON_FN -1 // Hotkey Function |
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define GPIO_PIN_02 GpioAction::BUTTON_PRESS_UP // UP | UP | UP | UP | UP | UP |
#define GPIO_PIN_03 GpioAction::BUTTON_PRESS_DOWN // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define GPIO_PIN_04 GpioAction::BUTTON_PRESS_RIGHT // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define GPIO_PIN_05 GpioAction::BUTTON_PRESS_LEFT // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define GPIO_PIN_06 GpioAction::BUTTON_PRESS_B1 // B1 | A | B | Cross | 2 | K1 |
#define GPIO_PIN_07 GpioAction::BUTTON_PRESS_B2 // B2 | B | A | Circle | 3 | K2 |
#define GPIO_PIN_08 GpioAction::BUTTON_PRESS_R2 // R2 | RT | ZR | R2 | 8 | K3 |
#define GPIO_PIN_09 GpioAction::BUTTON_PRESS_L2 // L2 | LT | ZL | L2 | 7 | K4 |
#define GPIO_PIN_10 GpioAction::BUTTON_PRESS_B3 // B3 | X | Y | Square | 1 | P1 |
#define GPIO_PIN_11 GpioAction::BUTTON_PRESS_B4 // B4 | Y | X | Triangle | 4 | P2 |
#define GPIO_PIN_12 GpioAction::BUTTON_PRESS_R1 // R1 | RB | R | R1 | 6 | P3 |
#define GPIO_PIN_13 GpioAction::BUTTON_PRESS_L1 // L1 | LB | L | L1 | 5 | P4 |
#define GPIO_PIN_16 GpioAction::BUTTON_PRESS_S1 // S1 | Back | Minus | Select | 9 | Coin |
#define GPIO_PIN_17 GpioAction::BUTTON_PRESS_S2 // S2 | Start | Plus | Start | 10 | Start |
#define GPIO_PIN_18 GpioAction::BUTTON_PRESS_L3 // L3 | LS | LS | L3 | 11 | LS |
#define GPIO_PIN_19 GpioAction::BUTTON_PRESS_R3 // R3 | RS | RS | R3 | 12 | RS |
#define GPIO_PIN_20 GpioAction::BUTTON_PRESS_A1 // A1 | Guide | Home | PS | 13 | ~ |
#define GPIO_PIN_21 GpioAction::BUTTON_PRESS_A2 // A2 | ~ | Capture | ~ | 14 | ~ |
// Keyboard Mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |

View File

@@ -11,26 +11,25 @@
#define BOARD_CONFIG_LABEL "Pico Fighting Board"
// Main pin mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define PIN_DPAD_UP 1 // UP | UP | UP | UP | UP | UP |
#define PIN_DPAD_DOWN 2 // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define PIN_DPAD_RIGHT 3 // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define PIN_DPAD_LEFT 0 // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define PIN_BUTTON_B1 11 // B1 | A | B | Cross | 2 | K1 |
#define PIN_BUTTON_B2 12 // B2 | B | A | Circle | 3 | K2 |
#define PIN_BUTTON_R2 13 // R2 | RT | ZR | R2 | 8 | K3 |
#define PIN_BUTTON_L2 14 // L2 | LT | ZL | L2 | 7 | K4 |
#define PIN_BUTTON_B3 7 // B3 | X | Y | Square | 1 | P1 |
#define PIN_BUTTON_B4 8 // B4 | Y | X | Triangle | 4 | P2 |
#define PIN_BUTTON_R1 9 // R1 | RB | R | R1 | 6 | P3 |
#define PIN_BUTTON_L1 10 // L1 | LB | L | L1 | 5 | P4 |
#define PIN_BUTTON_S1 5 // S1 | Back | Minus | Select | 9 | Coin |
#define PIN_BUTTON_S2 6 // S2 | Start | Plus | Start | 10 | Start |
#define PIN_BUTTON_L3 21 // L3 | LS | LS | L3 | 11 | LS |
#define PIN_BUTTON_R3 22 // R3 | RS | RS | R3 | 12 | RS |
#define PIN_BUTTON_A1 4 // A1 | Guide | Home | PS | 13 | ~ |
#define PIN_BUTTON_A2 20 // A2 | ~ | Capture | ~ | 14 | ~ |
#define PIN_BUTTON_FN -1 // Hotkey Function |
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define GPIO_PIN_01 GpioAction::BUTTON_PRESS_UP // UP | UP | UP | UP | UP | UP |
#define GPIO_PIN_02 GpioAction::BUTTON_PRESS_DOWN // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define GPIO_PIN_03 GpioAction::BUTTON_PRESS_RIGHT // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define GPIO_PIN_00 GpioAction::BUTTON_PRESS_LEFT // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define GPIO_PIN_11 GpioAction::BUTTON_PRESS_B1 // B1 | A | B | Cross | 2 | K1 |
#define GPIO_PIN_12 GpioAction::BUTTON_PRESS_B2 // B2 | B | A | Circle | 3 | K2 |
#define GPIO_PIN_13 GpioAction::BUTTON_PRESS_R2 // R2 | RT | ZR | R2 | 8 | K3 |
#define GPIO_PIN_14 GpioAction::BUTTON_PRESS_L2 // L2 | LT | ZL | L2 | 7 | K4 |
#define GPIO_PIN_07 GpioAction::BUTTON_PRESS_B3 // B3 | X | Y | Square | 1 | P1 |
#define GPIO_PIN_08 GpioAction::BUTTON_PRESS_B4 // B4 | Y | X | Triangle | 4 | P2 |
#define GPIO_PIN_09 GpioAction::BUTTON_PRESS_R1 // R1 | RB | R | R1 | 6 | P3 |
#define GPIO_PIN_10 GpioAction::BUTTON_PRESS_L1 // L1 | LB | L | L1 | 5 | P4 |
#define GPIO_PIN_05 GpioAction::BUTTON_PRESS_S1 // S1 | Back | Minus | Select | 9 | Coin |
#define GPIO_PIN_06 GpioAction::BUTTON_PRESS_S2 // S2 | Start | Plus | Start | 10 | Start |
#define GPIO_PIN_21 GpioAction::BUTTON_PRESS_L3 // L3 | LS | LS | L3 | 11 | LS |
#define GPIO_PIN_22 GpioAction::BUTTON_PRESS_R3 // R3 | RS | RS | R3 | 12 | RS |
#define GPIO_PIN_04 GpioAction::BUTTON_PRESS_A1 // A1 | Guide | Home | PS | 13 | ~ |
#define GPIO_PIN_20 GpioAction::BUTTON_PRESS_A2 // A2 | ~ | Capture | ~ | 14 | ~ |
// Keyboard Mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |

View File

@@ -11,26 +11,25 @@
#define BOARD_CONFIG_LABEL "Pico-W"
// Main pin mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define PIN_DPAD_UP 2 // UP | UP | UP | UP | UP | UP |
#define PIN_DPAD_DOWN 3 // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define PIN_DPAD_RIGHT 4 // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define PIN_DPAD_LEFT 5 // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define PIN_BUTTON_B1 6 // B1 | A | B | Cross | 2 | K1 |
#define PIN_BUTTON_B2 7 // B2 | B | A | Circle | 3 | K2 |
#define PIN_BUTTON_R2 8 // R2 | RT | ZR | R2 | 8 | K3 |
#define PIN_BUTTON_L2 9 // L2 | LT | ZL | L2 | 7 | K4 |
#define PIN_BUTTON_B3 10 // B3 | X | Y | Square | 1 | P1 |
#define PIN_BUTTON_B4 11 // B4 | Y | X | Triangle | 4 | P2 |
#define PIN_BUTTON_R1 12 // R1 | RB | R | R1 | 6 | P3 |
#define PIN_BUTTON_L1 13 // L1 | LB | L | L1 | 5 | P4 |
#define PIN_BUTTON_S1 16 // S1 | Back | Minus | Select | 9 | Coin |
#define PIN_BUTTON_S2 17 // S2 | Start | Plus | Start | 10 | Start |
#define PIN_BUTTON_L3 18 // L3 | LS | LS | L3 | 11 | LS |
#define PIN_BUTTON_R3 19 // R3 | RS | RS | R3 | 12 | RS |
#define PIN_BUTTON_A1 20 // A1 | Guide | Home | PS | 13 | ~ |
#define PIN_BUTTON_A2 21 // A2 | ~ | Capture | ~ | 14 | ~ |
#define PIN_BUTTON_FN -1 // Hotkey Function |
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define GPIO_PIN_02 GpioAction::BUTTON_PRESS_UP // UP | UP | UP | UP | UP | UP |
#define GPIO_PIN_03 GpioAction::BUTTON_PRESS_DOWN // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define GPIO_PIN_04 GpioAction::BUTTON_PRESS_RIGHT // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define GPIO_PIN_05 GpioAction::BUTTON_PRESS_LEFT // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define GPIO_PIN_06 GpioAction::BUTTON_PRESS_B1 // B1 | A | B | Cross | 2 | K1 |
#define GPIO_PIN_07 GpioAction::BUTTON_PRESS_B2 // B2 | B | A | Circle | 3 | K2 |
#define GPIO_PIN_08 GpioAction::BUTTON_PRESS_R2 // R2 | RT | ZR | R2 | 8 | K3 |
#define GPIO_PIN_09 GpioAction::BUTTON_PRESS_L2 // L2 | LT | ZL | L2 | 7 | K4 |
#define GPIO_PIN_10 GpioAction::BUTTON_PRESS_B3 // B3 | X | Y | Square | 1 | P1 |
#define GPIO_PIN_11 GpioAction::BUTTON_PRESS_B4 // B4 | Y | X | Triangle | 4 | P2 |
#define GPIO_PIN_12 GpioAction::BUTTON_PRESS_R1 // R1 | RB | R | R1 | 6 | P3 |
#define GPIO_PIN_13 GpioAction::BUTTON_PRESS_L1 // L1 | LB | L | L1 | 5 | P4 |
#define GPIO_PIN_16 GpioAction::BUTTON_PRESS_S1 // S1 | Back | Minus | Select | 9 | Coin |
#define GPIO_PIN_17 GpioAction::BUTTON_PRESS_S2 // S2 | Start | Plus | Start | 10 | Start |
#define GPIO_PIN_18 GpioAction::BUTTON_PRESS_L3 // L3 | LS | LS | L3 | 11 | LS |
#define GPIO_PIN_19 GpioAction::BUTTON_PRESS_R3 // R3 | RS | RS | R3 | 12 | RS |
#define GPIO_PIN_20 GpioAction::BUTTON_PRESS_A1 // A1 | Guide | Home | PS | 13 | ~ |
#define GPIO_PIN_21 GpioAction::BUTTON_PRESS_A2 // A2 | ~ | Capture | ~ | 14 | ~ |
// Keyboard Mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |

View File

@@ -11,26 +11,25 @@
#define BOARD_CONFIG_LABEL "RP2040 Advanced Breakout Board"
// Main pin mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define PIN_DPAD_UP 19 // UP | UP | UP | UP | UP | UP |
#define PIN_DPAD_DOWN 18 // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define PIN_DPAD_RIGHT 17 // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define PIN_DPAD_LEFT 16 // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define PIN_BUTTON_B1 8 // B1 | A | B | Cross | 2 | K1 |
#define PIN_BUTTON_B2 7 // B2 | B | A | Circle | 3 | K2 |
#define PIN_BUTTON_R2 6 // R2 | RT | ZR | R2 | 8 | K3 |
#define PIN_BUTTON_L2 5 // L2 | LT | ZL | L2 | 7 | K4 |
#define PIN_BUTTON_B3 12 // B3 | X | Y | Square | 1 | P1 |
#define PIN_BUTTON_B4 11 // B4 | Y | X | Triangle | 4 | P2 |
#define PIN_BUTTON_R1 10 // R1 | RB | R | R1 | 6 | P3 |
#define PIN_BUTTON_L1 9 // L1 | LB | L | L1 | 5 | P4 |
#define PIN_BUTTON_S1 15 // S1 | Back | Minus | Select | 9 | Coin |
#define PIN_BUTTON_S2 13 // S2 | Start | Plus | Start | 10 | Start |
#define PIN_BUTTON_L3 21 // L3 | LS | LS | L3 | 11 | LS |
#define PIN_BUTTON_R3 22 // R3 | RS | RS | R3 | 12 | RS |
#define PIN_BUTTON_A1 14 // A1 | Guide | Home | PS | 13 | ~ |
#define PIN_BUTTON_A2 20 // A2 | ~ | Capture | ~ | 14 | ~ |
#define PIN_BUTTON_FN -1 // Hotkey Function |
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define GPIO_PIN_19 GpioAction::BUTTON_PRESS_UP // UP | UP | UP | UP | UP | UP |
#define GPIO_PIN_18 GpioAction::BUTTON_PRESS_DOWN // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define GPIO_PIN_17 GpioAction::BUTTON_PRESS_RIGHT // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define GPIO_PIN_16 GpioAction::BUTTON_PRESS_LEFT // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define GPIO_PIN_08 GpioAction::BUTTON_PRESS_B1 // B1 | A | B | Cross | 2 | K1 |
#define GPIO_PIN_07 GpioAction::BUTTON_PRESS_B2 // B2 | B | A | Circle | 3 | K2 |
#define GPIO_PIN_06 GpioAction::BUTTON_PRESS_R2 // R2 | RT | ZR | R2 | 8 | K3 |
#define GPIO_PIN_05 GpioAction::BUTTON_PRESS_L2 // L2 | LT | ZL | L2 | 7 | K4 |
#define GPIO_PIN_12 GpioAction::BUTTON_PRESS_B3 // B3 | X | Y | Square | 1 | P1 |
#define GPIO_PIN_11 GpioAction::BUTTON_PRESS_B4 // B4 | Y | X | Triangle | 4 | P2 |
#define GPIO_PIN_10 GpioAction::BUTTON_PRESS_R1 // R1 | RB | R | R1 | 6 | P3 |
#define GPIO_PIN_09 GpioAction::BUTTON_PRESS_L1 // L1 | LB | L | L1 | 5 | P4 |
#define GPIO_PIN_15 GpioAction::BUTTON_PRESS_S1 // S1 | Back | Minus | Select | 9 | Coin |
#define GPIO_PIN_13 GpioAction::BUTTON_PRESS_S2 // S2 | Start | Plus | Start | 10 | Start |
#define GPIO_PIN_21 GpioAction::BUTTON_PRESS_L3 // L3 | LS | LS | L3 | 11 | LS |
#define GPIO_PIN_22 GpioAction::BUTTON_PRESS_R3 // R3 | RS | RS | R3 | 12 | RS |
#define GPIO_PIN_14 GpioAction::BUTTON_PRESS_A1 // A1 | Guide | Home | PS | 13 | ~ |
#define GPIO_PIN_20 GpioAction::BUTTON_PRESS_A2 // A2 | ~ | Capture | ~ | 14 | ~ |
// Keyboard Mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |

View File

@@ -11,26 +11,25 @@
#define BOARD_CONFIG_LABEL "RP2040 Advanced Breakout Board - USB Passthrough"
// Main pin mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define PIN_DPAD_UP 19 // UP | UP | UP | UP | UP | UP |
#define PIN_DPAD_DOWN 18 // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define PIN_DPAD_RIGHT 17 // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define PIN_DPAD_LEFT 16 // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define PIN_BUTTON_B1 8 // B1 | A | B | Cross | 2 | K1 |
#define PIN_BUTTON_B2 7 // B2 | B | A | Circle | 3 | K2 |
#define PIN_BUTTON_R2 6 // R2 | RT | ZR | R2 | 8 | K3 |
#define PIN_BUTTON_L2 5 // L2 | LT | ZL | L2 | 7 | K4 |
#define PIN_BUTTON_B3 12 // B3 | X | Y | Square | 1 | P1 |
#define PIN_BUTTON_B4 11 // B4 | Y | X | Triangle | 4 | P2 |
#define PIN_BUTTON_R1 10 // R1 | RB | R | R1 | 6 | P3 |
#define PIN_BUTTON_L1 9 // L1 | LB | L | L1 | 5 | P4 |
#define PIN_BUTTON_S1 15 // S1 | Back | Minus | Select | 9 | Coin |
#define PIN_BUTTON_S2 13 // S2 | Start | Plus | Start | 10 | Start |
#define PIN_BUTTON_L3 21 // L3 | LS | LS | L3 | 11 | LS |
#define PIN_BUTTON_R3 22 // R3 | RS | RS | R3 | 12 | RS |
#define PIN_BUTTON_A1 14 // A1 | Guide | Home | PS | 13 | ~ |
#define PIN_BUTTON_A2 20 // A2 | ~ | Capture | ~ | 14 | ~ |
#define PIN_BUTTON_FN -1 // Hotkey Function |
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define GPIO_PIN_19 GpioAction::BUTTON_PRESS_UP // UP | UP | UP | UP | UP | UP |
#define GPIO_PIN_18 GpioAction::BUTTON_PRESS_DOWN // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define GPIO_PIN_17 GpioAction::BUTTON_PRESS_RIGHT // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define GPIO_PIN_16 GpioAction::BUTTON_PRESS_LEFT // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define GPIO_PIN_08 GpioAction::BUTTON_PRESS_B1 // B1 | A | B | Cross | 2 | K1 |
#define GPIO_PIN_07 GpioAction::BUTTON_PRESS_B2 // B2 | B | A | Circle | 3 | K2 |
#define GPIO_PIN_06 GpioAction::BUTTON_PRESS_R2 // R2 | RT | ZR | R2 | 8 | K3 |
#define GPIO_PIN_05 GpioAction::BUTTON_PRESS_L2 // L2 | LT | ZL | L2 | 7 | K4 |
#define GPIO_PIN_12 GpioAction::BUTTON_PRESS_B3 // B3 | X | Y | Square | 1 | P1 |
#define GPIO_PIN_11 GpioAction::BUTTON_PRESS_B4 // B4 | Y | X | Triangle | 4 | P2 |
#define GPIO_PIN_10 GpioAction::BUTTON_PRESS_R1 // R1 | RB | R | R1 | 6 | P3 |
#define GPIO_PIN_09 GpioAction::BUTTON_PRESS_L1 // L1 | LB | L | L1 | 5 | P4 |
#define GPIO_PIN_15 GpioAction::BUTTON_PRESS_S1 // S1 | Back | Minus | Select | 9 | Coin |
#define GPIO_PIN_13 GpioAction::BUTTON_PRESS_S2 // S2 | Start | Plus | Start | 10 | Start |
#define GPIO_PIN_21 GpioAction::BUTTON_PRESS_L3 // L3 | LS | LS | L3 | 11 | LS |
#define GPIO_PIN_22 GpioAction::BUTTON_PRESS_R3 // R3 | RS | RS | R3 | 12 | RS |
#define GPIO_PIN_14 GpioAction::BUTTON_PRESS_A1 // A1 | Guide | Home | PS | 13 | ~ |
#define GPIO_PIN_20 GpioAction::BUTTON_PRESS_A2 // A2 | ~ | Capture | ~ | 14 | ~ |
// Keyboard Mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |

View File

@@ -11,26 +11,25 @@
#define BOARD_CONFIG_LABEL "RP2040 Mini Breakout Board"
// Main pin mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define PIN_DPAD_UP 15 // UP | UP | UP | UP | UP | UP |
#define PIN_DPAD_DOWN 14 // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define PIN_DPAD_RIGHT 13 // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define PIN_DPAD_LEFT 12 // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define PIN_BUTTON_B1 3 // B1 | A | B | Cross | 2 | K1 |
#define PIN_BUTTON_B2 2 // B2 | B | A | Circle | 3 | K2 |
#define PIN_BUTTON_R2 0 // R2 | RT | ZR | R2 | 8 | K3 |
#define PIN_BUTTON_L2 1 // L2 | LT | ZL | L2 | 7 | K4 |
#define PIN_BUTTON_B3 8 // B3 | X | Y | Square | 1 | P1 |
#define PIN_BUTTON_B4 6 // B4 | Y | X | Triangle | 4 | P2 |
#define PIN_BUTTON_R1 5 // R1 | RB | R | R1 | 6 | P3 |
#define PIN_BUTTON_L1 4 // L1 | LB | L | L1 | 5 | P4 |
#define PIN_BUTTON_S1 11 // S1 | Back | Minus | Select | 9 | Coin |
#define PIN_BUTTON_S2 9 // S2 | Start | Plus | Start | 10 | Start |
#define PIN_BUTTON_L3 28 // L3 | LS | LS | L3 | 11 | LS |
#define PIN_BUTTON_R3 29 // R3 | RS | RS | R3 | 12 | RS |
#define PIN_BUTTON_A1 10 // A1 | Guide | Home | PS | 13 | ~ |
#define PIN_BUTTON_A2 27 // A2 | ~ | Capture | ~ | 14 | ~ |
#define PIN_BUTTON_FN -1 // Hotkey Function |
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define GPIO_PIN_15 GpioAction::BUTTON_PRESS_UP // UP | UP | UP | UP | UP | UP |
#define GPIO_PIN_14 GpioAction::BUTTON_PRESS_DOWN // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define GPIO_PIN_13 GpioAction::BUTTON_PRESS_RIGHT // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define GPIO_PIN_12 GpioAction::BUTTON_PRESS_LEFT // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define GPIO_PIN_03 GpioAction::BUTTON_PRESS_B1 // B1 | A | B | Cross | 2 | K1 |
#define GPIO_PIN_02 GpioAction::BUTTON_PRESS_B2 // B2 | B | A | Circle | 3 | K2 |
#define GPIO_PIN_00 GpioAction::BUTTON_PRESS_R2 // R2 | RT | ZR | R2 | 8 | K3 |
#define GPIO_PIN_01 GpioAction::BUTTON_PRESS_L2 // L2 | LT | ZL | L2 | 7 | K4 |
#define GPIO_PIN_08 GpioAction::BUTTON_PRESS_B3 // B3 | X | Y | Square | 1 | P1 |
#define GPIO_PIN_06 GpioAction::BUTTON_PRESS_B4 // B4 | Y | X | Triangle | 4 | P2 |
#define GPIO_PIN_05 GpioAction::BUTTON_PRESS_R1 // R1 | RB | R | R1 | 6 | P3 |
#define GPIO_PIN_04 GpioAction::BUTTON_PRESS_L1 // L1 | LB | L | L1 | 5 | P4 |
#define GPIO_PIN_11 GpioAction::BUTTON_PRESS_S1 // S1 | Back | Minus | Select | 9 | Coin |
#define GPIO_PIN_09 GpioAction::BUTTON_PRESS_S2 // S2 | Start | Plus | Start | 10 | Start |
#define GPIO_PIN_28 GpioAction::BUTTON_PRESS_L3 // L3 | LS | LS | L3 | 11 | LS |
#define GPIO_PIN_29 GpioAction::BUTTON_PRESS_R3 // R3 | RS | RS | R3 | 12 | RS |
#define GPIO_PIN_10 GpioAction::BUTTON_PRESS_A1 // A1 | Guide | Home | PS | 13 | ~ |
#define GPIO_PIN_27 GpioAction::BUTTON_PRESS_A2 // A2 | ~ | Capture | ~ | 14 | ~ |
// Keyboard Mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |

View File

@@ -12,25 +12,25 @@
// Main pin mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define PIN_DPAD_UP 0 // UP | UP | UP | UP | UP | UP |
#define PIN_DPAD_DOWN 3 // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define PIN_DPAD_RIGHT 2 // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define PIN_DPAD_LEFT 4 // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define PIN_BUTTON_B1 26 // B1 | A | B | Cross | 2 | K1 |
#define PIN_BUTTON_B2 21 // B2 | B | A | Circle | 3 | K2 |
#define PIN_BUTTON_R2 19 // R2 | RT | ZR | R2 | 8 | K3 |
#define PIN_BUTTON_L2 17 // L2 | LT | ZL | L2 | 7 | K4 |
#define PIN_BUTTON_B3 27 // B3 | X | Y | Square | 1 | P1 |
#define PIN_BUTTON_B4 22 // B4 | Y | X | Triangle | 4 | P2 |
#define PIN_BUTTON_R1 20 // R1 | RB | R | R1 | 6 | P3 |
#define PIN_BUTTON_L1 18 // L1 | LB | L | L1 | 5 | P4 |
#define PIN_BUTTON_S1 7 // S1 | Back | Minus | Select | 9 | Coin |
#define PIN_BUTTON_S2 6 // S2 | Start | Plus | Start | 10 | Start |
#define PIN_BUTTON_L3 15 // L3 | LS | LS | L3 | 11 | LS |
#define PIN_BUTTON_R3 16 // R3 | RS | RS | R3 | 12 | RS |
#define PIN_BUTTON_A1 13 // A1 | Guide | Home | PS | 13 | ~ |
#define PIN_BUTTON_A2 12 // A2 | ~ | Capture | ~ | 14 | ~ |
#define PIN_BUTTON_FN 14 // Hotkey Function |
#define GPIO_PIN_00 GpioAction::BUTTON_PRESS_UP // UP | UP | UP | UP | UP | UP |
#define GPIO_PIN_03 GpioAction::BUTTON_PRESS_DOWN // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define GPIO_PIN_02 GpioAction::BUTTON_PRESS_RIGHT // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define GPIO_PIN_04 GpioAction::BUTTON_PRESS_LEFT // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define GPIO_PIN_26 GpioAction::BUTTON_PRESS_B1 // B1 | A | B | Cross | 2 | K1 |
#define GPIO_PIN_21 GpioAction::BUTTON_PRESS_B2 // B2 | B | A | Circle | 3 | K2 |
#define GPIO_PIN_19 GpioAction::BUTTON_PRESS_R2 // R2 | RT | ZR | R2 | 8 | K3 |
#define GPIO_PIN_17 GpioAction::BUTTON_PRESS_L2 // L2 | LT | ZL | L2 | 7 | K4 |
#define GPIO_PIN_27 GpioAction::BUTTON_PRESS_B3 // B3 | X | Y | Square | 1 | P1 |
#define GPIO_PIN_22 GpioAction::BUTTON_PRESS_B4 // B4 | Y | X | Triangle | 4 | P2 |
#define GPIO_PIN_20 GpioAction::BUTTON_PRESS_R1 // R1 | RB | R | R1 | 6 | P3 |
#define GPIO_PIN_18 GpioAction::BUTTON_PRESS_L1 // L1 | LB | L | L1 | 5 | P4 |
#define GPIO_PIN_07 GpioAction::BUTTON_PRESS_S1 // S1 | Back | Minus | Select | 9 | Coin |
#define GPIO_PIN_06 GpioAction::BUTTON_PRESS_S2 // S2 | Start | Plus | Start | 10 | Start |
#define GPIO_PIN_15 GpioAction::BUTTON_PRESS_L3 // L3 | LS | LS | L3 | 11 | LS |
#define GPIO_PIN_16 GpioAction::BUTTON_PRESS_R3 // R3 | RS | RS | R3 | 12 | RS |
#define GPIO_PIN_13 GpioAction::BUTTON_PRESS_A1 // A1 | Guide | Home | PS | 13 | ~ |
#define GPIO_PIN_12 GpioAction::BUTTON_PRESS_A2 // A2 | ~ | Capture | ~ | 14 | ~ |
#define GPIO_PIN_14 GpioAction::BUTTON_PRESS_FN // Hotkey Function |
// Keyboard Mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
@@ -54,7 +54,6 @@
#define KEY_BUTTON_A2 HID_KEY_F2 // A2 | ~ | Capture | ~ | 14 | ~ |
#define KEY_BUTTON_FN -1 // Hotkey Function |
#define EXTRA_BUTTON_MASK GAMEPAD_MASK_L3
#define EXTRA_BUTTON_PIN 5
#define GPIO_PIN_05 GpioAction::BUTTON_PRESS_L3
#endif

View File

@@ -12,25 +12,24 @@
// Main pin mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define PIN_DPAD_UP 2 // UP | UP | UP | UP | UP | UP |
#define PIN_DPAD_DOWN 3 // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define PIN_DPAD_RIGHT 4 // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define PIN_DPAD_LEFT 5 // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define PIN_BUTTON_B1 6 // B1 | A | B | Cross | 2 | K1 |
#define PIN_BUTTON_B2 7 // B2 | B | A | Circle | 3 | K2 |
#define PIN_BUTTON_R2 8 // R2 | RT | ZR | R2 | 8 | K3 |
#define PIN_BUTTON_L2 9 // L2 | LT | ZL | L2 | 7 | K4 |
#define PIN_BUTTON_B3 10 // B3 | X | Y | Square | 1 | P1 |
#define PIN_BUTTON_B4 11 // B4 | Y | X | Triangle | 4 | P2 |
#define PIN_BUTTON_R1 19 // R1 | RB | R | R1 | 6 | P3 |
#define PIN_BUTTON_L1 18 // L1 | LB | L | L1 | 5 | P4 |
#define PIN_BUTTON_S1 16 // S1 | Back | Minus | Select | 9 | Coin |
#define PIN_BUTTON_S2 17 // S2 | Start | Plus | Start | 10 | Start |
#define PIN_BUTTON_L3 12 // L3 | LS | LS | L3 | 11 | LS |
#define PIN_BUTTON_R3 13 // R3 | RS | RS | R3 | 12 | RS |
#define PIN_BUTTON_A1 20 // A1 | Guide | Home | PS | 13 | ~ |
#define PIN_BUTTON_A2 21 // A2 | ~ | Capture | ~ | 14 | ~ |
#define PIN_BUTTON_FN -1 // Hotkey Function |
#define GPIO_PIN_02 GpioAction::BUTTON_PRESS_UP // UP | UP | UP | UP | UP | UP |
#define GPIO_PIN_03 GpioAction::BUTTON_PRESS_DOWN // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define GPIO_PIN_04 GpioAction::BUTTON_PRESS_RIGHT // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define GPIO_PIN_05 GpioAction::BUTTON_PRESS_LEFT // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define GPIO_PIN_06 GpioAction::BUTTON_PRESS_B1 // B1 | A | B | Cross | 2 | K1 |
#define GPIO_PIN_07 GpioAction::BUTTON_PRESS_B2 // B2 | B | A | Circle | 3 | K2 |
#define GPIO_PIN_08 GpioAction::BUTTON_PRESS_R2 // R2 | RT | ZR | R2 | 8 | K3 |
#define GPIO_PIN_09 GpioAction::BUTTON_PRESS_L2 // L2 | LT | ZL | L2 | 7 | K4 |
#define GPIO_PIN_10 GpioAction::BUTTON_PRESS_B3 // B3 | X | Y | Square | 1 | P1 |
#define GPIO_PIN_11 GpioAction::BUTTON_PRESS_B4 // B4 | Y | X | Triangle | 4 | P2 |
#define GPIO_PIN_19 GpioAction::BUTTON_PRESS_R1 // R1 | RB | R | R1 | 6 | P3 |
#define GPIO_PIN_18 GpioAction::BUTTON_PRESS_L1 // L1 | LB | L | L1 | 5 | P4 |
#define GPIO_PIN_16 GpioAction::BUTTON_PRESS_S1 // S1 | Back | Minus | Select | 9 | Coin |
#define GPIO_PIN_17 GpioAction::BUTTON_PRESS_S2 // S2 | Start | Plus | Start | 10 | Start |
#define GPIO_PIN_12 GpioAction::BUTTON_PRESS_L3 // L3 | LS | LS | L3 | 11 | LS |
#define GPIO_PIN_13 GpioAction::BUTTON_PRESS_R3 // R3 | RS | RS | R3 | 12 | RS |
#define GPIO_PIN_20 GpioAction::BUTTON_PRESS_A1 // A1 | Guide | Home | PS | 13 | ~ |
#define GPIO_PIN_21 GpioAction::BUTTON_PRESS_A2 // A2 | ~ | Capture | ~ | 14 | ~ |
// Keyboard Mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
@@ -54,7 +53,8 @@
#define KEY_BUTTON_A2 HID_KEY_F2 // A2 | ~ | Capture | ~ | 14 | ~ |
#define KEY_BUTTON_FN -1 // Hotkey Function |
#define PIN_BUTTON_TURBO 14
#define TURBO_ENABLED 1
#define GPIO_PIN_14 GpioAction::BUTTON_PRESS_TURBO
#define BOARD_LED_ENABLED 1
#define BOARD_LED_TYPE ON_BOARD_LED_MODE_INPUT_TEST

View File

@@ -11,26 +11,25 @@
#define BOARD_CONFIG_LABEL "Reflex Encode v1.2"
// Main pin mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define PIN_DPAD_UP 2 // UP | UP | UP | UP | UP | UP |
#define PIN_DPAD_DOWN 3 // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define PIN_DPAD_RIGHT 4 // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define PIN_DPAD_LEFT 5 // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define PIN_BUTTON_B1 6 // B1 | A | B | Cross | 2 | K1 |
#define PIN_BUTTON_B2 7 // B2 | B | A | Circle | 3 | K2 |
#define PIN_BUTTON_R2 8 // R2 | RT | ZR | R2 | 8 | K3 |
#define PIN_BUTTON_L2 9 // L2 | LT | ZL | L2 | 7 | K4 |
#define PIN_BUTTON_B3 10 // B3 | X | Y | Square | 1 | P1 |
#define PIN_BUTTON_B4 11 // B4 | Y | X | Triangle | 4 | P2 |
#define PIN_BUTTON_R1 12 // R1 | RB | R | R1 | 6 | P3 |
#define PIN_BUTTON_L1 13 // L1 | LB | L | L1 | 5 | P4 |
#define PIN_BUTTON_S1 16 // S1 | Back | Minus | Select | 9 | Coin |
#define PIN_BUTTON_S2 17 // S2 | Start | Plus | Start | 10 | Start |
#define PIN_BUTTON_L3 18 // L3 | LS | LS | L3 | 11 | LS |
#define PIN_BUTTON_R3 19 // R3 | RS | RS | R3 | 12 | RS |
#define PIN_BUTTON_A1 20 // A1 | Guide | Home | PS | 13 | ~ |
#define PIN_BUTTON_A2 21 // A2 | ~ | Capture | ~ | 14 | ~ |
#define PIN_BUTTON_FN -1 // Hotkey Function |
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define GPIO_PIN_02 GpioAction::BUTTON_PRESS_UP // UP | UP | UP | UP | UP | UP |
#define GPIO_PIN_03 GpioAction::BUTTON_PRESS_DOWN // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define GPIO_PIN_04 GpioAction::BUTTON_PRESS_RIGHT // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define GPIO_PIN_05 GpioAction::BUTTON_PRESS_LEFT // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define GPIO_PIN_06 GpioAction::BUTTON_PRESS_B1 // B1 | A | B | Cross | 2 | K1 |
#define GPIO_PIN_07 GpioAction::BUTTON_PRESS_B2 // B2 | B | A | Circle | 3 | K2 |
#define GPIO_PIN_08 GpioAction::BUTTON_PRESS_R2 // R2 | RT | ZR | R2 | 8 | K3 |
#define GPIO_PIN_09 GpioAction::BUTTON_PRESS_L2 // L2 | LT | ZL | L2 | 7 | K4 |
#define GPIO_PIN_10 GpioAction::BUTTON_PRESS_B3 // B3 | X | Y | Square | 1 | P1 |
#define GPIO_PIN_11 GpioAction::BUTTON_PRESS_B4 // B4 | Y | X | Triangle | 4 | P2 |
#define GPIO_PIN_12 GpioAction::BUTTON_PRESS_R1 // R1 | RB | R | R1 | 6 | P3 |
#define GPIO_PIN_13 GpioAction::BUTTON_PRESS_L1 // L1 | LB | L | L1 | 5 | P4 |
#define GPIO_PIN_16 GpioAction::BUTTON_PRESS_S1 // S1 | Back | Minus | Select | 9 | Coin |
#define GPIO_PIN_17 GpioAction::BUTTON_PRESS_S2 // S2 | Start | Plus | Start | 10 | Start |
#define GPIO_PIN_18 GpioAction::BUTTON_PRESS_L3 // L3 | LS | LS | L3 | 11 | LS |
#define GPIO_PIN_19 GpioAction::BUTTON_PRESS_R3 // R3 | RS | RS | R3 | 12 | RS |
#define GPIO_PIN_20 GpioAction::BUTTON_PRESS_A1 // A1 | Guide | Home | PS | 13 | ~ |
#define GPIO_PIN_21 GpioAction::BUTTON_PRESS_A2 // A2 | ~ | Capture | ~ | 14 | ~ | |
// Keyboard Mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
@@ -54,7 +53,8 @@
#define KEY_BUTTON_A2 HID_KEY_F2 // A2 | ~ | Capture | ~ | 14 | ~ |
#define KEY_BUTTON_FN -1 // Hotkey Function |
#define PIN_BUTTON_TURBO 14
#define TURBO_ENABLED 1
#define GPIO_PIN_14 GpioAction::BUTTON_PRESS_TURBO
#define BOARD_LED_ENABLED 1
#define BOARD_LED_TYPE ON_BOARD_LED_MODE_PS_AUTH

View File

@@ -11,26 +11,26 @@
#define BOARD_CONFIG_LABEL "Reflex Encode v2.0"
// Main pin mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define PIN_DPAD_UP 2 // UP | UP | UP | UP | UP | UP |
#define PIN_DPAD_DOWN 3 // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define PIN_DPAD_RIGHT 4 // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define PIN_DPAD_LEFT 5 // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define PIN_BUTTON_B1 6 // B1 | A | B | Cross | 2 | K1 |
#define PIN_BUTTON_B2 7 // B2 | B | A | Circle | 3 | K2 |
#define PIN_BUTTON_R2 8 // R2 | RT | ZR | R2 | 8 | K3 |
#define PIN_BUTTON_L2 9 // L2 | LT | ZL | L2 | 7 | K4 |
#define PIN_BUTTON_B3 10 // B3 | X | Y | Square | 1 | P1 |
#define PIN_BUTTON_B4 11 // B4 | Y | X | Triangle | 4 | P2 |
#define PIN_BUTTON_R1 12 // R1 | RB | R | R1 | 6 | P3 |
#define PIN_BUTTON_L1 13 // L1 | LB | L | L1 | 5 | P4 |
#define PIN_BUTTON_S1 16 // S1 | Back | Minus | Select | 9 | Coin |
#define PIN_BUTTON_S2 17 // S2 | Start | Plus | Start | 10 | Start |
#define PIN_BUTTON_L3 18 // L3 | LS | LS | L3 | 11 | LS |
#define PIN_BUTTON_R3 19 // R3 | RS | RS | R3 | 12 | RS |
#define PIN_BUTTON_A1 20 // A1 | Guide | Home | PS | 13 | ~ |
#define PIN_BUTTON_A2 21 // A2 | ~ | Capture | ~ | 14 | ~ |
#define PIN_BUTTON_FN -1 // Hotkey Function |
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define GPIO_PIN_02 GpioAction::BUTTON_PRESS_UP // UP | UP | UP | UP | UP | UP |
#define GPIO_PIN_03 GpioAction::BUTTON_PRESS_DOWN // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define GPIO_PIN_04 GpioAction::BUTTON_PRESS_RIGHT // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define GPIO_PIN_05 GpioAction::BUTTON_PRESS_LEFT // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define GPIO_PIN_06 GpioAction::BUTTON_PRESS_B1 // B1 | A | B | Cross | 2 | K1 |
#define GPIO_PIN_07 GpioAction::BUTTON_PRESS_B2 // B2 | B | A | Circle | 3 | K2 |
#define GPIO_PIN_08 GpioAction::BUTTON_PRESS_R2 // R2 | RT | ZR | R2 | 8 | K3 |
#define GPIO_PIN_09 GpioAction::BUTTON_PRESS_L2 // L2 | LT | ZL | L2 | 7 | K4 |
#define GPIO_PIN_10 GpioAction::BUTTON_PRESS_B3 // B3 | X | Y | Square | 1 | P1 |
#define GPIO_PIN_11 GpioAction::BUTTON_PRESS_B4 // B4 | Y | X | Triangle | 4 | P2 |
#define GPIO_PIN_12 GpioAction::BUTTON_PRESS_R1 // R1 | RB | R | R1 | 6 | P3 |
#define GPIO_PIN_13 GpioAction::BUTTON_PRESS_L1 // L1 | LB | L | L1 | 5 | P4 |
#define GPIO_PIN_16 GpioAction::BUTTON_PRESS_S1 // S1 | Back | Minus | Select | 9 | Coin |
#define GPIO_PIN_17 GpioAction::BUTTON_PRESS_S2 // S2 | Start | Plus | Start | 10 | Start |
#define GPIO_PIN_18 GpioAction::BUTTON_PRESS_L3 // L3 | LS | LS | L3 | 11 | LS |
#define GPIO_PIN_19 GpioAction::BUTTON_PRESS_R3 // R3 | RS | RS | R3 | 12 | RS |
#define GPIO_PIN_20 GpioAction::BUTTON_PRESS_A1 // A1 | Guide | Home | PS | 13 | ~ |
#define GPIO_PIN_21 GpioAction::BUTTON_PRESS_A2 // A2 | ~ | Capture | ~ | 14 | ~ |
// Keyboard Mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
@@ -63,7 +63,8 @@
#define DEFAULT_INPUT_MODE_R1 INPUT_MODE_XBONE
#define PIN_BUTTON_TURBO 29
#define TURBO_ENABLED 1
#define GPIO_PIN_29 GpioAction::BUTTON_PRESS_TURBO
#define BOARD_LED_ENABLED 1
#define BOARD_LED_TYPE ON_BOARD_LED_MODE_PS_AUTH

View File

@@ -12,26 +12,25 @@
// Main pin mapping Configuration
// Mapping between SGF Bridget and switch number (as silkscreened) and GPIO pin listed under "SGF Bridget SW#"
// // Flatbox Rev4 SW# | GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define PIN_DPAD_UP 16 // SW18 | UP | UP | UP | UP | UP | UP |
#define PIN_DPAD_DOWN 10 // SW8 | DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define PIN_DPAD_RIGHT 11 // SW9 | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define PIN_DPAD_LEFT 9 // SW7 | LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define PIN_BUTTON_B1 19 // SW14 | B1 | A | B | Cross | 2 | K1 |
#define PIN_BUTTON_B2 24 // SW15 | B2 | B | A | Circle | 3 | K2 |
#define PIN_BUTTON_R2 26 // SW16 | R2 | RT | ZR | R2 | 8 | K3 |
#define PIN_BUTTON_L2 28 // SW17 | L2 | LT | ZL | L2 | 7 | K4 |
#define PIN_BUTTON_B3 18 // SW10 | B3 | X | Y | Square | 1 | P1 |
#define PIN_BUTTON_B4 25 // SW11 | B4 | Y | X | Triangle | 4 | P2 |
#define PIN_BUTTON_R1 27 // SW12 | R1 | RB | R | R1 | 6 | P3 |
#define PIN_BUTTON_L1 29 // SW13 | L1 | LB | L | L1 | 5 | P4 |
#define PIN_BUTTON_S1 5 // SW2 | S1 | Back | Minus | Select | 9 | Coin |
#define PIN_BUTTON_S2 6 // SW1 | S2 | Start | Plus | Start | 10 | Start |
#define PIN_BUTTON_L3 2 // SW5 | L3 | LS | LS | L3 | 11 | LS |
#define PIN_BUTTON_R3 1 // SW6 | R3 | RS | RS | R3 | 12 | RS |
#define PIN_BUTTON_A1 4 // SW3 | A1 | Guide | Home | PS | 13 | ~ |
#define PIN_BUTTON_A2 3 // SW4 | A2 | ~ | Capture | ~ | 14 | ~ |
#define PIN_BUTTON_FN -1 // Hotkey Function |
// // Flatbox Rev4 SW# | GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define GPIO_PIN_16 GpioAction::BUTTON_PRESS_UP // UP | UP | UP | UP | UP | UP |
#define GPIO_PIN_10 GpioAction::BUTTON_PRESS_DOWN // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define GPIO_PIN_11 GpioAction::BUTTON_PRESS_RIGHT // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define GPIO_PIN_09 GpioAction::BUTTON_PRESS_LEFT // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define GPIO_PIN_19 GpioAction::BUTTON_PRESS_B1 // B1 | A | B | Cross | 2 | K1 |
#define GPIO_PIN_24 GpioAction::BUTTON_PRESS_B2 // B2 | B | A | Circle | 3 | K2 |
#define GPIO_PIN_26 GpioAction::BUTTON_PRESS_R2 // R2 | RT | ZR | R2 | 8 | K3 |
#define GPIO_PIN_28 GpioAction::BUTTON_PRESS_L2 // L2 | LT | ZL | L2 | 7 | K4 |
#define GPIO_PIN_18 GpioAction::BUTTON_PRESS_B3 // B3 | X | Y | Square | 1 | P1 |
#define GPIO_PIN_25 GpioAction::BUTTON_PRESS_B4 // B4 | Y | X | Triangle | 4 | P2 |
#define GPIO_PIN_27 GpioAction::BUTTON_PRESS_R1 // R1 | RB | R | R1 | 6 | P3 |
#define GPIO_PIN_29 GpioAction::BUTTON_PRESS_L1 // L1 | LB | L | L1 | 5 | P4 |
#define GPIO_PIN_05 GpioAction::BUTTON_PRESS_S1 // S1 | Back | Minus | Select | 9 | Coin |
#define GPIO_PIN_06 GpioAction::BUTTON_PRESS_S2 // S2 | Start | Plus | Start | 10 | Start |
#define GPIO_PIN_02 GpioAction::BUTTON_PRESS_L3 // L3 | LS | LS | L3 | 11 | LS |
#define GPIO_PIN_01 GpioAction::BUTTON_PRESS_R3 // R3 | RS | RS | R3 | 12 | RS |
#define GPIO_PIN_04 GpioAction::BUTTON_PRESS_A1 // A1 | Guide | Home | PS | 13 | ~ |
#define GPIO_PIN_03 GpioAction::BUTTON_PRESS_A2 // A2 | ~ | Capture | ~ | 14 | ~ |
// Keyboard Mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |

View File

@@ -13,25 +13,24 @@
// Main pin mapping Configuration
// Mapping between SGF Faust and switch number (as silkscreened) and GPIO pin listed under "SGF Faust SW#"
// // Flatbox Rev4 SW# | GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define PIN_DPAD_UP 16 // SW18 | UP | UP | UP | UP | UP | UP |
#define PIN_DPAD_DOWN 10 // SW8 | DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define PIN_DPAD_RIGHT 11 // SW9 | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define PIN_DPAD_LEFT 9 // SW7 | LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define PIN_BUTTON_B1 19 // SW14 | B1 | A | B | Cross | 2 | K1 |
#define PIN_BUTTON_B2 24 // SW15 | B2 | B | A | Circle | 3 | K2 |
#define PIN_BUTTON_R2 26 // SW16 | R2 | RT | ZR | R2 | 8 | K3 |
#define PIN_BUTTON_L2 28 // SW17 | L2 | LT | ZL | L2 | 7 | K4 |
#define PIN_BUTTON_B3 18 // SW10 | B3 | X | Y | Square | 1 | P1 |
#define PIN_BUTTON_B4 25 // SW11 | B4 | Y | X | Triangle | 4 | P2 |
#define PIN_BUTTON_R1 27 // SW12 | R1 | RB | R | R1 | 6 | P3 |
#define PIN_BUTTON_L1 29 // SW13 | L1 | LB | L | L1 | 5 | P4 |
#define PIN_BUTTON_S1 5 // SW2 | S1 | Back | Minus | Select | 9 | Coin |
#define PIN_BUTTON_S2 6 // SW1 | S2 | Start | Plus | Start | 10 | Start |
#define PIN_BUTTON_L3 2 // SW5 | L3 | LS | LS | L3 | 11 | LS |
#define PIN_BUTTON_R3 1 // SW6 | R3 | RS | RS | R3 | 12 | RS |
#define PIN_BUTTON_A1 4 // SW3 | A1 | Guide | Home | PS | 13 | ~ |
#define PIN_BUTTON_A2 3 // SW4 | A2 | ~ | Capture | ~ | 14 | ~ |
#define PIN_BUTTON_FN -1 // Hotkey Function |
#define GPIO_PIN_16 GpioAction::BUTTON_PRESS_UP // UP | UP | UP | UP | UP | UP |
#define GPIO_PIN_10 GpioAction::BUTTON_PRESS_DOWN // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define GPIO_PIN_11 GpioAction::BUTTON_PRESS_RIGHT // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define GPIO_PIN_09 GpioAction::BUTTON_PRESS_LEFT // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define GPIO_PIN_19 GpioAction::BUTTON_PRESS_B1 // B1 | A | B | Cross | 2 | K1 |
#define GPIO_PIN_24 GpioAction::BUTTON_PRESS_B2 // B2 | B | A | Circle | 3 | K2 |
#define GPIO_PIN_26 GpioAction::BUTTON_PRESS_R2 // R2 | RT | ZR | R2 | 8 | K3 |
#define GPIO_PIN_28 GpioAction::BUTTON_PRESS_L2 // L2 | LT | ZL | L2 | 7 | K4 |
#define GPIO_PIN_18 GpioAction::BUTTON_PRESS_B3 // B3 | X | Y | Square | 1 | P1 |
#define GPIO_PIN_25 GpioAction::BUTTON_PRESS_B4 // B4 | Y | X | Triangle | 4 | P2 |
#define GPIO_PIN_27 GpioAction::BUTTON_PRESS_R1 // R1 | RB | R | R1 | 6 | P3 |
#define GPIO_PIN_29 GpioAction::BUTTON_PRESS_L1 // L1 | LB | L | L1 | 5 | P4 |
#define GPIO_PIN_05 GpioAction::BUTTON_PRESS_S1 // S1 | Back | Minus | Select | 9 | Coin |
#define GPIO_PIN_06 GpioAction::BUTTON_PRESS_S2 // S2 | Start | Plus | Start | 10 | Start |
#define GPIO_PIN_02 GpioAction::BUTTON_PRESS_L3 // L3 | LS | LS | L3 | 11 | LS |
#define GPIO_PIN_01 GpioAction::BUTTON_PRESS_R3 // R3 | RS | RS | R3 | 12 | RS |
#define GPIO_PIN_04 GpioAction::BUTTON_PRESS_A1 // A1 | Guide | Home | PS | 13 | ~ |
#define GPIO_PIN_03 GpioAction::BUTTON_PRESS_A2 // A2 | ~ | Capture | ~ | 14 | ~ |
// Keyboard Mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |

View File

@@ -7,25 +7,24 @@
// Main pin mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define PIN_DPAD_UP 26 // UP | UP | UP | UP | UP | UP |
#define PIN_DPAD_DOWN 27 // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define PIN_DPAD_RIGHT 29 // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define PIN_DPAD_LEFT 28 // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define PIN_BUTTON_B1 3 // B1 | A | B | Cross | 2 | K1 |
#define PIN_BUTTON_B2 2 // B2 | B | A | Circle | 3 | K2 |
#define PIN_BUTTON_R2 21 // R2 | RT | ZR | R2 | 8 | K3 |
#define PIN_BUTTON_L2 6 // L2 | LT | ZL | L2 | 7 | K4 |
#define PIN_BUTTON_B3 0 // B3 | X | Y | Square | 1 | P1 |
#define PIN_BUTTON_B4 1 // B4 | Y | X | Triangle | 4 | P2 |
#define PIN_BUTTON_R1 22 // R1 | RB | R | R1 | 6 | P3 |
#define PIN_BUTTON_L1 4 // L1 | LB | L | L1 | 5 | P4 |
#define PIN_BUTTON_S1 23 // S1 | Back | Minus | Select | 9 | Coin |
#define PIN_BUTTON_S2 20 // S2 | Start | Plus | Start | 10 | Start |
#define PIN_BUTTON_L3 -1 // L3 | LS | LS | L3 | 11 | LS |
#define PIN_BUTTON_R3 -1 // R3 | RS | RS | R3 | 12 | RS |
#define PIN_BUTTON_A1 7 // A1 | Guide | Home | PS | 13 | ~ |
#define PIN_BUTTON_A2 8 // A2 | ~ | Capture | ~ | 14 | ~ |
#define PIN_BUTTON_FN -1 // Hotkey Function |
#define GPIO_PIN_26 GpioAction::BUTTON_PRESS_UP // UP | UP | UP | UP | UP | UP |
#define GPIO_PIN_27 GpioAction::BUTTON_PRESS_DOWN // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define GPIO_PIN_29 GpioAction::BUTTON_PRESS_RIGHT // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define GPIO_PIN_28 GpioAction::BUTTON_PRESS_LEFT // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define GPIO_PIN_03 GpioAction::BUTTON_PRESS_B1 // B1 | A | B | Cross | 2 | K1 |
#define GPIO_PIN_02 GpioAction::BUTTON_PRESS_B2 // B2 | B | A | Circle | 3 | K2 |
#define GPIO_PIN_21 GpioAction::BUTTON_PRESS_R2 // R2 | RT | ZR | R2 | 8 | K3 |
#define GPIO_PIN_06 GpioAction::BUTTON_PRESS_L2 // L2 | LT | ZL | L2 | 7 | K4 |
#define GPIO_PIN_00 GpioAction::BUTTON_PRESS_B3 // B3 | X | Y | Square | 1 | P1 |
#define GPIO_PIN_01 GpioAction::BUTTON_PRESS_B4 // B4 | Y | X | Triangle | 4 | P2 |
#define GPIO_PIN_22 GpioAction::BUTTON_PRESS_R1 // R1 | RB | R | R1 | 6 | P3 |
#define GPIO_PIN_04 GpioAction::BUTTON_PRESS_L1 // L1 | LB | L | L1 | 5 | P4 |
#define GPIO_PIN_23 GpioAction::BUTTON_PRESS_S1 // S1 | Back | Minus | Select | 9 | Coin |
#define GPIO_PIN_20 GpioAction::BUTTON_PRESS_S2 // S2 | Start | Plus | Start | 10 | Start |
//#define GPIO_PIN_XX GpioAction::BUTTON_PRESS_L3 // L3 | LS | LS | L3 | 11 | LS |
//#define GPIO_PIN_XX GpioAction::BUTTON_PRESS_R3 // R3 | RS | RS | R3 | 12 | RS |
#define GPIO_PIN_07 GpioAction::BUTTON_PRESS_A1 // A1 | Guide | Home | PS | 13 | ~ |
#define GPIO_PIN_08 GpioAction::BUTTON_PRESS_A2 // A2 | ~ | Capture | ~ | 14 | ~ |
// Keyboard Mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |

View File

@@ -11,26 +11,25 @@
#define BOARD_CONFIG_LABEL "Stress"
// Main pin mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define PIN_DPAD_UP 26 // UP | UP | UP | UP | UP | UP |
#define PIN_DPAD_DOWN 28 // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define PIN_DPAD_RIGHT 27 // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define PIN_DPAD_LEFT 29 // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define PIN_BUTTON_B1 1 // B1 | A | B | Cross | 2 | K1 |
#define PIN_BUTTON_B2 3 // B2 | B | A | Circle | 3 | K2 |
#define PIN_BUTTON_R2 7 // R2 | RT | ZR | R2 | 8 | K3 |
#define PIN_BUTTON_L2 6 // L2 | LT | ZL | L2 | 7 | K4 |
#define PIN_BUTTON_B3 0 // B3 | X | Y | Square | 1 | P1 |
#define PIN_BUTTON_B4 3 // B4 | Y | X | Triangle | 4 | P2 |
#define PIN_BUTTON_R1 4 // R1 | RB | R | R1 | 6 | P3 |
#define PIN_BUTTON_L1 5 // L1 | LB | L | L1 | 5 | P4 |
#define PIN_BUTTON_S1 8 // S1 | Back | Minus | Select | 9 | Coin |
#define PIN_BUTTON_S2 9 // S2 | Start | Plus | Start | 10 | Start |
#define PIN_BUTTON_L3 12 // L3 | LS | LS | L3 | 11 | LS |
#define PIN_BUTTON_R3 13 // R3 | RS | RS | R3 | 12 | RS |
#define PIN_BUTTON_A1 14 // A1 | Guide | Home | PS | 13 | ~ |
#define PIN_BUTTON_A2 15 // A2 | ~ | Capture | ~ | 14 | ~ |
#define PIN_BUTTON_FN -1 // Hotkey Function |
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define GPIO_PIN_26 GpioAction::BUTTON_PRESS_UP // UP | UP | UP | UP | UP | UP |
#define GPIO_PIN_28 GpioAction::BUTTON_PRESS_DOWN // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define GPIO_PIN_27 GpioAction::BUTTON_PRESS_RIGHT // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define GPIO_PIN_29 GpioAction::BUTTON_PRESS_LEFT // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define GPIO_PIN_01 GpioAction::BUTTON_PRESS_B1 // B1 | A | B | Cross | 2 | K1 |
#define GPIO_PIN_03 GpioAction::BUTTON_PRESS_B2 // B2 | B | A | Circle | 3 | K2 |
#define GPIO_PIN_07 GpioAction::BUTTON_PRESS_R2 // R2 | RT | ZR | R2 | 8 | K3 |
#define GPIO_PIN_06 GpioAction::BUTTON_PRESS_L2 // L2 | LT | ZL | L2 | 7 | K4 |
#define GPIO_PIN_00 GpioAction::BUTTON_PRESS_B3 // B3 | X | Y | Square | 1 | P1 |
#define GPIO_PIN_03 GpioAction::BUTTON_PRESS_B4 // B4 | Y | X | Triangle | 4 | P2 |
#define GPIO_PIN_04 GpioAction::BUTTON_PRESS_R1 // R1 | RB | R | R1 | 6 | P3 |
#define GPIO_PIN_05 GpioAction::BUTTON_PRESS_L1 // L1 | LB | L | L1 | 5 | P4 |
#define GPIO_PIN_08 GpioAction::BUTTON_PRESS_S1 // S1 | Back | Minus | Select | 9 | Coin |
#define GPIO_PIN_09 GpioAction::BUTTON_PRESS_S2 // S2 | Start | Plus | Start | 10 | Start |
#define GPIO_PIN_12 GpioAction::BUTTON_PRESS_L3 // L3 | LS | LS | L3 | 11 | LS |
#define GPIO_PIN_13 GpioAction::BUTTON_PRESS_R3 // R3 | RS | RS | R3 | 12 | RS |
#define GPIO_PIN_14 GpioAction::BUTTON_PRESS_A1 // A1 | Guide | Home | PS | 13 | ~ |
#define GPIO_PIN_15 GpioAction::BUTTON_PRESS_A2 // A2 | ~ | Capture | ~ | 14 | ~ |
// Keyboard Mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |

View File

@@ -11,26 +11,25 @@
#define BOARD_CONFIG_LABEL "Waveshare Zero"
// Main pin mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define PIN_DPAD_UP 2 // UP | UP | UP | UP | UP | UP |
#define PIN_DPAD_DOWN 3 // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define PIN_DPAD_RIGHT 4 // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define PIN_DPAD_LEFT 5 // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define PIN_BUTTON_B1 6 // B1 | A | B | Cross | 2 | K1 |
#define PIN_BUTTON_B2 7 // B2 | B | A | Circle | 3 | K2 |
#define PIN_BUTTON_R2 8 // R2 | RT | ZR | R2 | 8 | K3 |
#define PIN_BUTTON_L2 9 // L2 | LT | ZL | L2 | 7 | K4 |
#define PIN_BUTTON_B3 10 // B3 | X | Y | Square | 1 | P1 |
#define PIN_BUTTON_B4 11 // B4 | Y | X | Triangle | 4 | P2 |
#define PIN_BUTTON_R1 12 // R1 | RB | R | R1 | 6 | P3 |
#define PIN_BUTTON_L1 13 // L1 | LB | L | L1 | 5 | P4 |
#define PIN_BUTTON_S1 0 // S1 | Back | Minus | Select | 9 | Coin |
#define PIN_BUTTON_S2 1 // S2 | Start | Plus | Start | 10 | Start |
#define PIN_BUTTON_L3 26 // L3 | LS | LS | L3 | 11 | LS |
#define PIN_BUTTON_R3 27 // R3 | RS | RS | R3 | 12 | RS |
#define PIN_BUTTON_A1 14 // A1 | Guide | Home | PS | 13 | ~ |
#define PIN_BUTTON_A2 15 // A2 | ~ | Capture | ~ | 14 | ~ |
#define PIN_BUTTON_FN -1 // Hotkey Function |
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |
#define GPIO_PIN_02 GpioAction::BUTTON_PRESS_UP // UP | UP | UP | UP | UP | UP |
#define GPIO_PIN_03 GpioAction::BUTTON_PRESS_DOWN // DOWN | DOWN | DOWN | DOWN | DOWN | DOWN |
#define GPIO_PIN_04 GpioAction::BUTTON_PRESS_RIGHT // RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT |
#define GPIO_PIN_05 GpioAction::BUTTON_PRESS_LEFT // LEFT | LEFT | LEFT | LEFT | LEFT | LEFT |
#define GPIO_PIN_06 GpioAction::BUTTON_PRESS_B1 // B1 | A | B | Cross | 2 | K1 |
#define GPIO_PIN_07 GpioAction::BUTTON_PRESS_B2 // B2 | B | A | Circle | 3 | K2 |
#define GPIO_PIN_08 GpioAction::BUTTON_PRESS_R2 // R2 | RT | ZR | R2 | 8 | K3 |
#define GPIO_PIN_09 GpioAction::BUTTON_PRESS_L2 // L2 | LT | ZL | L2 | 7 | K4 |
#define GPIO_PIN_10 GpioAction::BUTTON_PRESS_B3 // B3 | X | Y | Square | 1 | P1 |
#define GPIO_PIN_11 GpioAction::BUTTON_PRESS_B4 // B4 | Y | X | Triangle | 4 | P2 |
#define GPIO_PIN_12 GpioAction::BUTTON_PRESS_R1 // R1 | RB | R | R1 | 6 | P3 |
#define GPIO_PIN_13 GpioAction::BUTTON_PRESS_L1 // L1 | LB | L | L1 | 5 | P4 |
#define GPIO_PIN_00 GpioAction::BUTTON_PRESS_S1 // S1 | Back | Minus | Select | 9 | Coin |
#define GPIO_PIN_01 GpioAction::BUTTON_PRESS_S2 // S2 | Start | Plus | Start | 10 | Start |
#define GPIO_PIN_26 GpioAction::BUTTON_PRESS_L3 // L3 | LS | LS | L3 | 11 | LS |
#define GPIO_PIN_27 GpioAction::BUTTON_PRESS_R3 // R3 | RS | RS | R3 | 12 | RS |
#define GPIO_PIN_14 GpioAction::BUTTON_PRESS_A1 // A1 | Guide | Home | PS | 13 | ~ |
#define GPIO_PIN_15 GpioAction::BUTTON_PRESS_A2 // A2 | ~ | Capture | ~ | 14 | ~ |
// Keyboard Mapping Configuration
// // GP2040 | Xinput | Switch | PS3/4/5 | Dinput | Arcade |

View File

@@ -18,22 +18,6 @@ enum DualDirectionalCombinationMode
#define DUAL_DIRECTIONAL_ENABLED 0
#endif
#ifndef PIN_DUAL_DIRECTIONAL_UP
#define PIN_DUAL_DIRECTIONAL_UP -1
#endif
#ifndef PIN_DUAL_DIRECTIONAL_DOWN
#define PIN_DUAL_DIRECTIONAL_DOWN -1
#endif
#ifndef PIN_DUAL_DIRECTIONAL_LEFT
#define PIN_DUAL_DIRECTIONAL_LEFT -1
#endif
#ifndef PIN_DUAL_DIRECTIONAL_RIGHT
#define PIN_DUAL_DIRECTIONAL_RIGHT -1
#endif
#ifndef DUAL_DIRECTIONAL_STICK_MODE
#define DUAL_DIRECTIONAL_STICK_MODE DPAD_MODE_DIGITAL
#endif

View File

@@ -10,14 +10,6 @@
#define JSLIDER_ENABLED 0
#endif
#ifndef PIN_SLIDER_ONE
#define PIN_SLIDER_ONE -1
#endif
#ifndef PIN_SLIDER_TWO
#define PIN_SLIDER_TWO -1
#endif
#ifndef SLIDER_MODE_ONE
#define SLIDER_MODE_ONE DPAD_MODE_LEFT_ANALOG
#endif

View File

@@ -10,14 +10,6 @@
#define SLIDER_SOCD_ENABLED 0
#endif
#ifndef PIN_SLIDER_SOCD_ONE
#define PIN_SLIDER_SOCD_ONE -1
#endif
#ifndef PIN_SLIDER_SOCD_TWO
#define PIN_SLIDER_SOCD_TWO -1
#endif
#ifndef SLIDER_SOCD_SLOT_ONE
#define SLIDER_SOCD_SLOT_ONE SOCD_MODE_UP_PRIORITY
#endif

View File

@@ -17,11 +17,6 @@
#define TURBO_BUTTON_MASK (GAMEPAD_MASK_B1 | GAMEPAD_MASK_B2 | GAMEPAD_MASK_B3 | GAMEPAD_MASK_B4 | \
GAMEPAD_MASK_L1 | GAMEPAD_MASK_R1 | GAMEPAD_MASK_L2 | GAMEPAD_MASK_R2)
// TURBO BUTTON
#ifndef PIN_BUTTON_TURBO
#define PIN_BUTTON_TURBO -1
#endif
// TURBO LED
#ifndef TURBO_LED_PIN
#define TURBO_LED_PIN -1
@@ -102,6 +97,7 @@ private:
void read(const TurboOptions&); // Read TURBO Buttons and Dials
void debounce(); // TURBO Button Debouncer
void updateTurboShotCount(uint8_t turboShotCount);
Pin_t turboPin; // Pin for Turbo from Gamepad/BoardConfig
bool bDebState; // Debounce TURBO Button State
uint32_t uDebTime; // Debounce TURBO Button Time
uint32_t debChargeState; // Debounce Charge Button State

View File

@@ -3,80 +3,3 @@
#include "pico/binary_info/code.h"
#include "BoardConfig.h"
// generate binary information for picotool info, etc.
#if(PIN_DPAD_UP >= 0)
bi_decl(bi_1pin_with_name(PIN_DPAD_UP, "Up"));
#endif
#if(PIN_DPAD_DOWN >= 0)
bi_decl(bi_1pin_with_name(PIN_DPAD_DOWN, "Down"));
#endif
#if(PIN_DPAD_LEFT >= 0)
bi_decl(bi_1pin_with_name(PIN_DPAD_LEFT, "Left"));
#endif
#if(PIN_DPAD_RIGHT >= 0)
bi_decl(bi_1pin_with_name(PIN_DPAD_RIGHT, "Right"));
#endif
#if(PIN_BUTTON_B1 >= 0)
bi_decl(bi_1pin_with_name(PIN_BUTTON_B1, "B1"));
#endif
#if(PIN_BUTTON_B2 >= 0)
bi_decl(bi_1pin_with_name(PIN_BUTTON_B2, "B2"));
#endif
#if(PIN_BUTTON_B3 >= 0)
bi_decl(bi_1pin_with_name(PIN_BUTTON_B3, "B3"));
#endif
#if(PIN_BUTTON_B4 >= 0)
bi_decl(bi_1pin_with_name(PIN_BUTTON_B4, "B4"));
#endif
#if(PIN_BUTTON_L1 >= 0)
bi_decl(bi_1pin_with_name(PIN_BUTTON_L1, "L1"));
#endif
#if(PIN_BUTTON_R1 >= 0)
bi_decl(bi_1pin_with_name(PIN_BUTTON_R1, "R1"));
#endif
#if(PIN_BUTTON_L2 >= 0)
bi_decl(bi_1pin_with_name(PIN_BUTTON_L2, "L2"));
#endif
#if(PIN_BUTTON_R2 >= 0)
bi_decl(bi_1pin_with_name(PIN_BUTTON_R2, "R2"));
#endif
#if(PIN_BUTTON_S1 >= 0)
bi_decl(bi_1pin_with_name(PIN_BUTTON_S1, "S1"));
#endif
#if(PIN_BUTTON_S2 >= 0)
bi_decl(bi_1pin_with_name(PIN_BUTTON_S2, "S2"));
#endif
#if(PIN_BUTTON_L3 >= 0)
bi_decl(bi_1pin_with_name(PIN_BUTTON_L3, "L3"));
#endif
#if(PIN_BUTTON_R3 >= 0)
bi_decl(bi_1pin_with_name(PIN_BUTTON_R3, "R3"));
#endif
#if(PIN_BUTTON_A1 >= 0)
bi_decl(bi_1pin_with_name(PIN_BUTTON_A1, "A1"));
#endif
#if(PIN_BUTTON_A2 >= 0)
bi_decl(bi_1pin_with_name(PIN_BUTTON_A2, "A2"));
#endif
#if(PIN_BUTTON_FN >= 0)
bi_decl(bi_1pin_with_name(PIN_BUTTON_FN, "Fn"));
#endif

View File

@@ -349,7 +349,7 @@ message TurboOptions
{
optional bool enabled = 1;
optional int32 buttonPin = 2;
optional int32 deprecatedButtonPin = 2 [deprecated = true];
optional int32 ledPin = 3;
optional uint32 shotCount = 4;
optional int32 shmupDialPin = 5;

View File

@@ -169,6 +169,7 @@ enum GpioAction
SUSTAIN_SOCD_MODE_SECOND_WIN = 29;
SUSTAIN_SOCD_MODE_FIRST_WIN = 30;
SUSTAIN_SOCD_MODE_BYPASS = 31;
BUTTON_PRESS_TURBO = 32;
}
enum GamepadHotkey

View File

@@ -1069,7 +1069,7 @@ void I2CDisplayAddon::drawStatusBar(Gamepad * gamepad)
case INPUT_MODE_CONFIG: statusBar += "CONFIG"; break;
}
if ( turboOptions.enabled && isValidPin(turboOptions.buttonPin) ) {
if ( turboOptions.enabled ) {
statusBar += " T";
if ( turboOptions.shotCount < 10 ) // padding
statusBar += "0";

View File

@@ -21,11 +21,14 @@ void TurboInput::setup()
Gamepad * gamepad = Storage::getInstance().GetGamepad();
uint32_t now = getMillis();
// Setup TURBO Key GPIO
if ( isValidPin(options.buttonPin) ) {
gpio_init( options.buttonPin); // Initialize pin
gpio_set_dir( options.buttonPin, GPIO_IN); // Set as INPUT
gpio_pull_up( options.buttonPin); // Set as PULLUP
// Turbo Button initialized by void Gamepad::setup()
GpioAction* pinMappings = Storage::getInstance().getProfilePinMappings();
for (Pin_t pin = 0; pin < (Pin_t)NUM_BANK0_GPIOS; pin++)
{
if ( pinMappings[pin] == GpioAction::BUTTON_PRESS_TURBO ) {
turboPin = pin;
break;
}
}
// Turbo Dial
@@ -103,7 +106,7 @@ void TurboInput::read(const TurboOptions & options)
}
// Get TURBO Key State
bTurboState = !gpio_get(options.buttonPin);
bTurboState = !gpio_get(turboPin);
}
void TurboInput::debounce()

View File

@@ -1040,7 +1040,7 @@ bool ConfigUtils::fromLegacyStorage(Config& config)
TurboOptions& turboOptions = config.addonOptions.turboOptions;
config.addonOptions.has_turboOptions = true;
SET_PROPERTY(turboOptions, enabled, legacyAddonOptions.TurboInputEnabled);
SET_PROPERTY(turboOptions, buttonPin, bytePinToIntPin(legacyAddonOptions.pinButtonTurbo));
SET_PROPERTY(turboOptions, deprecatedButtonPin, bytePinToIntPin(legacyAddonOptions.pinButtonTurbo));
SET_PROPERTY(turboOptions, ledPin, bytePinToIntPin(legacyAddonOptions.pinTurboLED));
SET_PROPERTY(turboOptions, shotCount, legacyAddonOptions.turboShotCount);
SET_PROPERTY(turboOptions, shmupDialPin, bytePinToIntPin(legacyAddonOptions.pinShmupDial));

View File

@@ -116,6 +116,97 @@
#define DEFAULT_LOCK_HOTKEYS false
#endif
#ifndef GPIO_PIN_00
#define GPIO_PIN_00 GpioAction::NONE
#endif
#ifndef GPIO_PIN_01
#define GPIO_PIN_01 GpioAction::NONE
#endif
#ifndef GPIO_PIN_02
#define GPIO_PIN_02 GpioAction::NONE
#endif
#ifndef GPIO_PIN_03
#define GPIO_PIN_03 GpioAction::NONE
#endif
#ifndef GPIO_PIN_04
#define GPIO_PIN_04 GpioAction::NONE
#endif
#ifndef GPIO_PIN_05
#define GPIO_PIN_05 GpioAction::NONE
#endif
#ifndef GPIO_PIN_06
#define GPIO_PIN_06 GpioAction::NONE
#endif
#ifndef GPIO_PIN_07
#define GPIO_PIN_07 GpioAction::NONE
#endif
#ifndef GPIO_PIN_08
#define GPIO_PIN_08 GpioAction::NONE
#endif
#ifndef GPIO_PIN_09
#define GPIO_PIN_09 GpioAction::NONE
#endif
#ifndef GPIO_PIN_10
#define GPIO_PIN_10 GpioAction::NONE
#endif
#ifndef GPIO_PIN_11
#define GPIO_PIN_11 GpioAction::NONE
#endif
#ifndef GPIO_PIN_12
#define GPIO_PIN_12 GpioAction::NONE
#endif
#ifndef GPIO_PIN_13
#define GPIO_PIN_13 GpioAction::NONE
#endif
#ifndef GPIO_PIN_14
#define GPIO_PIN_14 GpioAction::NONE
#endif
#ifndef GPIO_PIN_15
#define GPIO_PIN_15 GpioAction::NONE
#endif
#ifndef GPIO_PIN_16
#define GPIO_PIN_16 GpioAction::NONE
#endif
#ifndef GPIO_PIN_17
#define GPIO_PIN_17 GpioAction::NONE
#endif
#ifndef GPIO_PIN_18
#define GPIO_PIN_18 GpioAction::NONE
#endif
#ifndef GPIO_PIN_19
#define GPIO_PIN_19 GpioAction::NONE
#endif
#ifndef GPIO_PIN_20
#define GPIO_PIN_20 GpioAction::NONE
#endif
#ifndef GPIO_PIN_21
#define GPIO_PIN_21 GpioAction::NONE
#endif
#ifndef GPIO_PIN_22
#define GPIO_PIN_22 GpioAction::NONE
#endif
#ifndef GPIO_PIN_23
#define GPIO_PIN_23 GpioAction::NONE
#endif
#ifndef GPIO_PIN_24
#define GPIO_PIN_24 GpioAction::NONE
#endif
#ifndef GPIO_PIN_25
#define GPIO_PIN_25 GpioAction::NONE
#endif
#ifndef GPIO_PIN_26
#define GPIO_PIN_26 GpioAction::NONE
#endif
#ifndef GPIO_PIN_27
#define GPIO_PIN_27 GpioAction::NONE
#endif
#ifndef GPIO_PIN_28
#define GPIO_PIN_28 GpioAction::NONE
#endif
#ifndef GPIO_PIN_29
#define GPIO_PIN_29 GpioAction::NONE
#endif
// -----------------------------------------------------
// Migration leftovers
// -----------------------------------------------------
@@ -419,7 +510,7 @@ void ConfigUtils::initUnsetPropertiesWithDefaults(Config& config)
// addonOptions.turboOptions
INIT_UNSET_PROPERTY(config.addonOptions.turboOptions, enabled, !!TURBO_ENABLED);
INIT_UNSET_PROPERTY(config.addonOptions.turboOptions, buttonPin, PIN_BUTTON_TURBO);
INIT_UNSET_PROPERTY(config.addonOptions.turboOptions, deprecatedButtonPin, (Pin_t)-1);
INIT_UNSET_PROPERTY(config.addonOptions.turboOptions, ledPin, TURBO_LED_PIN);
INIT_UNSET_PROPERTY(config.addonOptions.turboOptions, shotCount, DEFAULT_SHOT_PER_SEC);
INIT_UNSET_PROPERTY(config.addonOptions.turboOptions, shmupDialPin, PIN_SHMUP_DIAL);
@@ -440,15 +531,15 @@ void ConfigUtils::initUnsetPropertiesWithDefaults(Config& config)
// addonOptions.sliderOptions
INIT_UNSET_PROPERTY(config.addonOptions.sliderOptions, enabled, !!JSLIDER_ENABLED);
INIT_UNSET_PROPERTY(config.addonOptions.sliderOptions, deprecatedPinSliderOne, PIN_SLIDER_ONE);
INIT_UNSET_PROPERTY(config.addonOptions.sliderOptions, deprecatedPinSliderTwo, PIN_SLIDER_TWO);
INIT_UNSET_PROPERTY(config.addonOptions.sliderOptions, deprecatedPinSliderOne, (Pin_t)-1);
INIT_UNSET_PROPERTY(config.addonOptions.sliderOptions, deprecatedPinSliderTwo, (Pin_t)-1);
INIT_UNSET_PROPERTY(config.addonOptions.sliderOptions, deprecatedModeOne, SLIDER_MODE_ONE);
INIT_UNSET_PROPERTY(config.addonOptions.sliderOptions, deprecatedModeTwo, SLIDER_MODE_TWO);
INIT_UNSET_PROPERTY(config.addonOptions.sliderOptions, modeDefault, SLIDER_MODE_ZERO);
// addonOptions.reverseOptions
INIT_UNSET_PROPERTY(config.addonOptions.reverseOptions, enabled, !!REVERSE_ENABLED);
INIT_UNSET_PROPERTY(config.addonOptions.reverseOptions, buttonPin, PIN_REVERSE);
INIT_UNSET_PROPERTY(config.addonOptions.reverseOptions, buttonPin, (Pin_t)-1);
INIT_UNSET_PROPERTY(config.addonOptions.reverseOptions, ledPin, REVERSE_LED_PIN);
INIT_UNSET_PROPERTY(config.addonOptions.reverseOptions, actionUp, REVERSE_UP_DEFAULT);
INIT_UNSET_PROPERTY(config.addonOptions.reverseOptions, actionDown, REVERSE_DOWN_DEFAULT);
@@ -457,8 +548,8 @@ void ConfigUtils::initUnsetPropertiesWithDefaults(Config& config)
// addonOptions.socdSliderOptions
INIT_UNSET_PROPERTY(config.addonOptions.socdSliderOptions, enabled, !!SLIDER_SOCD_ENABLED);
INIT_UNSET_PROPERTY(config.addonOptions.socdSliderOptions, deprecatedPinOne, PIN_SLIDER_SOCD_ONE);
INIT_UNSET_PROPERTY(config.addonOptions.socdSliderOptions, deprecatedPinTwo, PIN_SLIDER_SOCD_TWO);
INIT_UNSET_PROPERTY(config.addonOptions.socdSliderOptions, deprecatedPinOne, (Pin_t)-1);
INIT_UNSET_PROPERTY(config.addonOptions.socdSliderOptions, deprecatedPinTwo, (Pin_t)-1);
INIT_UNSET_PROPERTY(config.addonOptions.socdSliderOptions, modeDefault, SLIDER_SOCD_SLOT_DEFAULT);
INIT_UNSET_PROPERTY(config.addonOptions.socdSliderOptions, deprecatedModeOne, SLIDER_SOCD_SLOT_ONE);
INIT_UNSET_PROPERTY(config.addonOptions.socdSliderOptions, deprecatedModeTwo, SLIDER_SOCD_SLOT_TWO);
@@ -473,15 +564,15 @@ void ConfigUtils::initUnsetPropertiesWithDefaults(Config& config)
// addonOptions.dualDirectionalOptions
INIT_UNSET_PROPERTY(config.addonOptions.dualDirectionalOptions, enabled, !!DUAL_DIRECTIONAL_ENABLED);
INIT_UNSET_PROPERTY(config.addonOptions.dualDirectionalOptions, deprecatedUpPin, PIN_DUAL_DIRECTIONAL_UP);
INIT_UNSET_PROPERTY(config.addonOptions.dualDirectionalOptions, deprecatedDownPin, PIN_DUAL_DIRECTIONAL_DOWN)
INIT_UNSET_PROPERTY(config.addonOptions.dualDirectionalOptions, deprecatedLeftPin, PIN_DUAL_DIRECTIONAL_LEFT);
INIT_UNSET_PROPERTY(config.addonOptions.dualDirectionalOptions, deprecatedRightPin, PIN_DUAL_DIRECTIONAL_RIGHT);
INIT_UNSET_PROPERTY(config.addonOptions.dualDirectionalOptions, deprecatedUpPin, (Pin_t)-1);
INIT_UNSET_PROPERTY(config.addonOptions.dualDirectionalOptions, deprecatedDownPin, (Pin_t)-1)
INIT_UNSET_PROPERTY(config.addonOptions.dualDirectionalOptions, deprecatedLeftPin, (Pin_t)-1);
INIT_UNSET_PROPERTY(config.addonOptions.dualDirectionalOptions, deprecatedRightPin, (Pin_t)-1);
INIT_UNSET_PROPERTY(config.addonOptions.dualDirectionalOptions, dpadMode, static_cast<DpadMode>(DUAL_DIRECTIONAL_STICK_MODE));
INIT_UNSET_PROPERTY(config.addonOptions.dualDirectionalOptions, combineMode, DUAL_DIRECTIONAL_COMBINE_MODE);
INIT_UNSET_PROPERTY(config.addonOptions.dualDirectionalOptions, fourWayMode, false);
// addonOptions.tiltOptions
// addonOptions.tiltOptions
INIT_UNSET_PROPERTY(config.addonOptions.tiltOptions, enabled, !!TILT_ENABLED);
INIT_UNSET_PROPERTY(config.addonOptions.tiltOptions, tilt1Pin, PIN_TILT_1);
INIT_UNSET_PROPERTY(config.addonOptions.tiltOptions, factorTilt1LeftX, TILT1_FACTOR_LEFT_X);
@@ -674,77 +765,57 @@ void gpioMappingsMigrationCore(Config& config)
if (isValidPin(gpPin)) actions[gpPin] = GpioAction::ASSIGNED_TO_ADDON;
};
const auto fromPBorBC = [&](bool isInProtobuf, Pin_t *protobufEntry, Pin_t boardconfigValue,
GpioAction action) -> void {
// From Protobuf or Board Config
const auto fromProtoBuf = [&](bool isInProtobuf, Pin_t *protobufEntry, GpioAction action) -> void {
// get the core config value for a pin either from protobuf or, failing that, BoardConfig.h
if (isInProtobuf) {
if (*protobufEntry >= 0 && *protobufEntry < 30) {
actions[*protobufEntry] = action;
*protobufEntry = -1;
}
} else if (isValidPin(boardconfigValue)) {
actions[boardconfigValue] = action;
}
};
fromPBorBC(deprecatedPinMappings.has_pinDpadUp, &deprecatedPinMappings.pinDpadUp, PIN_DPAD_UP,
GpioAction::BUTTON_PRESS_UP);
fromPBorBC(deprecatedPinMappings.has_pinDpadDown, &deprecatedPinMappings.pinDpadDown, PIN_DPAD_DOWN,
GpioAction::BUTTON_PRESS_DOWN);
fromPBorBC(deprecatedPinMappings.has_pinDpadLeft, &deprecatedPinMappings.pinDpadLeft, PIN_DPAD_LEFT,
GpioAction::BUTTON_PRESS_LEFT);
fromPBorBC(deprecatedPinMappings.has_pinDpadRight, &deprecatedPinMappings.pinDpadRight, PIN_DPAD_RIGHT,
GpioAction::BUTTON_PRESS_RIGHT);
fromPBorBC(deprecatedPinMappings.has_pinButtonB1, &deprecatedPinMappings.pinButtonB1, PIN_BUTTON_B1,
GpioAction::BUTTON_PRESS_B1);
fromPBorBC(deprecatedPinMappings.has_pinButtonB2, &deprecatedPinMappings.pinButtonB2, PIN_BUTTON_B2,
GpioAction::BUTTON_PRESS_B2);
fromPBorBC(deprecatedPinMappings.has_pinButtonB3, &deprecatedPinMappings.pinButtonB3, PIN_BUTTON_B3,
GpioAction::BUTTON_PRESS_B3);
fromPBorBC(deprecatedPinMappings.has_pinButtonB4, &deprecatedPinMappings.pinButtonB4, PIN_BUTTON_B4,
GpioAction::BUTTON_PRESS_B4);
fromPBorBC(deprecatedPinMappings.has_pinButtonL1, &deprecatedPinMappings.pinButtonL1, PIN_BUTTON_L1,
GpioAction::BUTTON_PRESS_L1);
fromPBorBC(deprecatedPinMappings.has_pinButtonR1, &deprecatedPinMappings.pinButtonR1, PIN_BUTTON_R1,
GpioAction::BUTTON_PRESS_R1);
fromPBorBC(deprecatedPinMappings.has_pinButtonL2, &deprecatedPinMappings.pinButtonL2, PIN_BUTTON_L2,
GpioAction::BUTTON_PRESS_L2);
fromPBorBC(deprecatedPinMappings.has_pinButtonR2, &deprecatedPinMappings.pinButtonR2, PIN_BUTTON_R2,
GpioAction::BUTTON_PRESS_R2);
fromPBorBC(deprecatedPinMappings.has_pinButtonS1, &deprecatedPinMappings.pinButtonS1, PIN_BUTTON_S1,
GpioAction::BUTTON_PRESS_S1);
fromPBorBC(deprecatedPinMappings.has_pinButtonS2, &deprecatedPinMappings.pinButtonS2, PIN_BUTTON_S2,
GpioAction::BUTTON_PRESS_S2);
fromPBorBC(deprecatedPinMappings.has_pinButtonL3, &deprecatedPinMappings.pinButtonL3, PIN_BUTTON_L3,
GpioAction::BUTTON_PRESS_L3);
fromPBorBC(deprecatedPinMappings.has_pinButtonR3, &deprecatedPinMappings.pinButtonR3, PIN_BUTTON_R3,
GpioAction::BUTTON_PRESS_R3);
fromPBorBC(deprecatedPinMappings.has_pinButtonA1, &deprecatedPinMappings.pinButtonA1, PIN_BUTTON_A1,
GpioAction::BUTTON_PRESS_A1);
fromPBorBC(deprecatedPinMappings.has_pinButtonA2, &deprecatedPinMappings.pinButtonA2, PIN_BUTTON_A2,
GpioAction::BUTTON_PRESS_A2);
fromPBorBC(deprecatedPinMappings.has_pinButtonFn, &deprecatedPinMappings.pinButtonFn, PIN_BUTTON_FN,
GpioAction::BUTTON_PRESS_FN);
const auto fromBoardConfig = [&](Pin_t pinAssign, GpioAction action) -> void {
if (actions[pinAssign] == GpioAction::NONE && isValidPin(pinAssign)) {
actions[pinAssign] = action;
}
};
fromProtoBuf(deprecatedPinMappings.has_pinDpadUp, &deprecatedPinMappings.pinDpadUp, GpioAction::BUTTON_PRESS_UP);
fromProtoBuf(deprecatedPinMappings.has_pinDpadDown, &deprecatedPinMappings.pinDpadDown, GpioAction::BUTTON_PRESS_DOWN);
fromProtoBuf(deprecatedPinMappings.has_pinDpadLeft, &deprecatedPinMappings.pinDpadLeft, GpioAction::BUTTON_PRESS_LEFT);
fromProtoBuf(deprecatedPinMappings.has_pinDpadRight, &deprecatedPinMappings.pinDpadRight, GpioAction::BUTTON_PRESS_RIGHT);
fromProtoBuf(deprecatedPinMappings.has_pinButtonB1, &deprecatedPinMappings.pinButtonB1, GpioAction::BUTTON_PRESS_B1);
fromProtoBuf(deprecatedPinMappings.has_pinButtonB2, &deprecatedPinMappings.pinButtonB2, GpioAction::BUTTON_PRESS_B2);
fromProtoBuf(deprecatedPinMappings.has_pinButtonB3, &deprecatedPinMappings.pinButtonB3, GpioAction::BUTTON_PRESS_B3);
fromProtoBuf(deprecatedPinMappings.has_pinButtonB4, &deprecatedPinMappings.pinButtonB4, GpioAction::BUTTON_PRESS_B4);
fromProtoBuf(deprecatedPinMappings.has_pinButtonL1, &deprecatedPinMappings.pinButtonL1, GpioAction::BUTTON_PRESS_L1);
fromProtoBuf(deprecatedPinMappings.has_pinButtonR1, &deprecatedPinMappings.pinButtonR1, GpioAction::BUTTON_PRESS_R1);
fromProtoBuf(deprecatedPinMappings.has_pinButtonL2, &deprecatedPinMappings.pinButtonL2, GpioAction::BUTTON_PRESS_L2);
fromProtoBuf(deprecatedPinMappings.has_pinButtonR2, &deprecatedPinMappings.pinButtonR2, GpioAction::BUTTON_PRESS_R2);
fromProtoBuf(deprecatedPinMappings.has_pinButtonS1, &deprecatedPinMappings.pinButtonS1, GpioAction::BUTTON_PRESS_S1);
fromProtoBuf(deprecatedPinMappings.has_pinButtonS2, &deprecatedPinMappings.pinButtonS2, GpioAction::BUTTON_PRESS_S2);
fromProtoBuf(deprecatedPinMappings.has_pinButtonL3, &deprecatedPinMappings.pinButtonL3, GpioAction::BUTTON_PRESS_L3);
fromProtoBuf(deprecatedPinMappings.has_pinButtonR3, &deprecatedPinMappings.pinButtonR3, GpioAction::BUTTON_PRESS_R3);
fromProtoBuf(deprecatedPinMappings.has_pinButtonA1, &deprecatedPinMappings.pinButtonA1, GpioAction::BUTTON_PRESS_A1);
fromProtoBuf(deprecatedPinMappings.has_pinButtonA2, &deprecatedPinMappings.pinButtonA2, GpioAction::BUTTON_PRESS_A2);
fromProtoBuf(deprecatedPinMappings.has_pinButtonFn, &deprecatedPinMappings.pinButtonFn, GpioAction::BUTTON_PRESS_FN);
// convert extra pin mapping to GPIO mapping config
if (extraButtonOptions.enabled && isValidPin(extraButtonOptions.pin)) {
// previous config had a value we haven't migrated yet, it can/should apply in the new config
actions[extraButtonOptions.pin] = gamepadMaskToGpioAction(extraButtonOptions.buttonMap);
extraButtonOptions.pin = -1;
extraButtonOptions.enabled = false;
actions[extraButtonOptions.pin] = gamepadMaskToGpioAction(extraButtonOptions.buttonMap);
extraButtonOptions.pin = -1;
extraButtonOptions.enabled = false;
}
else if (isValidPin(EXTRA_BUTTON_PIN))
actions[EXTRA_BUTTON_PIN] = gamepadMaskToGpioAction(EXTRA_BUTTON_MASK);
// convert DDI direction pin mapping to GPIO mapping config
if (ddiOptions.enabled) {
fromPBorBC(ddiOptions.has_deprecatedUpPin, &ddiOptions.deprecatedUpPin, PIN_DUAL_DIRECTIONAL_UP,
GpioAction::BUTTON_PRESS_DDI_UP);
fromPBorBC(ddiOptions.has_deprecatedDownPin, &ddiOptions.deprecatedDownPin, PIN_DUAL_DIRECTIONAL_DOWN,
GpioAction::BUTTON_PRESS_DDI_DOWN);
fromPBorBC(ddiOptions.has_deprecatedLeftPin, &ddiOptions.deprecatedLeftPin, PIN_DUAL_DIRECTIONAL_LEFT,
GpioAction::BUTTON_PRESS_DDI_LEFT);
fromPBorBC(ddiOptions.has_deprecatedRightPin, &ddiOptions.deprecatedRightPin, PIN_DUAL_DIRECTIONAL_RIGHT,
GpioAction::BUTTON_PRESS_DDI_RIGHT);
fromProtoBuf(ddiOptions.has_deprecatedUpPin, &ddiOptions.deprecatedUpPin, GpioAction::BUTTON_PRESS_DDI_UP);
fromProtoBuf(ddiOptions.has_deprecatedDownPin, &ddiOptions.deprecatedDownPin, GpioAction::BUTTON_PRESS_DDI_DOWN);
fromProtoBuf(ddiOptions.has_deprecatedLeftPin, &ddiOptions.deprecatedLeftPin, GpioAction::BUTTON_PRESS_DDI_LEFT);
fromProtoBuf(ddiOptions.has_deprecatedRightPin, &ddiOptions.deprecatedRightPin, GpioAction::BUTTON_PRESS_DDI_RIGHT);
}
// convert JS slider pin mappings to GPIO mapping config
@@ -763,9 +834,6 @@ void gpioMappingsMigrationCore(Config& config)
}
jsSliderOptions.deprecatedPinSliderOne = -1;
}
else if (isValidPin(PIN_SLIDER_ONE)) {
actions[PIN_SLIDER_ONE] = GpioAction::SUSTAIN_DP_MODE_LS;
}
if (jsSliderOptions.enabled && isValidPin(jsSliderOptions.deprecatedPinSliderTwo)) {
switch (jsSliderOptions.deprecatedModeTwo) {
case DpadMode::DPAD_MODE_DIGITAL: {
@@ -781,10 +849,6 @@ void gpioMappingsMigrationCore(Config& config)
}
jsSliderOptions.deprecatedPinSliderTwo = -1;
}
else if (isValidPin(PIN_SLIDER_TWO)) {
actions[PIN_SLIDER_TWO] = GpioAction::SUSTAIN_DP_MODE_RS;
}
// convert SOCD slider pin mappings to GPIO mapping config
if (socdSliderOptions.enabled && isValidPin(socdSliderOptions.deprecatedPinOne)) {
switch (socdSliderOptions.deprecatedModeOne) {
@@ -807,26 +871,7 @@ void gpioMappingsMigrationCore(Config& config)
}
socdSliderOptions.deprecatedPinOne = -1;
}
else if (isValidPin(PIN_SLIDER_SOCD_ONE)) {
switch (SLIDER_SOCD_SLOT_ONE) {
case SOCDMode::SOCD_MODE_UP_PRIORITY: {
actions[PIN_SLIDER_SOCD_ONE] = GpioAction::SUSTAIN_SOCD_MODE_UP_PRIO; break;
}
case SOCDMode::SOCD_MODE_NEUTRAL: {
actions[PIN_SLIDER_SOCD_ONE] = GpioAction::SUSTAIN_SOCD_MODE_NEUTRAL; break;
}
case SOCDMode::SOCD_MODE_SECOND_INPUT_PRIORITY: {
actions[PIN_SLIDER_SOCD_ONE] = GpioAction::SUSTAIN_SOCD_MODE_SECOND_WIN; break;
}
case SOCDMode::SOCD_MODE_FIRST_INPUT_PRIORITY: {
actions[PIN_SLIDER_SOCD_ONE] = GpioAction::SUSTAIN_SOCD_MODE_FIRST_WIN; break;
}
case SOCDMode::SOCD_MODE_BYPASS: {
actions[PIN_SLIDER_SOCD_ONE] = GpioAction::SUSTAIN_SOCD_MODE_BYPASS; break;
}
default: break;
}
}
if (socdSliderOptions.enabled && isValidPin(socdSliderOptions.deprecatedPinTwo)) {
switch (socdSliderOptions.deprecatedModeTwo) {
case SOCDMode::SOCD_MODE_UP_PRIORITY: {
@@ -848,26 +893,6 @@ void gpioMappingsMigrationCore(Config& config)
}
socdSliderOptions.deprecatedPinTwo = -1;
}
else if (isValidPin(PIN_SLIDER_SOCD_TWO)) {
switch (SLIDER_SOCD_SLOT_TWO) {
case SOCDMode::SOCD_MODE_UP_PRIORITY: {
actions[PIN_SLIDER_SOCD_TWO] = GpioAction::SUSTAIN_SOCD_MODE_UP_PRIO; break;
}
case SOCDMode::SOCD_MODE_NEUTRAL: {
actions[PIN_SLIDER_SOCD_TWO] = GpioAction::SUSTAIN_SOCD_MODE_NEUTRAL; break;
}
case SOCDMode::SOCD_MODE_SECOND_INPUT_PRIORITY: {
actions[PIN_SLIDER_SOCD_TWO] = GpioAction::SUSTAIN_SOCD_MODE_SECOND_WIN; break;
}
case SOCDMode::SOCD_MODE_FIRST_INPUT_PRIORITY: {
actions[PIN_SLIDER_SOCD_TWO] = GpioAction::SUSTAIN_SOCD_MODE_FIRST_WIN; break;
}
case SOCDMode::SOCD_MODE_BYPASS: {
actions[PIN_SLIDER_SOCD_TWO] = GpioAction::SUSTAIN_SOCD_MODE_BYPASS; break;
}
default: break;
}
}
// verify that tilt factors are not set to -1
if (tiltOptions.enabled) {
@@ -881,6 +906,23 @@ void gpioMappingsMigrationCore(Config& config)
if (tiltOptions.factorTilt2RightY == -1) tiltOptions.factorTilt2RightY = TILT2_FACTOR_RIGHT_Y;
}
// Assign all potential board config pins
GpioAction boardConfig[NUM_BANK0_GPIOS] = {GPIO_PIN_00, GPIO_PIN_01, GPIO_PIN_02,
GPIO_PIN_03, GPIO_PIN_04, GPIO_PIN_05,
GPIO_PIN_06, GPIO_PIN_07, GPIO_PIN_08,
GPIO_PIN_09, GPIO_PIN_10, GPIO_PIN_11,
GPIO_PIN_12, GPIO_PIN_13, GPIO_PIN_14,
GPIO_PIN_15, GPIO_PIN_16, GPIO_PIN_17,
GPIO_PIN_18, GPIO_PIN_19, GPIO_PIN_20,
GPIO_PIN_21, GPIO_PIN_22, GPIO_PIN_23,
GPIO_PIN_24, GPIO_PIN_25, GPIO_PIN_26,
GPIO_PIN_27, GPIO_PIN_28, GPIO_PIN_29};
// If we didn't import from protobuf, import from boardconfig
for(int i = 0; i < NUM_BANK0_GPIOS; i++) {
fromBoardConfig(i, boardConfig[i]);
}
// migrate I2C addons to use peripheral manager
if (!peripheralOptions.blockI2C0.enabled && (
(config.displayOptions.enabled && (config.displayOptions.i2cBlock == 0)) ||
@@ -1057,7 +1099,7 @@ void gpioMappingsMigrationCore(Config& config)
markAddonPinIfUsed(config.addonOptions.buzzerOptions.pin);
markAddonPinIfUsed(config.addonOptions.focusModeOptions.pin);
markAddonPinIfUsed(config.addonOptions.turboOptions.ledPin);
markAddonPinIfUsed(config.addonOptions.turboOptions.buttonPin);
markAddonPinIfUsed(config.addonOptions.turboOptions.deprecatedButtonPin);
markAddonPinIfUsed(config.addonOptions.turboOptions.shmupDialPin);
markAddonPinIfUsed(config.addonOptions.turboOptions.shmupBtn1Pin);
markAddonPinIfUsed(config.addonOptions.turboOptions.shmupBtn2Pin);
@@ -1273,19 +1315,21 @@ void ConfigUtils::load(Config& config)
}
// run migrations
if (!config.migrations.hotkeysMigrated) hotkeysMigration(config);
if (!config.migrations.hotkeysMigrated)
hotkeysMigration(config);
// Make sure that fields that were not deserialized are properly initialized.
// They were probably added with a newer version of the firmware.
initUnsetPropertiesWithDefaults(config);
// ----------------------------------------
// Further migrations can be performed here
// ----------------------------------------
// Run migrations that need to happen after initUnset...
// ProtoBuf && Board Config settings are loaded here
if (!config.migrations.gpioMappingsMigrated)
gpioMappingsMigrationCore(config);
// run migrations that need to happen after initUnset...
if (!config.migrations.gpioMappingsMigrated) gpioMappingsMigrationCore(config);
if (!config.migrations.buttonProfilesMigrated) gpioMappingsMigrationProfiles(config);
// Run button profile migrations
if (!config.migrations.buttonProfilesMigrated)
gpioMappingsMigrationProfiles(config);
// Update boardVersion, in case we migrated from an older version
strncpy(config.boardVersion, GP2040VERSION, sizeof(config.boardVersion));

View File

@@ -1253,7 +1253,6 @@ std::string setAddonOptions()
docToValue(onBoardLedOptions.enabled, doc, "BoardLedAddonEnabled");
TurboOptions& turboOptions = Storage::getInstance().getAddonOptions().turboOptions;
docToPin(turboOptions.buttonPin, doc, "turboPin");
docToPin(turboOptions.ledPin, doc, "turboPinLED");
docToValue(turboOptions.shotCount, doc, "turboShotCount");
docToValue(turboOptions.shmupModeEnabled, doc, "shmupMode");
@@ -1647,7 +1646,6 @@ std::string getAddonOptions()
writeDoc(doc, "BoardLedAddonEnabled", onBoardLedOptions.enabled);
const TurboOptions& turboOptions = Storage::getInstance().getAddonOptions().turboOptions;
writeDoc(doc, "turboPin", cleanPin(turboOptions.buttonPin));
writeDoc(doc, "turboPinLED", cleanPin(turboOptions.ledPin));
writeDoc(doc, "turboShotCount", turboOptions.shotCount);
writeDoc(doc, "shmupMode", turboOptions.shmupModeEnabled);

View File

@@ -379,7 +379,6 @@ app.get('/api/getProfileOptions', (req, res) => {
app.get('/api/getAddonsOptions', (req, res) => {
return res.send({
turboPin: -1,
turboPinLED: -1,
sliderModeZero: 0,
turboShotCount: 20,

View File

@@ -31,10 +31,6 @@ const TURBO_MASKS = [
export const turboScheme = {
TurboInputEnabled: yup.number().required().label('Turbo Input Enabled'),
turboPin: yup
.number()
.label('Turbo Pin')
.validatePinWhenValue('TurboInputEnabled'),
turboPinLED: yup
.number()
.label('Turbo Pin LED')
@@ -122,7 +118,6 @@ export const turboState = {
shmupMixMode: 0,
shmupMode: 0,
TurboInputEnabled: 0,
turboPin: -1,
turboPinLED: -1,
turboShotCount: 5,
};
@@ -133,19 +128,6 @@ const Turbo = ({ values, errors, handleChange, handleCheckbox }) => {
<Section title={t('AddonsConfig:turbo-header-text')}>
<div id="TurboInputOptions" hidden={!values.TurboInputEnabled}>
<Row className="mb-3">
<FormControl
type="number"
label={t('AddonsConfig:turbo-button-pin-label')}
name="turboPin"
className="form-select-sm"
groupClassName="col-sm-3 mb-3"
value={values.turboPin}
error={errors.turboPin}
isInvalid={errors.turboPin}
onChange={handleChange}
min={-1}
max={29}
/>
<FormControl
type="number"
label={t('AddonsConfig:turbo-led-pin-label')}

View File

@@ -37,6 +37,7 @@ export const BUTTON_ACTIONS = {
SUSTAIN_SOCD_MODE_SECOND_WIN: 29,
SUSTAIN_SOCD_MODE_FIRST_WIN: 30,
SUSTAIN_SOCD_MODE_BYPASS: 31,
BUTTON_PRESS_TURBO: 32,
} as const;
type PinActionKeys = keyof typeof BUTTON_ACTIONS;

View File

@@ -47,5 +47,6 @@ export default {
SUSTAIN_SOCD_MODE_SECOND_WIN: 'Letzter Gewinnt SOCD Säuberung',
SUSTAIN_SOCD_MODE_FIRST_WIN: 'Erster Gewinnt SOCD Säuberung',
SUSTAIN_SOCD_MODE_BYPASS: 'SOCD Säuberung Aus',
BUTTON_PRESS_TURBO: 'Turbo',
},
};

View File

@@ -50,5 +50,6 @@ export default {
SUSTAIN_SOCD_MODE_SECOND_WIN: 'Last Win SOCD Cleaning',
SUSTAIN_SOCD_MODE_FIRST_WIN: 'First Win SOCD Cleaning',
SUSTAIN_SOCD_MODE_BYPASS: 'SOCD Cleaning Off',
BUTTON_PRESS_TURBO: 'Turbo',
},
};