The basic display driver is working, and in the GitHubs. So far, it:
- Uses Raspberry Pi audio output (or cheap USB sound adapter) to drive X-Y input of oscilloscope
- Alternatively works on different Linux-compatible hardware as long as it supports ALSA
- Implements a simple display "driver" which maintains a drawing thread to continuously update the display through the ALSA sound API
- Exposes a display list interface where a list of vector segments can be passed to the driver to update the display.
- Uses a separate thread to maintain the display with the last display list while your code calculates the next frame
- Includes optional DC restoration dots for AC-coupled audio outputs (see log)
- Uses tunable slew-rate limiting to control segment intensity
The driver code is straight C, and exposes a simple display-list interface for drawing a set of polylines.
There is also a higher-level abstraction for DLO's (disk-like objects), which are vector sprites (think geometrical disks instead of data storage disks). Facilities are provided for updating positions and angle, finding collisions between DLO's, and elastic collisions.
The ultimate goal is a software toolkit for writing retro vector arcade games to play on your scope.
If anyone has access to a pair of fast galvos, I'd also love to see the output lasered on a wall somewhere.
Or, if you have plans or ideas for a fast galvo project. Maybe using coreless DC motors? Or since the output is really audio, maybe some speakers with the cones removed? You get the idea.
Despite the obvious application to space-shooter type games, the performance of this system is not stellar.
As an example, assume you are limited to 48kHz sampling rate, and have a DC-coupled audio output (they exist, I have one on my desk). Also assume you want 60 fps output. Then, you can issue up to 800 points to the driver, or up to 799 segments.
A larger problem is the fact that audio adapters are designed for audio. Hence, they typically filter the DAC output for best frequency response, as opposed to best time domain response. This causes ringing or extra dots in the output.
Having said that, it works OK on a Raspberry Pi with zero additional hardware. It works a little better with a $6 USB audio adapter.