Skip to content

Using CircuitPython For Running a Z Machine? Yes!

  • by

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 and video support. With CircuitPython’s support for storing files needed for game files and save points, I saw the potential that this device had, as a Z Machine and had all the requirements for running one.

Once I received my Fruit Jam, I began work on writing the Z Machine. I based my code on the A2Z Machine I wrote several years ago for the Arduino-based ItsyBitsy M4 Express by Adafruit. The task was to rewrite the C language code to CircuitPython. I replaced some C language routines like word parsing to much easier CircuitPython equivalents. I also added new features like multiple font support.

The end result is the CPZ Machine: A native Z Machine for the Adafruit Fruit Jam running Circuit Python for playing Zork and similar games.

You can find more information about the CPZ Machine and download it from GitHub here: https://github.com/ZContent/CPZ_Machine