Twisty passages, all different
Home ] Up ] New Stuff ] Minix Port ] Magic-2? ] Photo Gallery ] Construction ] Technical Info ] My Other Projects ] Links ]

10/31/2004

I hit an important milestone in Magic-1's bring-up this weekend: "The Colossal Cave Adventure" is now up and running.  For me, this is a big deal on several fronts.  From a purely technical standpoint, it is an important demonstration of the basic solidity of Magic-1's hardware and software.  In order for it to work, a huge number of things need to work correctly - including support for a simple file system, random file I/O and the ability to have as many as seven open file streams at once.

Try it out.  Telnet to Magic-1, select 'X' to bring up the process menu and then choose the number for Adventure.

For me personally, though, this is important for other reasons.  First, some history.  "Adventure" is the father of all of the interactive fictions games.  It was originally written by Will Crowther in the early 70's and then enhanced and modified by Don Woods and others.   Many versions exist, and the one I used is the "501-point" version that shipped with Minix.  Adventure is among the most famous of early computer games, and inspired many follow-ons suchas Zork, Rogue and Ultima.

It also had something to do with where I am today.

My personal adventure with computers really began in 1980 when I spent nearly all of the money I had on a TRS-80 Model 1 computer.   My Model-1 had 16-Kbytes of RAM and a casette drive to load programs.  I didn't really have any useful work for the computer - it was something to play with.  The Model-1 had very rudimentary graphics, but that was not a problem to me.  The games I really liked were text-based.  Besides Star-Trek and Galactic Empire, I mostly played adventure games.  I started with ones that Radio Shack sold: Pyramid and Haunted House, but then discovered the Scott Adams Adventures.

Thoughout this time, I didn't even know that these games were imitations of the Colossal Cave Adventure.  All I knew is that they were a fun challenge.  There were also incredibly frustrating as well.  Unlike today with the internet, I didn't have access to any cheat sheets or game hints.  I was working as the wire services editor at a small Kansas newspaper (The Parsons Sun), and didn't even know anyone else who owned a personal computer.  So, when I got stuck in a game I was really stuck.

It turns out, though, that that was a good thing.   I knew that the answer to the games' riddles was somewhere inside of the computer.  If only I understood how the computer worked, I could find the answer - or perhaps I could even read the program itself and figure it out.

And that is the real reason for the career I have today.

At some point, I figured a trick to break the Scott Adams games.  I'd hit the reset button on the computer in the middle of a game.  Much of the code and data would still be present in memory.  I'd then write a small BASIC program to scan memory and display ASCII strings.  That would frequently give me clues to get past trouble spots.

It wasn't enough, though.  Next I wanted to know what the code was doing.  So, I bought a book on Z80 assembly language and an assembler and set out to learn how the code of the game worked.  I didn't get very far, but learned quite a bit, and discovered that I really liked this stuff.

Then, in the Spring of 1981 I was promoted to managing editor of the newspaper.  Along with the promotion came a pay raise, and I splurged and bought an expansion interface and single 5.25" floppy drive for my Model-1.  It's hard to describe how cool it was to move from casette tape drive to floppy disk (which at the time was 36-track, single density, single sided - stored about 54Kbytes of data).  Program loads went from 15 minutes to a few seconds, and on top of that was the added benefit of the clicking sound of the drive head stepping and select LED blinking.

Anyway, that's where Adventure comes into the picture.   A port of the Colossal Cave Adventure was available for the TRS-80 on floppy disk only.  It was done by an outfit called SoftWin, and I believe was sold by Microsoft.  I bought a copy and was hooked.  I spent many, many hours wandering through twisty passages searching for treasure.  And, I also ran into spots where I couldn't figure out the puzzle.  I tried my old trick of searching for left-over ASCII strings in memory after a reset, but no luck.

Because the game contually accessed the disk during play, I figured that the game text (and therefore solutions to problems) must be on the disk.  So, I decided to learn about disk drives.  I eventually got a disk editor and examined the game disk to see what I could learn.  I spent hours trying to break the game, but realized there was some encryption involved (which I now know was pretty trivial).

So, unable to cheat, I played the game honestly - completing a full map of all rooms until I was able to win with a perfect score.  The key thing, though, was that this game caused me to take a much broader look at computers - the memory, CPU, I/O systems, etc.  And I found I really enjoyed it.

It was during my Colossal Cave Adventure days that I decided on a career change.  In the summer of 1981 I quit my job at the newspaper and enrolled in the computer science program at the University of Kansas.

And now, nearly a quarter of a century later, I stil find myself excited by the sight of twisty passages, all different.  Only this time, when I hit <enter> I can visualize (at least to a superficial level) the decoding of the keyboard, the ASCII end-of-line code serialized and sent through the rs-232 interface, the complete compiler toolchain that created the Adventure program that accepts and processes the input, the actions of the CPU processing it, the simple logic gates that comprise the CPU, and even the transistors that make up the logic gates.

And the best part of all is that even though I now understand how it works, it still seems like magic.