I have an old joystick, which seems pretty cool. I don't even remember using it, must be at least 15 years since I might have used it. It has an old Macintosh ADB connector. Totally useless nowadays. So I opened it (haven't destroyed anything yet, but will). I tried to figure out how it works. Seems it has these two led lights moving in the xy-directions, when the stick is pushed:
They move above a pcb, where I can see a strange looking component with a camera like opening. The component has five pins. My guess is that it really is a "camera", but with only 2*2 light sensors. A 4 pixel camera sensor
The two leds would blink in turns and the four sensors (LDR?) would measure the amount of light. A piece of logic would turn that into coordinates for each LED. And the mean would be the coordinates of the stick position. It's a Sidewinder, so you can twist the stick CW or CCW. In that case, the two LEDs will rotate around the calculated middlepoint. Or simply put, their Y coordinates won't be the same anymore and their difference will be a measure of the twist. There is a third LED attached to a throttle like leaver.
Am I on right track here? The feel of the joystick is pretty good and though I don't have any use for it at the moment, I might turn it into a thing compatible with Arduinos. Instead of trying to understand the serial protocol of the ADB thing of an old Macintosh, I'd use four analog pins and two or three digital pins to directly control the LEDs and the light sensors.