Jump to content
  • entries
    334
  • comments
    900
  • views
    258,304

Z3


EricBall

887 views

Zork! HitchHikers! Ahh, the memories of glowing green text and the frustration a text adventure can bring.

 

Interestingly, Infocom had the forsight to create their games as a program for a virtual computer. That way they didn't have to create separate versions of each for each home computer. The same game file could run on multiple home computers using the existing interpretters. And when a new home computer reached the market, the whole library of games would be available by just writing one interpretter.

 

My plan is to create a Z3 interpretter for the Propeller. (Although I'm skipping the features only used by two Z3 games.) No small feat given the Prop only has 32K of onboard RAM (plus 2K dedicated to each processor) while the Z3 story files can reach 128K. Obviously some kind of virtual memory will be required. The plan is to use standard SD cards to store the Z3 story files. When first started, the interpretter will copy the Z3 file to a SAV file and swap pages between the SD card and RAM. I'm hoping I will have 16K available for the story file and 64 pages is a large enough working set that the swapping won't bog down the game too much.

 

But, the first step is to write the Z3 interpretter in C on my PC. Although there are Z-Machine interpretters out there, many of them are designed to handle all 8 versions of the Z-Machine; while I'm more interested in keeping the size requirements as small as possible. So I'm limitting myself to just version 3 (Z3). This includes more than half the Infocom catalog, including Zork & HitchHikers. I also want to avoid any license issues. (Not that I have a problem with the GPL per-se, but the Propeller Object Exchange is based on the MIT/X.11 license which doesn't have a copyleft clause. So if I use code which is GPL'd, then I won't be able to relicense it and put it on ObjEx.)

 

And although I'd love to just start writting in SPIN, the PC is a much better debugging environment. I also won't have to deal with the whole SD/virtual memory issue.

2 Comments


Recommended Comments

Dude, I would be all over that on the Prop!!

 

With there being serial, TV, VGA drivers, a Z machine would be a great show off.

 

The state of the SD access is actually decent. I'm pretty sure one can be added to the demo board. For sure it's easy on a protoboard / HYBRID.

 

Been working with your sprite driver. Nicely done. It's simple compared to other similar efforts.

Link to comment

90% of Z3.C is done (which means I'm only 10% finished, of course).

 

Still todo:

input & parsing

status line

initialization (i.e. load file to memory)

save /load (phase 2)

input_stream / output_stream (phase 3 - not needed for HitchHikers)

 

Of course, the challenge with a project like this is the debugging can't start until all the code is done. The C code is also a little ugly, but I'm avoiding doing any optimization until I port it to spin.

Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...