Skip to content

CPZ Machine

The CPZ Machine is a CircuitPython implementation of Zork and the Z Machine. I always have been fascinated with Zork since I first played it on the Commodore 64 many, many years ago. More recently, I ported Zork and the Z Machine to Arduino using an Adafruit Itsy Bitsy microprocessor. Back then I thought a Circuit Python version would be nice but I thought it would be difficult to put the hardware together to make it work. Plus, I didn’t know how well the performance would be, since an interpreted language would need to emulate a virtual machine. When the Adafruit Fruit Jam was released in the spring of 2025, I found the hardware that could handle it. Specifically, the Z Machine needs:

  • Sufficient memory (probably at least 512KB)
  • A Keyboard
  • Storage for game files and saved games
  • A method to display the game on a terminal like screen

The Fruit Jam has all these things. Using the Arduino port of the Z Machine, I created the CPZ Machine using CircuitPython. The only question remaining was if the performance would be sufficient. After playing Zork for several hours on the Fruit Jam, I can say “yes”, the performance is great. I even wrote a learn guide for Adafruit. Follow that learn guide (link below) for details on installing CPZ on your Fruit Jam.

Resources

Adafruit Learn Guide
GitHub repository

Blog Articles

  • Zork I, II and III Now Officially Open Source
    Microsoft has released the original story files of Zork I, II and III as open source. You can find more information, including some history of the Zork Trilogy here -> https://opensource.microsoft.com/blog/2025/11/20/preserving-code-that-shaped-generations-zork-i-ii-and-iii-go-open-source
  • Learn Guide Now Available for CPZ Machine
    A learn guide is now available for the CPZ Machine. The learn guide contains info on how to download and install the CPZ Machine on the Adafruit Fruit Jam. It also provides some history about the origins of Zork and the Z Machine. You will find the learn guide here -> https://learn.adafruit.com/zork-and-the-z-machine
  • Using CircuitPython For Running a Z Machine? Yes!
    For several years I have been thinking about how cool it would be to have a CircuitPython-based Z Machine for running Zork and similar adventure games. Unfortunately, no one had written one that I know of. Then back in the spring, I saw Adafruit announce the Fruit Jam, a CircuitPython powered device that provided keyboard… Read More »Using CircuitPython For Running a Z Machine? Yes!