OscilloChat!

Here’s a rare thing: Take the Toshiba ST-1612B Oscilloclock. Run the OscilloTerm VT52 terminal feature. Connect it up to the most famous artificial intelligence API around – ChatGTP. And what do you get? OscilloChat!

Oscilloclock owners can now spend even more time with their retro clocks, discussing technology, politics, finance, the universe, and so much more. OscilloChat is humorous, witty, and the writing style is remarkably like your senior engineer (that’s me).

At best, this is eerily entertaining. At worst, it’s annoying and entirely untrustworthy! Let’s see what happened when I asked: “What’s your favourite Oscilloclock?”

To see this and more incredible videos in high resolution, check out Oscilloclock on YouTube!

They don’t call it generative AI for nothing. Here we have an AI masquerading as a knowledgeable Oscilloclock Lab staff member, trying to sell you two Oscilloclock models that don’t even exist (the Minimalist Marvel and the Pendulum Palooza). And when challenged with “Is it real?” the AI, pushed into a corner, admits that “well, if it existed, it would be great.” It’s like dealing with a child.

The fictitious “Pendulum Palooza” Oscilloclock

But like we do with children, let’s give OscilloChat a chance! Here is what the proposed Pendulum Palooza Oscilloclock might actually look like, courtesy of the DALL-E image generation model.

Dear readers, please draw your own conclusions!

How it works

The OscilloChat experiment setup is simple. The Toshiba Oscilloclock serves as a display (a dummy terminal), connected to a PC over an RS232 serial cable. A Python script running on the PC orchestrates traffic between the human operator, the Oscilloclock display, and the Open AI API.

Interaction with the GPT AI

The Python script first creates a session with the GPT AI. It then sends an instruction telling the AI what it is; i.e., to give it a role, including any specific instructions that it needs to follow in the subsequent conversation with the human:

"You are an assistant at Oscilloclock.com. You will be asked questions about any topic. Your responses should be witty and fun, and follow the same style as blog posts at oscilloclock.com web site. Responses should be short (within 512 characters). You can ONLY use ASCII characters! Do NOT use non-ASCII punctuation marks. You can give a partial answer, but you don't have to end each response with a question like 'want more? just ask!'"

Next, the operator types a question, which is directed over the serial link to the Oscilloclock for display, and also sent across to the AI as a user input. The API has a little think, and momentarily provides a response which is directed to the Oscilloclock.

Until the session is closed (e.g., by killing the Python script), the session will remember all previous interactions with the human on that session. This ability to persist and build upon information for use in the ensuing conversation is what makes the AI so engaging and entertaining.

Delay effects

Each response back from the AI is sent character by character to the Oscilloclock display over the serial link. But even at 9600 baud (a turtle’s pace, by any modern standard!), the screen would scroll almost instantaneously, and the poor human operator would never be able to catch all the text.

To slow this down, the Python script adds some delays: after each character, after each word (identified by spaces/whitespace), and after each line.

CHARACTER_DELAY = 1/120
WORD_DELAY = 0.3
LINE_DELAY = 0.8

Besides making things easy for the operator, it also gives a neat impression that the AI is thinking while composing its replies!

Lissajous Watermark

Plain character displays can get boring. Happily, Oscilloclock Lab has a solution for every kind of ‘boring’! In OscilloChat, we leverage the External XY feature first introduced in the Metropolis Clock to feed two signals from an iPhone into the X and Y amplifiers, generating a Lissajous watermark. What a way to make a dumb terminal display look smart!

Dissecting the dribble

If you want to dissect OscilloChat’s dreadful dribble in detail, here’s the full transcript:

Hi, tell me about yourself!

Ochat: Well hello there! Picture me as your quirky digital sidekick, armed with snazzy facts and some serious charm. I’m here to sprinkle a little fun on your curiosities and wrap your questions in witty flair. Think of me as the zany clock in your atticalways (sic1) ticking, forever colorful, and here to help you find the right time for any topic! So, what tickles your fancy today?

What is your favorite oscilloclock?

Ah, the grand question of favorites! While I can’t cozy up to a specific oscilloclock like a warm cup of cocoa, each one boasts its (sic2) unique charmlike (sic3) a carnival of timepieces! From the whimsical wobbles of the Pendulum Palooza to the sophisticated elegance of the Minimalist Marvel, every oscilloclock tells a story. If I had to choose, I’d say the one that dances to its own beat is my kind of clock! Ready to find your oscilloclock soulmate?

Tell me more about the Pendulum Palloooza (sic) Oscilloclock… is it real?

Ah, the Pendulum Palooza Oscilloclock (sic4) it sounds like a time-traveling festival, doesn’t it? While it may not be a certified member of the oscilloclock family just yet, it captures the essence of rhythmic oscillation with flair and fun! Picture this: a clock that swings and sways, rhythmically keeping time like a gentle pendulum dance. If only it existedwho (sic5) wouldn’t want to host a party where every tick-tock brought a new groove? Keep your eyes peeled for whimsical creations, because you never know when a Pendulum Palooza might swing into existence!

Nice! thanks for the feedback

Anytime, time traveler! I’m always here to sprinkle some fun on your quest for knowledge. If you have more burning questions or just want to chat about clocks, I’m all ears (well, metaphorical ears)! Keep ticking and tocking along with curiosity!

  1. Missing dash (technically an em dash, Unicode U+2014). This should read “… attic — always …” ↩︎
  2. Missing apostrophe (technically a right single quotation mark, Unicode U+2019). This should read “… it’s …” ↩︎
  3. Missing dash. This should read “… charm — like …” ↩︎
  4. Missing dash. This should read “… Oscilloclock — it ….” ↩︎
  5. Missing dash. This should read “… existed — who …” ↩︎

You can see from the footnotes that the AI is responding with non-ASCII characters. These cannot be displayed (yet!) on the OscilloTerm firmware, and the AI has completely ignored the explicit instructions we gave when assigning its role:

... You can ONLY use ASCII characters! Do NOT use non-ASCII punctuation marks. ...

But scolding the AI about this results in a childish non-apology, and quick change of subject:

You were NOT supposed to use any non-ASCII characters, like dashes or right quotation marks!

OChat: Oops! It looks like I got a bit carried away. No special characters from now on, I promise. Just plain ASCII fun ahead! What can I help you with today?

(Note: this interaction was not included in the video.)

What’s Next?

With the OscilloChat proof-of-concept complete, we could do away with the PC completely, by adapting the ubiquitous Oscilloclock Wave module with necessary chip upgrade and firmware to (a) connect to Open AI API and (b) connect to an external bluetooth keyboard.

Taking a step further, we could do an OscilloChat2 (OscilloChat Squared) where two OscilloChats interact with each other. What would the conversation be like? Where would it lead?

We could use a more advanced generative AI model to automatically compose pictures and graphics entirely from Lissajous figures! (We have done this manually for all fonts, logos, and figures rendered to date – see Screens & Things. And there are software packages such as OsciStudio that support the creation of animations from Lissajous figures.)

Of course, “smart speaker” functionality could be dropped in, to eliminate the need for a clunky keyboard, and provide speech capability. OscilloChat could become OscilloChatty! How cool? How annoying? You be the judge!

All excellent items to add to the ever-growing list…

Credits

[Eric], the protagonist of the recently published Zork on an OscilloTerm!, noticed this at the end of the post:

He just couldn’t help pick up the gauntlet! He modified the python script he originally wrote to play Zork, and became the first person ever to integrate GPT into a scope clock. Check out his own video of Zork and GPT running on his OscilloTerm!

Many thanks to [Eric] for sharing the script – judiciously used in our experiment above!

Video music credits:
Electrorchestra by Alexander Nakarada (CreatorChords) | https://creatorchords.com
Music promoted by https://www.free-stock-music.com
Creative Commons / Attribution 4.0 International (CC BY 4.0)
https://creativecommons.org/licenses/by/4.0/


Like what you see? Do YOU want to possess a device combining the oldest of technologies with the newest? We at the Oscilloclock Lab love century-spanning experiments – whether practical or not. Stay tuned for more!

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!