dangiu / PicoMemcard

Emulating PSX Memory Card (or controller) using a Raspberry Pi Pico
GNU General Public License v3.0
528 stars 38 forks source link

Pico W Support #45

Closed realJoshByrnes closed 1 year ago

realJoshByrnes commented 1 year ago

Added support for Pico W, specifically LED support, as the LED is no longer wired to PICO_DEFAULT_LED_PIN (GPIO 25), but is now wired to CYW43_WL_GPIO_LED_PIN (GPIO 0 on the Wireless Module)

This change does not require a separate binary for PICO and PICO_W, but will increase the size of said binary.

Edits based on https://forums.raspberrypi.com/viewtopic.php?t=336884

realJoshByrnes commented 1 year ago

I should note that I have only tested the resulting binary on a Pico W, and it should be tested on a Pico (non-W) before considering a merge.

dangiu commented 1 year ago

Awesome, if somebody has already tested it on a non-W Pico leave a comment. Otherwise I'll test it out when i get a chance :)

realJoshByrnes commented 1 year ago

I've got a non-W Pico (or two) on it's way as I write this, so if you don't have a chance to test it, I'll give it a run in a few days.

dangiu commented 1 year ago

Awesome thanks!

realJoshByrnes commented 1 year ago

Confirming that this doesn't work on non-W Pico. It seems like some error is being triggered on non-Pico W during the is_pico_w() function.

I'll try and have a look soon if I can find a reliable way to identify the different boards at runtime without causing any issues. For now, I'll close the PR and re-submit once I have something working.

realJoshByrnes commented 1 year ago

Had a quick debug, and it looks like everything WAS working, except I had done a find/replace that affected two lines I didn't mean for it to hit.

realJoshByrnes commented 1 year ago

Can confirm that realJoshByrnes@2991243 fixes the PR, and now works on all official Pico variants.

realJoshByrnes commented 1 year ago

Automatically closed due to restructure on my fork. Replaced with #53