Zork, Hitchhiker’s Guide to the Galaxy, and all the other Infocom text adventures are much more clever than the appear at first glance. They actually run on a virtual machine, with all the code for the game files squirreled away in the Z-machine format. This is great if you’re writing a game for a dozen platforms; once you have an interpreter running on one system, the entire library of games can be shipped out the door.
While the Z-machine has been ported to all the retrocomputers you can imagine and a few different brands of microcontrollers, no one has yet implemented the Z-machine in hardware. There’s a reason for this: it’s crazy. Nevertheless, [Charlie] managed to implement the Z-machine in an FPGA, using only a few extra commands for driving a display.
The circuit is constructed with a $10 eBay special FPGA, the Cyclone II EP2C5. Other than that, it’s just some Flash, some RAM, a display, and a whole lot of wire. The standard Z-machine spec is followed, version 3 specifically, meaning this text adventure on a chip can run nearly every Infocom game ever written. The most popular ones, at least.
This isn’t [Charlie]’s first time in the ring with the Infocom Z-machine. He ported the Z-machine to a freakin’ pen a few years ago.
You can check out [Charlie]’s video demo below. Because there was a bit of extra space in the FPGA, [Charlie] managed to put a Mandelbrot implementation and Space Invaders in as an easter egg.
Continue reading “The Zork Virtual Machine Implemented In Hardware”
Zork, the famous Infocom text-based adventure game, is actually quite the technical achievement in software engineering. It’s an amazingly large world to explore, albeit in text form only, running on an interpreter that allows paging, loading, and saving the complete state. All this, built to run on computers with meager amounts of RAM in the late 70s. You might think it would be easy to play Zork on an Arduino, but as [rossum] found out, that’s easier said than done (alternate blog link)
While most computers that were capable of running Zork had at least 8k of RAM, if not more, the ATMega328 in the Arduino only has 2k of RAM. Those fancy home computers of yore also had built-in video, a keyboard, and most of the time, a disk drive. The Arduino has none of that.
[Rossum] faced this challenge head on, capitalizing on the onboard hardware of the Arduino. Video is generated by using SPI mode on a UART at top speed – 8 MHz. This just shifts out pixels from the video buffer on an SD card. The keyboard is handled like any other PS/2 keyboard project on the Arduino, and audio is generated by toggling a pin at 1000Hz for a keypress, and 3600Hz for SD card access.
The finished product includes a bunch of other Infocom games on the SD card, including Leather Goddesses of Phobos, and the ability to run Hitchhiker’s Guide to the Galaxy, the game regarded by many as being better than the book. Video below.
Continue reading “The Zorkduino”
If you’re looking for something to do on a boring Sunday afternoon, how about dusting off your Arduino and playing a text adventure? [Louis] wrote in to tell us about his project called AZIP, an app that will let you play classic 1980s text adventures on your Arduino.
The famous Infocom text adventure games such as Zork and Hitchhiker’s Guide to the Galaxy (reputed to be better than the book, by the way) all ran on a virtual machine called a ZMachine. We’ve seen a few unsuccessful attempts to run a ZMachine on an Arduino, but these builds usually end up going with a Linux-based single board computer. As far as we’re aware, [Louis]’ build is the first time classic text adventures have been available on the Arduino.
[Louis] based his build on the popular Jzip ZMachine. The required hardware is fairly minimal – just an Arduino with an SD card. Right now the limitations of Flash and RAM on the Arduino means [Louis] needed to remove the game save and restore functions, but with a little clever coding and continued development those functions can be restored. Very cool indeed.
[Alexis] sent in a single board computer he’s been working on. The project goal of his build was making it easily reproducible. From looking at the schematics, it’s one of the simplest fully-functional computers we’ve seen. The build runs CP/M 2.2 off of two 3.5 inch floppies. This opens up a lot of options as to what software is already available. Although it operates over a serial terminal, [Alexis] pretty much duplicated an Osborne I, only at double the speed.
[Alexis] got a little e-fame from his earlier 8088 homebrew computer built from very early 8088’s rescued from an electronics junk shop. These 8088 computers made the blog rounds by playing Still Alive with a SID chip from a Commodore 64 and a YM2151 FM synth chip.
For now, I guess we’ll have to settle for a video of [Alexis]’ Z80 computer running CP/M. Check out a video after the break of his computer running the greatest Infocom adventure, Hitchhiker’s Guide to the Galaxy.
Continue reading “Easy to build Z80 single board computer”