- Fixup PSX NHL2000 multitap support
- Add Saturn Keyboard support
- Add PSX Lightspan Keyboard support
- Add SEGA Mouse support for Genesis & Saturn
- Add PSX SCPH-1110 Analog Joystick support
- Add debug for latency tests
- Reduce latency for WiiU Pro, PS3 & PS4 controllers
- Update to latest ESP-IDF master
I finally got around doing the latency tests. It's a bit of a rabbit hole tbh but I think I managed to keep it simple while getting meaningful numbers. I ditched my original idea of running the test by measuring the delay between button input on the controller and the RGB line black to white transition. It's too much work for nothing. Once the buttons data is within the shared memory the adapter is simply waiting for the console to query for it. At that point any significant delay would make the transmission fail. The fact it work well as show by doing protocol traces tell us their is no significant latency pass that point.
So I settle to simply running the adapter in the 1P parallel mode and hooking up GPIO26 of BlueRetro's ESP32 to an Arduino running a simple sketch using a pin to toggle a controller button and measuring the delay between that and the input pin (Same thing used by MiSTer tests) . I also configured the adapter using a special preset that maps all buttons to the pin GPIO26. I hacked a few controllers to expose one of the buttons on a 3.5mm TRS connector.
I published the full results here: https://docs.google.com/spreadsheets/d/1god1AdNV7FPIxKj8jwGOPayL9VsWvI7ONhnW3zERaN8/edit?usp=sharing
There are two measurements of interest here. First there is the HID report interval which is very helpful to figure out if the Bluetooth connection is good. It's very easy to get the same numbers from a wireless trace to help compare between various systems. I made a simple python script using Scapy to be able to get the stats.
The second is the latency between the input on the controller and the output from BlueRetro. PS4 & PS5 controllers are the winners using BlueRetro with around ~5.4 ms of latency.
- PS4/PS5: ~5.4 ms
- XB1: ~8.8 ms
- Switch Pro: ~12.4 ms
- PS3: ~12.8
- WiiU Pro: ~13.2 ms
- 8bitdo: ~16.2 ms
- Wiimote: ~16.3 ms
At first I had the PS4 controller configure for 4 ms report interval, while this was good with Linux, it didn't behave as well with the ESP32. Somehow using 0 ms config yield much better consistency in the report interval and obviously better latency. Both PS3 & WiiU controller had very bad consistency in their report interval. Base on this retropie thread I tried to set those controller as master of the connection and this improved the latency a lot! I guess the ESP32 clocking of the baseband don't play too nice with those controllers somehow.