This firmware turns Raspberry Pi Pico into a dual gamepad with a joystick and 9 buttons each.
There is an alternative version of the firmware for RetroArch with P1 10 buttons and P2 8 buttons. This allows Pause and Quit to be mapped, as RetroArch can only map hotkeys from P1.
To install the firmware just hold down the BOOTSEL button when you plug in your Pico, it will appear as a drive onto which you can drag a firmware.uf2 file located in the firmware folder of this repositiory.