# Fruit Jam, Zork and the Z Machine

## Overview

![]( )

![](https://cdn-learn.adafruit.com/assets/assets/000/140/829/medium800/adafruit_products_zork_screen.jpg?1761707229)

If you had a home computer in the 1980s, chances are you played the game Zork. Zork is a computer game that first appeared on home computers back then. Unlike arcade inspired games, however, Zork is a text adventure game. Using just a keyboard and text screen, you could type in sentences like “open mailbox and read leaflet” &nbsp;and the computer would understand and respond to it. Despite the apparent simplicity, stories grew out of the text adventure with puzzles to solve, making Zork a compelling game to play.&nbsp;

Zork sequels and other text adventure games appeared on home computers, thanks to the Z Machine, an interpreter for running text adventure games. With the release of a Z Machine for [Adafruit's Fruit Jam](https://www.adafruit.com/product/6200 "Fruit Jam product page") (CPZ Machine), owners can now play these text adventures in their original full text glory!

Read more for a brief history of Zork and the Z Machine and how to install it and play it on your Fruit Jam.

![Zork screen](https://cdn.bsky.app/img/feed_fullsize/plain/did:plc:riuhytc6ocu462yaar5uahuw/bafkreib62bb7hlp6k3vahttyj5wnpdovsxcayuotxfrn7pfttepx3uoxiq@jpeg )

Info: As of November 2025, Microsoft's Open Source Programs Office has made Zork I, Zork II and Zork III available under the MIT License, citing its historical significance [(link)](https://opensource.microsoft.com/blog/2025/11/20/preserving-code-that-shaped-generations-zork-i-ii-and-iii-go-open-source).

## Parts
Featured
### Adafruit Fruit Jam - Mini RP2350 Computer

[Adafruit Fruit Jam - Mini RP2350 Computer](https://www.adafruit.com/product/6200)
We were catching up on a recent [hackaday hackchat with eben upton](https://hackaday.io/event/202122-raspberry-pi-hack-chat-with-eben-upton)&nbsp;and learned some fun facts: such as the DVI hack for the RP2040 was inspired by <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/6200)
[Related Guides to the Product](https://learn.adafruit.com/products/6200/guides)
![Angled shot of assembled mini computer PCB with plate.](https://cdn-shop.adafruit.com/640x480/6200-10.jpg)

Featured
### Snap-on Enclosure for Adafruit Fruit Jam

[Snap-on Enclosure for Adafruit Fruit Jam](https://www.adafruit.com/product/6425)
Here is a cool&nbsp;and minimal enclosure for your [Fruit Jam](https://www.adafruit.com/product/6200)&nbsp;to keep it safe during use and transport. This case has been custom-designed and 3D printed to accommodate all&nbsp;connection ports of the Fruit Jam. No screws or...

In Stock
[Buy Now](https://www.adafruit.com/product/6425)
[Related Guides to the Product](https://learn.adafruit.com/products/6425/guides)
![Angled Demo Shot of the Assembled Snap-on Enclosure with the Fruit Jam inside and powered on showing a rainbow effect of the LED's.](https://cdn-shop.adafruit.com/640x480/6425-02.jpg)

Featured
### Mini Chiclet Keyboard - USB Wired - Black

[Mini Chiclet Keyboard - USB Wired - Black](https://www.adafruit.com/product/1736)
Add a good quality, slim keyboard to your&nbsp;Raspberry Pi, Beagle Bone Black, or other single-board-computer with this sleek black chiclet keyboard. It's a full QWERTY keyboard with a USB cable and is compatible with all operating systems. We tried many keyboards to find one that felt...

In Stock
[Buy Now](https://www.adafruit.com/product/1736)
[Related Guides to the Product](https://learn.adafruit.com/products/1736/guides)
![Angled shot of a Black woman's silver-blue manicured hands on a slim, black keyboard.](https://cdn-shop.adafruit.com/640x480/1736-04.jpg)

Featured
### HDMI Cable - 1 meter

[HDMI Cable - 1 meter](https://www.adafruit.com/product/608)
Connect two HDMI devices together with this basic HDMI cable. It has nice molded grips for easy installation, and is 1 meter long (about 3 feet). This is a HDMI 1.3 cable.

We're now stocking a very fancy Official Raspberry Pi cable with overmolding and a Pi logo. Please note...

In Stock
[Buy Now](https://www.adafruit.com/product/608)
[Related Guides to the Product](https://learn.adafruit.com/products/608/guides)
![Official Raspberry Pi HDMI Cable - 1 meter](https://cdn-shop.adafruit.com/640x480/608-03.jpg)

Featured
### USB Type A to Type C Cable - approx 1 meter / 3 ft long

[USB Type A to Type C Cable - approx 1 meter / 3 ft long](https://www.adafruit.com/product/4474)
As technology changes and adapts, so does Adafruit. This&nbsp;&nbsp; **USB Type A to Type C** cable will help you with the transition to USB C, even if you're still totin' around a USB Type A hub, computer or laptop.

USB C is the latest industry-standard connector for...

In Stock
[Buy Now](https://www.adafruit.com/product/4474)
[Related Guides to the Product](https://learn.adafruit.com/products/4474/guides)
![Angled shot of a coiled black, USB-C to USB-A cable.](https://cdn-shop.adafruit.com/640x480/4474-02.jpg)

Featured
### 7" Display 1280x800 (720p) IPS + Speakers - HDMI/VGA/NTSC/PAL

[7" Display 1280x800 (720p) IPS + Speakers - HDMI/VGA/NTSC/PAL](https://www.adafruit.com/product/1667)
Yes, this is an adorable small HDMI television with incredibly high resolution **and built in 3W stereo speakers**! We tried to get the smallest possible HDMI/VGA display with high-res, high-contrast visibility. The visible display measures only 7" (17.8cm) diagonal, and the TFT comes...

In Stock
[Buy Now](https://www.adafruit.com/product/1667)
[Related Guides to the Product](https://learn.adafruit.com/products/1667/guides)
![Front view of assembled and powered on HDMI 4 Pi - 7" Display. The monitor displays a desktop background with a raspberry logo.](https://cdn-shop.adafruit.com/640x480/1667-00.jpg)

# Fruit Jam, Zork and the Z Machine

## Zork: the ChatGPT of the 1980s

Chatting with computers is common today, just ask ChatGPT :-) &nbsp;Unlike the near limitless resources that ChatGPT and other AI chatbots use to generate their responses (and possibly contribute to global warming), Zork was limited to as little as 32 KB of memory in its first release. This included not only the chat responses but also game play as well. Despite this apparent weakness, Zork's responses to entered text were at times smart and witty.

Zork was originally developed in the late 1970s on a DEC PDP-10 computer at MIT using a descendant of the LISP language. There was also a FORTRAN version that was translated to the C language. In 1979,&nbsp; the development moved to a commercial endeavor through the startup company **Infocom** , founded by MIT staff and students.

Due to the many different and incompatible computer systems at the time, Zork was divided into two parts when it was rewritten: an interpreter and a story file. The same story file could be read on any computer, while only the story interpreter had to be created for each different kind of computer. This also allowed new stories and sequels to be created that could run using the same interpreter. The name for the interpreter was called the Z Machine. It contained its own list of machine codes, much like a microprocessor, but within its own virtual environment. These machine codes were written for each computer where Zork would run, which could vary widely depending on the capabilities of the computers back in the 1980s. Today, there are several open source Z Machine implementations available for current computers, including one for the Adafruit Fruit Jam, the CPZ Machine.&nbsp;

![DEC PDP-10 computer (Wikipedia)](https://cdn-learn.adafruit.com/assets/assets/000/140/523/medium800/adafruit_products_PDP-10_1090.jpg?1760705862 DEC PDP-10 computer (Wikipedia))

When the interactive fiction game of Zork first appeared on home computers in the '80s, it was magical. Users playing the game were able to type sentences like “open mailbox and read leaflet” and the computer would understand it. The parsing engine was truly a technological feat for 8 bit computers at the time, some of which had only 48KB of memory.

Also, there was no “cloud” where sentences were uploaded to a cloud service for analysis like Amazon’s Alexa and Google Home. Parsing and analysis was all done locally. The end result was a rich game environment that provided hours of entertainment.&nbsp;

One reason Zork is popular is due to its dry humor. You can get smart aleck responses to some commands:

\> pray  
If you pray enough, your prayers may be answered.

\>go down chimney  
Only Santa Clause climbs down chimneys.

Sadly, the popularity of Zork and other interactive fiction games declined as home computers became more powerful and games with computer graphics emerged. Fortunately, Zork still lives on today through emulators and ports to new environments like the CPZ Machine.

**Fun Fact:** To save memory, characters in the Z Machine are coded as 5 bits as opposed to 8 bit characters found today in modern computers. This allowed storing 3 characters (3x5 = 15bits ) into 2 bytes (2x8 = 16 bits). A shift character was used to differentiate uppercase, lowercase, and special characters.

![Infocom display at the National Videogame Museum, Frisco, Texas. (photo by author)](https://cdn-learn.adafruit.com/assets/assets/000/140/524/medium800/adafruit_products_infocom.jpg?1760707872 Infocom display at the National Videogame Museum (http://www.nvmusa.org/), Frisco, Texas. (photo by author))

# Fruit Jam, Zork and the Z Machine

## Zork on the Adafruit Fruit Jam

The requirements to run a Z Machine are straightforward:

- Enough RAM to hold the Z Machine and story file
- Storage to store one or more story files and associated save files
- Keyboard and terminal support

Fortunately, the Adafruit Fruit Jam meets all these requirements nicely.&nbsp;

Most Z Machines are written in the C language. However, the CPZ Machine is written in CircuitPython (hence the "CP" in "CPZ Machine").&nbsp; This allows for easy installation either standalone or within the [Fruit Jam OS environment](https://learn.adafruit.com/fruit-jam-os/).

Since it is an interpreter, the CPZ Machine can run any program that supports version 3 Z-coded games. In addition to the three Zork games included, there are dozens of other version 3 games available from the internet.

Back in the 1980s, computers were limited to monochrome and low resolution color screens. Since Zork was a text adventure, it would look better on a monochrome display. Green, amber, and black and white screens were popular for running Zork. The CPZ Machine recreates this with color themes, using the name of the computer most associated with the color theme:

TRS80 - white text on black background  
Lisa - black text on white background  
Compaq - green text on black background  
Amiga - white text on blue background  
Amber - amber text on black background

To switch to a theme, use the command "theme {color\_theme}", matching one of the themes above. To get a list of themes, use the command "themes".

A blinking cursor is there too, to help "sell" the look of a 1980s text screen.

![Zork ](https://cdn.bsky.app/img/feed_fullsize/plain/did:plc:riuhytc6ocu462yaar5uahuw/bafkreib62bb7hlp6k3vahttyj5wnpdovsxcayuotxfrn7pfttepx3uoxiq@jpeg Zork running on the CPZ Machine with the Compaq (green) theme.)

Frequently saving games is important in Zork and other games in case you unexpectantly "get eaten by a grue"&nbsp; or other untimely deaths in the game. The CPZ Machine supports multiple save points so you can move between different points in the game. Use the command, "save", and you will get a prompt for a save name.

The CPZ Machine saves all its games in the&nbsp; **CPSAVES** drive in the **/cpz** folder. This drive is available on the Adafruit Fruit Jam, and is writable by CircuitPython.

# Fruit Jam, Zork and the Z Machine

## CircuitPython Install

Circuit Python version 10.x is required to run the CPZ Machine.

For Fruit Jam OS, follow the CircuitPython instructions provided in the Learn Guide:

[Fruit Jam CircuitPython Installation Instructions](https://learn.adafruit.com/fruit-jam-os/install-circuitpython)
## CPZ Machine in Standalone Mode

For running CPZ Machine in standalone mode, download and install the latest version of CircuitPython with the instructions here:

[Download the latest CircuitPython for Fruit Jam from CircuitPython.org](https://circuitpython.org/board/adafruit_fruit_jam/)
Download the libraries at the CircuitPython.org site:

&nbsp;

[Download the latest CircuitPython Libraries](https://circuitpython.org/)
You can copy all the libraries to the **/lib** folder on your CircuitPython drive. Or, at a minimum, you will need to install at least the following libraries into the **lib** folder:

adafruit\_bitmap\_font/  
adafruit\_display\_shapes/  
adafruit\_display\_text/  
adafruit\_esp32spi/  
adafruit\_fruitjam/  
adafruit\_imageload/  
adafruit\_io/  
adafruit\_minimqtt/  
adafruit\_portalbase/  
adafruit\_connection\_manager.mpy  
adafruit\_fakerequests.mpy  
adafruit\_ntp.mpy  
adafruit\_requests.mpy  
adafruit\_sdcard.mpy  
adafruit\_simplemath.mpy  
adafruit\_ticks.mpy  
adafruit\_tlv320.mpy  
neopixel.mpy

## CPZ Machine in Fruit Jam OS Mode

There is a learn guide available on how to install Fruit Jam OS. The Fruit Jam OS installs all the libraries needed for the CPZ Machine. Follow this guide and then you can install the CPZ Machine in the next page.

[Install Fruit Jam OS Learn Guide](https://learn.adafruit.com/fruit-jam-os)
# Fruit Jam, Zork and the Z Machine

## Installing the CPZ Machine

The CPZ Machine can be installed either standalone or within the [Fruit Jam OS](https://learn.adafruit.com/fruit-jam-os/) environment. The Fruit Jam OS is a collection of CircuitPython games and utilities that can be launched from a GUI interface.&nbsp;

To install using either environment, find the latest version of the CPZ Machine from the link below, then click the "Source code (zip)" link under the Assets section to download it:&nbsp;

[CPZ Machine Code from GitHub](https://github.com/ZContent/CPZ_Machine/releases/latest)
In a standalone environment, unzip and copy the files onto the root folder of your CircuitPython drive. For the Fruit Jam OS, first create a folder named **CPZ** or similar under the **apps** folder. Unzip and copy the files and folders to this folder. The next time you restart the Fruit Jam OS, you should see the "CPZ Machine" in the list of applications.

In addition to the three Zork games included, The CPZ Machine can play dozens of other version 3 Z Machine games (usually with a **.z3** extension). You can find other compatible games and resources on the internet that can also be played with the CPZ Machine, including these sites:

[The Interactive Fiction Archive](http://ifarchive.org/)  
[The Interactive Fiction Database](http://ifdb.tads.org/)  
[Z-Machine](https://www.z-machine-matter.com/)

To install other games, download and copy them to the **stories** folder on your CircuitPython drive.

# Fruit Jam, Zork and the Z Machine

## Playing the Game

![](https://cdn-learn.adafruit.com/assets/assets/000/140/838/medium800/gaming_a.jpg?1761763659)

## Starting the Game

From standalone mode, the program should start automatically. From the Fruit Jam OS, use the cursor or mouse to select the "CPZ Machine" game (you may need to move to the next page if you don't see it on the first page).

Once the program starts, you will be asked to select a story file. These files are located in the **/stories** folder, where you can add more.&nbsp; Once you select a story file, it loads and the game begins!

## Overview of Commands

The game is a text adventure and recognizes different words that you type in to the computer.&nbsp;  
The following is a list of some (but not all) of the verbs that you can use:

- look
- take
- examine
- kill
- talk
- open
- close
- enter
- exit
- push
- pull
- lift
- move
- tie&nbsp;

You can also use compass directions to indicate that you want to move in that direction. For example, you can type: "go north" or you can type "north" or just "n" Typical directions are

N,S,E,W,NE,NW,SE,SW,Up,Down&nbsp;

You can enter several commands together on the same line, like "open mailbox and read leaflet".

You can enter the word, "inventory" or just "i" to see what items you are carrying. That can be helpful for when you need to lighten your load.

To save a game, type "save" and the name of the game you want to save. To load a game, type "restore" and the name of the game you want to load. To restart the game, type "restart". To exit or play a different game, type "quit". To get a list of color themes, use the command, "themes". To set the theme, use "theme {color\_theme}".

## Stuck in the Game?

No spoilers here, but if you are stuck in the game, an internet search will most likely find a clue or a solution to your dilemma, after all, people have had 40+ years to solve the game!

Have fun!


## Guide Products

### Adafruit Fruit Jam - Mini RP2350 Computer

[Adafruit Fruit Jam - Mini RP2350 Computer](https://www.adafruit.com/product/6200)
We were catching up on a recent [hackaday hackchat with eben upton](https://hackaday.io/event/202122-raspberry-pi-hack-chat-with-eben-upton)&nbsp;and learned some fun facts: such as the DVI hack for the RP2040 was inspired by <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/6200)
[Related Guides to the Product](https://learn.adafruit.com/products/6200/guides)
### Snap-on Enclosure for Adafruit Fruit Jam

[Snap-on Enclosure for Adafruit Fruit Jam](https://www.adafruit.com/product/6425)
Here is a cool&nbsp;and minimal enclosure for your [Fruit Jam](https://www.adafruit.com/product/6200)&nbsp;to keep it safe during use and transport. This case has been custom-designed and 3D printed to accommodate all&nbsp;connection ports of the Fruit Jam. No screws or...

In Stock
[Buy Now](https://www.adafruit.com/product/6425)
[Related Guides to the Product](https://learn.adafruit.com/products/6425/guides)
### Mini Chiclet Keyboard - USB Wired - Black

[Mini Chiclet Keyboard - USB Wired - Black](https://www.adafruit.com/product/1736)
Add a good quality, slim keyboard to your&nbsp;Raspberry Pi, Beagle Bone Black, or other single-board-computer with this sleek black chiclet keyboard. It's a full QWERTY keyboard with a USB cable and is compatible with all operating systems. We tried many keyboards to find one that felt...

In Stock
[Buy Now](https://www.adafruit.com/product/1736)
[Related Guides to the Product](https://learn.adafruit.com/products/1736/guides)
### HDMI Cable - 1 meter

[HDMI Cable - 1 meter](https://www.adafruit.com/product/608)
Connect two HDMI devices together with this basic HDMI cable. It has nice molded grips for easy installation, and is 1 meter long (about 3 feet). This is a HDMI 1.3 cable.

We're now stocking a very fancy Official Raspberry Pi cable with overmolding and a Pi logo. Please note...

In Stock
[Buy Now](https://www.adafruit.com/product/608)
[Related Guides to the Product](https://learn.adafruit.com/products/608/guides)
### USB Type A to Type C Cable - approx 1 meter / 3 ft long

[USB Type A to Type C Cable - approx 1 meter / 3 ft long](https://www.adafruit.com/product/4474)
As technology changes and adapts, so does Adafruit. This&nbsp;&nbsp; **USB Type A to Type C** cable will help you with the transition to USB C, even if you're still totin' around a USB Type A hub, computer or laptop.

USB C is the latest industry-standard connector for...

In Stock
[Buy Now](https://www.adafruit.com/product/4474)
[Related Guides to the Product](https://learn.adafruit.com/products/4474/guides)
### 7" Display 1280x800 (720p) IPS + Speakers - HDMI/VGA/NTSC/PAL

[7" Display 1280x800 (720p) IPS + Speakers - HDMI/VGA/NTSC/PAL](https://www.adafruit.com/product/1667)
Yes, this is an adorable small HDMI television with incredibly high resolution **and built in 3W stereo speakers**! We tried to get the smallest possible HDMI/VGA display with high-res, high-contrast visibility. The visible display measures only 7" (17.8cm) diagonal, and the TFT comes...

In Stock
[Buy Now](https://www.adafruit.com/product/1667)
[Related Guides to the Product](https://learn.adafruit.com/products/1667/guides)

## Related Guides

- [Using a Keyboard with USB Host](https://learn.adafruit.com/using-a-keyboard-with-usb-host.md)
- [Adafruit Fruit Jam](https://learn.adafruit.com/adafruit-fruit-jam.md)
- [MagTag IoT Menorah](https://learn.adafruit.com/magtag-iot-menorah.md)
- [I2S Microphones with CircuitPython](https://learn.adafruit.com/i2s-microphones-with-circuitpython.md)
- [Hacking the Teenage Engineering EP-2350 Ting](https://learn.adafruit.com/hacking-the-teenage-engineering-ep-2350-ting.md)
- [Raspberry Pi Video Looper 2](https://learn.adafruit.com/raspberry-pi-video-looper-2.md)
- [Expressive Pixels for Adafruit Matrix Portal](https://learn.adafruit.com/expressive-pixels-for-matrix-portal.md)
- [No-Code MagTag Every Day Goal Tracker](https://learn.adafruit.com/no-code-magtag-every-day-goal-tracker.md)
- [NeoPixel Aquarium with Submersible Lights](https://learn.adafruit.com/neopixel-aquarium-with-submersible-lights.md)
- [itsaSNAP Apple Health Status Board](https://learn.adafruit.com/itssnap-apple-fitness-status-board.md)
- [Bubble Table with LED Animations and IR Remote Control](https://learn.adafruit.com/bubble-table-with-led-animations-and-ir-remote-control.md)
- [LED Masquerade Masks with n00ds](https://learn.adafruit.com/led-masquerade-masks-with-n00ds.md)
- [Laser-Cut Layered LED Art Panel (Wood + Acrylic) with WLED](https://learn.adafruit.com/laser-cut-layered-led-art-panel-wood-acrylic-with-wled.md)
- [Adafruit QT Py Activity Timer and Hydration Reminder](https://learn.adafruit.com/qt-py-activity-timer-and-hydration-reminder.md)
- [Create a Memory Game on Fruit Jam Metro RP2350](https://learn.adafruit.com/create-a-memory-game-on-metro-rp2350.md)
- [Breakout Game on the Metro RP2350 and Fruit Jam](https://learn.adafruit.com/breakout-game-on-metro-rp2350-and-fruit-jam.md)
- [Google Graveyard with Adafruit MagTag](https://learn.adafruit.com/google-graveyard-with-adafruit-magtag.md)
