Zork on an OscilloTerm!

Today’s story began with a mail from [Eric], who’d read up on the Oscilloclock 3-inch VGA Assembly and wondered if it could be used to create an old-school serial terminal display on a vintage oscilloscope CRT.

Yes it could! In fact, the Oscilloclock Lab did one better. Instead of just a VGA display controlled by an external device, we developed native terminal firmware that accepts DEC VT52 compatible commands over a serial port, and renders all text and graphics using beautiful, curvy Lissajous figures.

The stuff of dreams. The OscilloTerm Exo B7S4.

Demonstrating basic terminal features, connecting to a PC via serial cable
Oh, did I mention? It’s a clock as well!

Zork, anyone?

Ultimately, [Eric] just wanted to play Zork. And together we made it happen.

The CRT. The Case.

[Eric] wanted a sleek ‘skeleton’ look. His choice of a gorgeous B7S4 CRT, mounted in custom-machined cast acrylic supports, exposes all glassware and allows for a titillating rear viewing experience.

CRT rings and supports – originally introduced for the Oscilloblock “Summer Dusk” edition

And with a high-transparency cast acrylic case housing the electronics, the OscilloTerm Exo can be enjoyed from every angle!

Astute readers may wonder about the 2.1 kilovolts of high voltage coursing through their innocent-looking device. Rest assured! All internal wiring is sealed off, and Oscilloclock CRT harnesses are hand-crafted with heavy insulation and precautions taken against dust, prying fingers, rats, and even salivating cats.

An O-ring blocks dust from entering the CRT/socket gap (picture from the Oscilloblock)

This case and CRT mounting variation is branded the Oscilloclock Exo, and has proven its wow-factor at several public exhibits to date. We certainly love it, and [Eric] did too!

The Terminal.

This post would never be complete without showing you what real serial terminals from the 1970’s looked like, and explaining what they actually did! Here goes…

Terminals such as the above were physical input/output console devices, back when computers were the size of massive refrigerators, and the operator would sit remotely – at a desk in a separate area, or even a different room.

Gregory Lloyd, CC BY 2.0, via Wikimedia Commons

The terminal and the remote computer were connected via a cable, and would communicate each other by sending data back and forth across the cable; mainly terminal commands and ascii encoded text. Most commonly, a serial communication protocol was used to get the data safely from one end to the other – and hence the devices were known as serial terminals or even serial consoles.

Amusingly, they were also called dumb terminals, because they had no computing power of their own; they were only extensions of the computer to which they were connected.

The OscilloTerm Terminal.

[Eric] wanted a special Oscilloclock that he could also operate as a terminal, connecting it to a remote computer via cable. The remote computer would control the display, using the same serial protocol and commands as an ancient dumb terminal.

But an Oscilloclock is anything but dumb. [Eric] wanted to keep all the standard exciting screens and features of his Oscilloclock active, and only display the special Terminal screen when the remote computer started to send commands. Then, when the commands stopped, the Oscilloclock should go back to the screen it was on!

His wish was our command! Here’s a demo of smart screen switching in the final product:

Some technical Comments

Naturally, the terminal emulator firmware was written entirely in assembly language.

PIC18F2680 – the Oscilloclock workhorse.

We use assembly mainly because the minimalist PIC microcontroller used in the current Control Board revision has only 64K ROM, and an unbelievable 3328 bytes (yes, BYTES!) of RAM. To squeeze all the lovely Oscilloclock features in, while driving Circle Graphics real-time processing, the code and memory space has to be clean, tight, and heavily optimized at the machine code level.

Assembly. It’s the ONLY way to squeeze it all in!

For even more technical details, such as the list of VT52 (and VT100) commands supported by the OscilloTerm, and the various configuration parameters that can be tweaked to make the terminal emulator more ‘friendly’ when connecting to a specific device, check out the Support page. Worth a visit!

Why Zork? And HOW?

Zork is an interactive adventure game. But it’s old. And it’s text-based, because it was run on computers long before fancy graphics capabilities were widely available. The player explores mysterious locations, solves puzzles, and collects treasures while avoiding various hazards and creatures. All by reading text and typing commands and responses!

[Eric] was able to play Zork by loading the game’s Z-code into a Z-machine interpreter known as Frotz, on a PC connected to the OscilloTerm. But there was trickery involved!

  1. He had to recompile a version of dfrotz (the dumb terminal version of frotz) to remove the status bar and audio from the game.
  2. He needed to wrap the dfrotz output with a custom Python script to support the OscilloTerm’s 16×8 screen and simulate the required baud rate.

But now that’s done, he can play any Infocom game that runs in dfrotz on his OscilloTerm!

What’s next?

Readers would probably agree that adding a generative AI feature would be incredibly cool. For example, the War Games feature is great, but the text on the screens is all pre-programmed. What if you could interact more naturally with your Oscilloclock?

Another one for the list!


Are you a serial serial terminal collector? Do you want to play Zork on the oddest device imaginable? Or, you fancy a clock in the Oscilloclock Exo range? Contact us and let us know!

Garmin “puck” USB adapter – Finale

In the first post in the series, we looked at the Garmin 18x LVC “puck”. We talked about a particularly insidious issue that affected [Andrew] – both of his GPS units. And we saw that Oscilloclock owners really need to be able to update the firmware in these units.

In Part 2, we went through the design of an Oscilloclock Garmin 18x USB Adapter, that would allow the GPS to connect to a PC where the Garmin software runs to upgrade the firmware.

Now we conclude the series, with a treatise on the construction of the Adapter. Enjoy!

The final design

Here’s the design we arrived at in the last post. Let’s go through the steps to build it!

Fish out Fake Chips

TTL serial to USB adapter – watch out for fakes!

The key component required is a decent TTL serial to USB adapter with programmable inversion on the signal lines. But here we have to careful: many low-cost adapters out there are built around fake FTDI chips!

As mentioned before, we at Oscilloclock are pacifists. But if we were to wage war against anything, it would be fake components. They are unsafe, unreliable, unworkable, and entirely unethical. You get what you pay for, if you pay the right people. The people who design, manufacture, and support the real McCoy.

Besides ethics and reliability, there is also a practical reason we must avoid adapters based on fake FTDI chips – often the fake chips are not programmable. A true no-no. So watch out.

Program the inversion

FTDI provide a nifty utility called FT_Prog. Below shows the utility running on a PC with the adapter connected, and configuring to invert the transmit (TXD) and receive (RXD) signals.

Is it complicated? No – quite the inverse!

Dividing the input signal

We need to figure out the most elegant way to install the voltage divider – the two resistors we described earlier that reduce the impact of noise.

The cleanest way seemed to be to install the 1.2k shunt resistor directly across the receive and ground pins in the adapter itself, as below.

What about the 270 ohm series resistor on the RXD line? Well, installing this inside the adapter unit itself would require cutting tracks on the PCB. And that would compromise our effort, reliability, and aesthetics goals! So instead, we’ll insert this into the cable later on.

Cable Connector Conundrum

Recall that [Andrew] has two Garmin 18x units – one fitted with a small GPS connector and the other with a large connector. Wiring up two independent cables would have been natural. However, the TTL Serial to USB adapter came with only one cable pre-fitted with the necessary “DuPont” (a.k.a. Qi or 2550) connector.

DuPont, Qi, 2550 – they look low-cost but… Read this excellent writeup and weep

What’s the big deal? Surely we can just attach a Qi connector to another cable?

Ha! Connector tech is never that easy! It turns out that to make a perfect connection with Qi connectors, you need a special crimping tool. The Oscilloclock Lab does not have this tool. And we do NOT compromise on perfection! Given that this adapter is not the best reason to invest in an incredibly expensive tool, we decided to use the single pre-fitted cable and split out to two GPS connectors, with the larger one serving as the split point.

(In hindsight, we could have separately purchased another quality cable that was pre-fitted with the connector. Next time, folks!)

Wire up the cable

Our beloved ultra-quality Hirose connectors are a joy to look at, and a joy to use. But wiring the tiny smaller units up with high precision doesn’t exactly “spark joy”. Still, we persevere…

Now we need to install the 270 ohm series resistor. We simply cut the wire and splice it in.

A bit more heatshrink applied, and we’re done!

Closure at last

Using the 18x USB adapter, [Andrew] is at last able to upgrade his pucks and enjoy his clocks in their full glory with GPS-synchronized time and date once again!

Instructions for how to upgrade the software are posted on the Support – Garmin 18x page.


Did you enjoy this series? Stay tuned for more, as Oscillolife returns to nor….. Okay, not quite normal, but at least it returns!

Garmin “puck” USB adapter – Part 2

In the previous post, we looked at the Garmin 18x LVC “puck”. We talked about a particularly insidious issue that affected [Andrew] – both of his GPS units. And we saw that Oscilloclock owners really need to be able to update the firmware in these units.

We introduced the Oscilloclock Garmin 18x USB Adapter, that allows an Oscilloclock owner to connect their puck to a PC to enable the firmware upgrade.

In this post, we’ll take a look at the design of the Oscilloclock Garmin 18x USB Adapter. It wasn’t GPS satellite launcher (a.k.a. ‘rocket’) science, but it certainly wasn’t as straightforward as it might seem!

The Garmin 18x LVC electrical interface

Referencing the manual, the Garmin 18x series comes in 3 basic interface variations:

  • USB – USB 1.x interface, with a USB(-A) connector to plug into a PC
  • PC – RS-232 serial interface*, with a DB9 connector to plug into a PC, and a massive cigarette lighter adapter plug to obtain power
  • LVC – RS-232 serial interface*, with no connector – for wiring into a device

For our Oscilloclocks, we use the LVC variation and fit an attractive custom connector solution, avoiding the PC variation with its venerable, utilitarian, and aesthetically unpleasant DB-9 connector and cigarette lighter plug combo. (We may buck the trend one day and intentionally fit such sockets into that special retro clock build – who knows?!)

* Astute readers noticed the earlier asterisks. PC and LVC units are not quite true RS-232; their output voltage swings between 0V and +5V. Not so with devices having true RS-232 interfaces! A swing from -25V to +25V is legal and also lethal for any unsuspecting microcontroller. In the Oscilloclock design, we take advantage of Garmin’s voltage range cap to avoid having additional circuitry to adjust voltage levels.

Interfacing the 18x LVC to a PC

To upgrade the GPS firmware, the 18x LVC needs to connect nicely to a PC. But [Andrew] is an Oscilloclock Owner. He deserves more than just a good electrical connection. The interface also must be elegant and aesthetically pleasing, lightweight (for shipping), and easy to build. And – most of all – it has to be interesting enough to write a blog series about!

We can start with Figure 1 in the manual, which describes the most basic interface hook-up possible.

This interconnection option assumes two things: the PC has a DB-9 serial port, and there is a power source.

If we extend this option slightly, to take power from the PC’s USB port, we arrive at this:

Continue reading