Giter VIP home page Giter VIP logo

gp2040's People

Contributors

ctehdeploy avatar feralai avatar jbarket avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gp2040's Issues

On-board Configuration

Work out a way to integrate on-board configuration of button layouts, LED setup, etc.

Per game LED presets

I don't know, maybe I'm missing something, but I cannot find in the docs any guide of how to control leds from a pc. You know like all the other led controllers allow you to illuminate only buttons that are used by the currently launched MAME game.

EEPROM needs validation (CRC check)

There is a relatively common issue where if the Pico/RP2040 device has been previously flashed with something other than GP2040, the area of flash used for emulated EEPROM could contain invalid values causing the firmware to misbehave (locked to certain input type, buttons might not work, etc.).

Add CRC check to the EEPROM data and perform an EEPROM reset if the CRC does not match when loaded.

Emulate analog sticks output with dpad

say you are able to hold down a layer button to temporarily enable the dpad buttons to emulate analog stick(s) output.
or a dip switch to change switch to analog stick(L/R) emulation.

Board Selection for Configurator

The web configurator is driven by Boards.json, and the activate board is set in .env. The problem is that there's no simple way to have that board set by changing the board configuration files in the main firmware. We could do something at build time to change the .env values, but that seems unnecessary.

Instead, I think we should set that information in the BoardConfig.h file. In the configurator, we should pull that value and use it to determine which board in Boards.json to use.

Then we can reimplement the pin restrictors for the Pico, add a full RP2040 profile for most custom boards that just use every pin, and allow the creation of custom boards for anything that doesn't fit those two.

Enhance Web Configurator Compatibility

Currently the web configurator runs via lwIP over RNDIS from the TinyUSB library. RNDIS seems to only work on Windows platforms at the moment. Evaluate other ethernet emulation methods over USB such as CDC-ECM for compatibility with Mac and Linux platforms.

Better support for analog inputs

GP2040 supports sending analog values in the USB reports, however there is no specific implementation around the use/handling of those analog inputs.

The RP2040 MCU supports 4 ADC channels, with the Pi Pico only making 3 available. Having 4 channels is enough for 2 full joysticks, and there are a few RP2040 boards out there that make all 4 channels available, such as the Sparkfun RP2040 Thing Plus. The Arduino Nano RP2040 Connect actually supports up to 8 ADC channels, which is enough for a full analog XInput implementation.

Need to add features such as options for enabling, deadzone calibration, and possibly some kind of auto calibration to avoid drift.

Configurator - RGB LED Customization

Add page to config app for customizing RGB LED settings. This should include:

  • Select from presets
  • Change color per key
  • Allow user to save custom LED theme(s)

Question: can I use analog joystick input using ADC pins?

I have been looking into this recently, however I currently don’t have an RP2040 system to test this on as of now. I didn’t see any information in how (or if) you can control the sticks with analog inputs, as analog outputs. Just a quick question.

Thanks,
brickeduser

Turbo button feature?

Hi, would it be possible to implement a Turbo button to enable/disable this function for the other action buttons?

Many thanks for your work so far.

Configurator - Button Remapping

Add page to config app for remapping buttons. Would be pretty awesome if it showed an image of the controller it's being used on. For Pico it would use some generic fightstick image.

Wireless functionality?

Is there a possibility to configure this with a microcontroller that has a wireless module?

Question about memory

Hello, I'm thinking about getting a Raspberry Pico to test this, but it seems that there are different memory sizes available, from 2MB to 16MB. From what I've seen the uf2 file is a little less than 2MB, so would the 2MB flash memory be enough or should I get the one with 4MB+?

Add secondary input layer

This will require #34 to be finished. Allow a button to toggle a secondary layer of button mappings on the fly, similar to G-shift for Logitech mice and Hypershift for Razer mice.

PS3/PS4 Legacy Home Button is Misbehaving

Right now, Switch mode works almost flawlessly on PS3/PS4 games with legacy support, but the home button doesn't seem to do anything. I've verified that my buttons are functioning correctly otherwise, so it's definitely something like a different button mapping. I'll compare what I've got working in CircuitPython and see what the deal is. It may require a third mode, but I'm hoping not.

Use a a different button to change to PS3/D-INPUT mode

I don't think many sticks have a native button for RS and LS, wouldn't it be better to but it on a button that is always there and never plugged up like one of B1-4? For example I tend to only use 6 buttons, and I've known people in the past to only use 3 (for VF) or 4 (for SNK) and plug up the rest.

Also, this is a cool project, I ordered a pico and am looking forward to trying it in my stick.

Web configurator locking up/blank page

There seems to be an issue with the API sometimes returning a mangled JSON response, which then causes the frontend application to error and blank out the page. Need to investigate the cause of the mangled JSON response. This doesn't seem to be an issue with static pages and assets, only JSON responses from API calls.

Authenticated controller support - Ways to support them

Pretty much just a table listing how to support controllers with authentications.

Type Passthrough Security chip hijacking Native Notes
PS4 Chip hijacking only works with 3rd party controllers and native requires dumping keys from one's own eligible PS4 controller motherboard.
PS5 May be possible by using a certain overpriced (and reportedly broke after firmware update) UP5 module. Still f**k $**y 🖕
Xbox 360 Secrets seem to be symmetrical but not public. Chip hijacking should be possible but no public known successes.
Xbox One/Series Secrets not public. Plus no one cares about it enough except bootleggers.

Basically the best bet is to implement a passthrough support (wide range of controllers covered and user friendly enough). On RP2040 there's a PIO-based USB PHY that's work in progress. MAX3421E is always available as a second option too.

Browser-based Configuration

Use the web server features of TinyUSB to host a SPA (single page application) for controller configuration.

Web configurator doesn't showing up.

I have problem with web configurator in latest 0.4.3 version. I look first page web configurator but when i click Setting tab then it shows at 1ms and dissapear = empty web page. I only display LED configuration and Display configurator.
On 0.4.2 problem is still exist.
Sorry for my bad English.

Sponsor for analog support

Hello,

Could it be possible to become a sponsor for feature development ? In particularly for analog support.

Thanks

Rumble support

Rumble support could be a nice addition to a controller made using this project.
Especially since, at least in pi pico, there are some unused pins.

Request for more dinput buttons

The GP2040 encoder is awesome, but i have an improvement in mind. Under dipnut on windows, having 20 buttons + dpad would let ppl run a 2-player MAME cab from a single Pico! I'd personally love to see those 8 blank input pins mapped for that purpose :)

Converting piezo sensor analog inputs into digital outputs for Taito no Tatsujin drum controller

So I'm looking into Taiko no Tatsujin (Drum Master game) after the PC/Xbox announcement, and I'm wondering, is there a way to convert analog piezo inputs to work with the GP2040?

Here are two existing arduino codes.

https://github.com/LuiCat/ArduinoTaikoController
https://github.com/ShikyC/Sanro-Arduino

The problem with the first one is that it doesn't register simultaneous hits, only one at a time.
The problem with the second one is that it uses microphones instead of piezo sensors.
And the ultimate problem with both is that they emulate computer keyboards, not game controllers.

It'd be amazing to be able to build a diy tatacon that works with X-input(PC)/PS3/Switch/PS4(with converter).

after use latest version dependency libs, init adc is not work

I use latest wizio-pico, and, patch the tinyusb_gamepad commit(Updated to support latest TinyUSB version #79), then, the init adc is not work.

I init adc in Gamepad::setup method, like:

adc_init();
adc_gpio_init(26);
adc_gpio_init(27);
adc_gpio_init(28);

and, in Gamepad::read method: update joystick like:

adc_select_input(0);
state.lx = (adc_read() >> 4) << 8;
adc_select_input(1);
state.ly = (adc_read() >> 4) << 8;

it worked before, but, now it not work, I am sure it not my hardware problem, and, not the code problem, it must be some latest lib update break something

Refine debouncing configuration

Debouncing is currently configured at the beginning of the main.cpp file with a fixed 5ms delay. At the very least this should be editable via the web configurator.

A more robust implementation would have preset values for certain types of devices. For instance stock Sanwa JLFs may need more than the stock 5ms debounce delay, but the normal buttons may not. Would be nice to say "set debounce to X for directionals/stick and Y for buttons".

Arcade stick unresponsive on PC and Switch with GP2040 - any advice?

Hi there,

I bought a HRAP3 on eBay with the Pi Pico board and GP2040 pre-installed, and it is currently unresponsive on PC, MiSTer and Switch, save for the L3 and R3 buttons, which light up when I test the stick under 'game controllers' on PC. The HRAP shows up as an Xbox 360 controller on PC, a console the firmware doesn't support as far as I'm aware, so I'm wondering if this is an issue with the xinput/dinput/console settings - could you please let me know how to switch between these without opening up the stick, if possible? I've tried uninstalling the device on my PC and seeing if I can get it to register as a generic controller instead, but this didn't help. Is there anything else I can try? (I'm completely unfamiliar with GP2040 itself, but would be up for reinstalling it and doing some tinkering if necessary - please point me in the right direction!)

Thank you very much for your help!

Mike

Add option to invert Y-axis

Could be a useful feature for Hitbox controllers to use them in a more traditional way with non-fighting games.

D-Pad remapping issue

Hello, I'm a user who plays Tekken 7 with GP2040. I got an issue, where the lever is mapped to the D-Pad suddenly changed to the left analog stick during the gameplay, and I was able to confirm that both inputs were changed even by accessing the web settings. Upon confirmation, other buttons remain the same, only the binding of the lever has been changed.

The environment used is Windows 10 Pro 21H1, x64 environment, XInput mode is being used, and the game being played is Tekken 7.

The same symptom is happening quite often, and the board I'm using is a Raspberry pi pico board.

Documentation Updates

Need to organize documentation into consumer-friendly and developer sections. The Github Wiki system should be sufficient to handle it.

Error when building from source

hi, thanks for pico arcade firmware.

i got an error when building firmware from source code.

Compiling .pio\build\raspberry-pi-pico\lib2ad\httpd\fs.o
Compiling .pio\build\raspberry-pi-pico\lib2ad\httpd\fsdata.o
Compiling .pio\build\raspberry-pi-pico\lib2ad\httpd\httpd.o
Archiving .pio\build\raspberry-pi-pico\libae7\liblwip.a
Compiling .pio\build\raspberry-pi-pico\lib888\rndis\rndis.o
In file included from C:\Users\Administrator.platformio\packages\framework-wizio-pico\SDK\lib\tinyusb\src/common/tusb_common.h:68:0,
from C:\Users\Administrator.platformio\packages\framework-wizio-pico\SDK\lib\tinyusb\src/tusb.h:37,
from lib\rndis\rndis.c:46:
C:\Users\Administrator.platformio\packages\framework-wizio-pico\SDK\lib\tinyusb\src/tusb_option.h:274:6: warning: #warning "CFG_TUD_NET is renamed to CFG_TUD_ECM_RNDIS" [-Wcpp]
#warning "CFG_TUD_NET is renamed to CFG_TUD_ECM_RNDIS"
^~~~~~~
lib\rndis\rndis.c: In function 'linkoutput_fn':
lib\rndis\rndis.c:100:9: error: too few arguments to function 'tud_network_can_xmit'
if (tud_network_can_xmit())
^~~~~~~~~Compiling .pio\build\raspberry-pi-pico\lib888\rndis\rndis_reports.o

compilation terminated due to -Wfatal-errors.
*** [.pio\build\raspberry-pi-pico\lib888\rndis\rndis.o] Error 1
In file included from C:\Users\Administrator\.platformio\packages\framework-wizio-pico\SDK\lib\tinyusb\src/common/tusb_common.h:68:0,
                 from C:\Users\Administrator\.platformio\packages\framework-wizio-pico\SDK\lib\tinyusb\src/class/cdc/cdc.h:35,
                 from C:\Users\Administrator\.platformio\packages\framework-wizio-pico\SDK\lib\tinyusb\src/class/net/net_device.h:31,        
                 from lib\rndis\rndis_reports.c:33:
C:\Users\Administrator\.platformio\packages\framework-wizio-pico\SDK\lib\tinyusb\src/tusb_option.h:274:6: warning: #warning "CFG_TUD_NET is renamed to CFG_TUD_ECM_RNDIS" [-Wcpp]
     #warning "CFG_TUD_NET is renamed to CFG_TUD_ECM_RNDIS"
      ^~~~~~~
======================================================== [FAILED] Took 17.76 seconds ========================================================
Environment        Status    Duration
-----------------  --------  ------------
raspberry-pi-pico  FAILED    00:00:17.759
=================================================== 1 failed, 0 succeeded in 00:00:17.759 ===================================================The terminal process "C:\Users\Administrator\.platformio\penv\Scripts\platformio.exe 'run', '--environment', 'raspberry-pi-pico'" terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.

how to build succesfully from source?

thank you.

Web configurator pin restriction due to Boards.json

On PCB with Flatbox pinout certain used pins are restricted from being set within the web configurator. This corresponds with www/src/Data/Boards.json. Removal of said restrictions or override possibility (for validation errors) could help.

image

Software Module Interface

Define an interface for libraries to be able to plug into GP2040. Would likely have the following traits (plus more I'm sure):

  • Main module code will run on core1
  • Modules will likely need their own way to setup() and loop() on the core1 thread
  • May need to integrate defines in BoardConfig.h
  • Can rely upon receiving GamepadState to perform actions (flash LEDs, display status, make noise, etc.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.