misteraddons / Reflex-Adapt

Convert your original gaming controllers to USB using Reflex Adapt!
https://misteraddons.com/products/reflex-adapt
GNU General Public License v3.0
24 stars 7 forks source link

Controller Support: GameCube Nintendo Wavebird & others #48

Open bryanparadis opened 8 months ago

bryanparadis commented 8 months ago

Currently only controllers that identify as standard wired controllers and the GameCube keyboard function due to explicitly reading only from those two devices by id. I've already got a working build for Wavebird but there seems to be some quirks with detection due to Reflex only checking for new controllers on setup and not on polling loop. This is unlike original hardware and causes the Wavebird to not be detected if you plug it in after another controller and reset. Either we need check for new controllers periodically like once per second or something or we need to remove this if block. I personally haven't seen any weird behavior after removing the if block. I think at worst you would be moving a disconnect to the next poll/read instead of trying to detect controller disconnect right after the read.

I think likely you could do controller detection without impacting performance which would allow for keeping that logic and also removing plug+reset.

bryanparadis commented 8 months ago

Still was able to figure out a way for the Wavebird to not be detected:

1) Plugin wired GameCube controller and reset Reflex-Adapt 2) Plugin Wavebird receiver and reset without touching the Wavebird or turning it on 3) See that it is not detected still after restart

This happens because the Wavebird receiver isn't a 100% a controller yet until it receives a transmission from the Wavebird controller. This is a one way, transmission only, wireless controller. You can tell when the receiver gets something due to the green status light on it blinking.

I'd rather not have to start specifying IDs for everything and creating logic for controllers that report and function basically the same when you poll more than only a single time. Tomorrow I will quickly explore how much of a performance hit periodically doing calling gc_begin causes.

bryanparadis commented 8 months ago

Calling begin then calling continue to skip rest of the loop on any controller that isn't enabled causes loop latency to be 1.4ms. Up from 0.6-0.7ms with spikes of up to 1.7ms.

bryanparadis commented 1 month ago

Wavebird should be working fine now.

bryanparadis commented 1 week ago

Wavebird should be working fine now.

I don't think it's working in current master for MPG. Need to confirm.