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.

13 thoughts on “The Zorkduino

  1. 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.

    1. The Hitchhiker’s game was also written by Douglas Adams, and it is therefor quite possible for it to be better than the book.

      I’d love to score a copy of that game again. I haven’t played it since 1986, and I could never get past the babel fish sequence.

      1. Hmm. Robe on the hook, towel on the grate, satchel in front of the panel, junk mail on top of satchel. Am I forgetting a step?

        1. Even I remembered that, and I haven’t even played the game! Dainbramage, we expect your geek license returned by post.

          1. The radio version came first, then the book, then the TV version (I think). Then some sequels and things happened, and somehow a pretty awful film got made. Starring that sarky, confused-looking tit-end out of The Office (the original one) and practically every other film.

    2. The wonderful thing about the tHGttG game is that it makes you feel *exactly* like Dent, even if you’ve memorized the books. First time I played I laid down in front of the bulldozer at the beginning (because duh) only to get run over because I didn’t get the driver’s attention first.

      I especially love how in the Vogan poetry scene you actually have to type “enjoy poem.”

  2. “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. 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)…

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