Done:
- write a clean joystick interface: 4 axes with 16-bit precision, 12 buttons (no PS3 button yet), and a hat (d-pad). This uses the excellent LUFA framework from Dean Camera.
- configure an interrupt for the serial reception (great tutorial from Dean Camera)
- write a RS232-capable emu process (docs).
- write a new Sixemugui
- 2ms update period = 500Hz update frequency (same as my G500 mouse) – not sure the PS3 can drive a usb device at that speed – not sure running as fast is relevant considering the Linux latency
- measured worst latency between a usb packet received by the PC from a peripheral (like a mouse) and the usb packet received by the device the joystick is connected to (for easiness, the PC – should be the PS3) is about 4.7ms, average latency is about 3.6ms
Notes:
- It’s probably better to avoid connecting both the mouse and the USB to serial device to the same usb bus.
- A kernel with realtime capabilities could probably lower the worst latency.
- It’s not good to work at a frequency higher than the mouse frequency (no mouse report in the last period => stick is set to the center => jerky movements).
- The dead zone
doesn’t seem to beis proportional to the max absolute axis value. - The report period is probably not constant without a realtime kernel (2ms is probably too low considering the Linux latency).
- For performance reasons, emu & emuclient could be merged in a single process.
Next tasks:
- build a package