The Zorkduino

zork

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.

Comments

  1. Z00111111 says:

    How can you have a game better than the Hitchhikers Guide to the Galaxy book? I’ve encountered nothing of the genre better than that book yet.

  2. Ren says:

    “Those fancy home computers of yore also had built-in video, a keyboard, and most of the time, a disk drive.”

    Most of the time (for me) it was a cassette deck.

  3. Xark says:

    Yeah mate, now that is a hack! Right up there with Linux on Arduino IMHO, but this looks like it might actually be enjoyable to use. Bonus points for simulated Atari 8-bit disk drive “beeps” too.

    BTW, I’m pretty sure the frame-buffer is not on the SD card (using character buffer in SRAM)…

  4. I modified a z3 interpreter to make Zork and others available online at portablequest.com

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 94,571 other followers