Running Tetris Directly on an Old Oscilloscope

In their journey to make the most of a digital oscilloscope made in 1998, Sam Ilia got it running Tetris.

Cameron Coward
7 months agoRetro Tech / Gaming

Oscilloscopes are essential for electronics work because they let users see the wave forms of analog and digital signals. Want to see the pattern of a digital signal that follows an unknown protocol? An oscilloscope can show it to you. Want to see how a capacitor affects an analog signal? Oscilloscope to the rescue! And because 'scopes are so useful, they've been popular for many decades and there are more models on the used market than you can count. Ilia Sam purchased a used high-performance Tektronix TDS540D for lidar development and got it to run Tetris while unraveling its secrets.

While the oldest oscilloscopes are little more than cathode-ray tubes with their deflection coils attached to the signal inputs, later models like the TDS540D (this example is from 1998) were very complicated. The TDS540D is a digital oscilloscope with a CRT display. It has a Motorola 68EC040 processor and runs the RTOS VxWorks real-time operating system. That loads from flash memory, but this 'scope also has a floppy disk drive (FDD). The purpose of the FDD is to let users save wave forms for later analysis, store settings, and to load to software that could unlock additional features.

Ilia Sam had trouble finding any examples of software for the TDS540D and was only able to locate one, which is called TDSPRT1 and that lets users print data from the 'scope. That is a Java application and itgave Ilia Sam some hope that they might be able to write their own custom software to run on the oscilloscope.

This led Ilia Sam down a rabbit hole of quirky '90s embedded software eccentricities. There isn't any documentation online for any of this, so Ilia Sam had to reverse engineer every step of the process through debugging and code disassembly.

For example, custom software can access the states of the oscilloscope's front panel buttons by reading a specific memory address. But pressing the same button twice in a row doesn't update that. So the software has to check the button states, write zeroes at that memory address, then check it again to see button state updates.

After slogging through a gauntlet of obsolete compilers and strange conventions, Ilia Sam was eventually able to create their own custom software. That will be very useful as they can expand the capabilities of their oscilloscope to accommodate their work. But it also let them run Tetrison the 'scope, using the front panel buttons to control the game.

Cameron Coward
Writer for Hackster News. Proud husband and dog dad. Maker and serial hobbyist. Check out my YouTube channel: Serial Hobbyism
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles