Tandy WP-2 Running an Infocom Interpreter

Tandy WP-2 Running Infocom Interpreter
Tandy WP-2 Running Infocom Interpreter

A number of years ago I stopped off at a garage sale and picked up a Tandy portable wordprocessor WP-2.  I didn’t do anything with it at the time, but set it aside for further analysis.   Late this spring, I came across it on a shelf, and pulled it out to take a closer look.

The WP-2 is based on the Z80 processor and contains 256K of banked ROM, 32k RAM, an 8 character by 80 column display, serial port, cassette port, and printer port.  It also has a slot intended for extra RAM and ROM cards.  Inside, it has a socket for additional memory.  Most individuals added a second 32K ram chip, but 128K chips work as well.  The data in RAM is preserved in memory by a small coin cell battery.  The word processor normally runs for 20 hours off of 4 AA batteries.

The WP-2 serial port was intended for two purposes.  The WP-2 has a terminal program built into it, but will also connect to the same floppy drives that were used on the Model 100 and Model 102.   The Model 100 community has come up with software to emulate these drives, which proved to be extremely useful.

Some searching pulled up the service manual for the WP-2.  Unlike many service manuals of today, this one included a huge wealth of information.  Additionally, it appears that the original developers (in this case Citizen) had intended for the WP-2 to be expandable.  The service manual includes schematics, memory maps, and a description of the ROM entry points for procedures such as clearing and writing to the screen, operating on files, and accessing the additional memory banks.

In short, it was a treasure trove for the tinkerer!

As I considered my options, I looked at the core pieces of the device.  It had a keyboard, decent sized text display, 128K of built-in mass storage, 32K of RAM, and a floppy drive.  In my case, I would emulate the floppy drive with my laptop.  To me, a text adventure game would be a natural fit.

My own experiences with the Infocom games and their portability came to mind.  The early game files all fit within 128K, and use a text only output format.  The game interpreters themselves use only a fraction of the 32K of RAM, and automatically page in information as needed.

The next step was to try and find an interpreter that I could adapt to the WP-2.  I explored adapting the CP/M based interpreter, as well as others, but they were all tightly tuned to the systems upon which they ran.  However, I came across ZXZVM, which is written in a portable manner.  It already runs on the Spectrum, Spectrum +3, and Amstrad systems.  Source was available, as well as a brief porting guide.

My initial attempt at a program to write hello world to the screen was successful, and led to other small routines.  One of these was to dump the contents of the ROM to the serial port.  I could use this with a disassembler and the service manual to obtain a clear idea as to how the internal routines worked.  With the source to ZXZVM, a basic idea of how to use the internal routines, and a disassembly for a more detailed view of them, I was ready to start.

I started by breaking the large Infocom story file into smaller pieces and then loading them into the extra 128K of extra RAM.  This space is normally used for files, but I wanted to just store the raw data there.  ZXZVM includes routines to read/write each byte from the story file and the virtual machine’s memory.

Once the virtual machine was able to obtain the story data, it needed a mechanism to read the keyboard and write to the screen.  I was able to use the internal routines to do most of the work for this, although they needed some fine tuning to ensure that they fit the expectations of the interpreter.

In the process of adjusting the interpreter, I removed the code that handled later version games.  Given the small screen size, and additional game size, it wasn’t needed and the removal provided additional space in main memory.

At this point, with some polishing, I had a basic interpreter running.

However, I was still missing a key element required for some of the games.  I needed the ability to save and restore the game.

After searching, I came across and purchased one of the few 32K RAM cards that Tandy produced, and added it to my WP-2.

At this point, I added the additional code to save and restore the game files to the external memory card.  I found that I could save only two games to the card, but that the same code could be used to save to a virtual floppy drive if the system was attached to my laptop.

Tandy WP-2 Zork Leaflet
Tandy WP-2 Zork Leaflet

The net result is an extremely playable version of the Infocom interpreter.  I have been able to play games such as Zork and Planetfall to completion without issues.  The battery backup for the memory makes it just like picking up a book, to play for a while, and then put away until later.

As the leaflet in Zork 1 says, “No computer should be without one!”

9 thoughts on “Tandy WP-2 Running an Infocom Interpreter”

  1. Impressive tinkering! I am fond of these old machines and still use one when I want to print to a parallel letter quality printer that, for whatever reason, I’ve never gotten to work over USB adapter. Instead, I send the file from a modern machine to the WP-2, then connect the WP-2 to the printer.

  2. I just happened to dig up my WP-2 today and googled for information on it and came to your site.

    I wonder if you could share technical details and perhaps also the files so that I can re-create what you have done? Thanks.

    1. I’m not sure that I can still put it all together. Most of the code still belongs to the original developer of ZXZVM.
      However, if you are interested in programming the WP-2, the service manual is available which includes quite a bit of information. An example program available is CamelForth. This will allow you to program your WP-2 in Forth. It is a good example of using the WP-2 ROM routines.
      I highly recommend using one of the floppy emulators as it makes loading programs onto the WP-2 much easier.
      You will also want to expand the memory to the maximum with a 128K SRAM chip. The IC Card expansion isn’t really required. I needed it to store saved game files as I didn’t want to have to keep it connected to the floppy emulator.

      1. Hi. Thanks for the reply. I’ve already upgraded the RAM, but have not found an expansion card, but I guess I can do without it for now.

      2. I was wondering about your disassembly, but I guess I could have a different ROM version so probably better that I do this from scratch myself.

        1. There are definitely multiple versions of the ROM code in the systems. I have two WP-2 units, and they are both different. The entry points appear to be the same on both, and are as outlined in the service manual. The service manual has a lot of information in it, and will be required for writing your own software for the WP-2.

          1. Did you check what the differences were? I’d like to make a few changes to the OS and maybe there are other fixes to be incorporated 😉

          2. I didn’t take a close look at the differences. I have posted the code that I used to dump the internal ROM, which may be of assistance to you.

  3. Thanks. I got a second machine sent over for dev work, but hit a snag. The keyboard PCB has a fault. Now I’m waiting for a few things off eBay to arrive so that I can fix it.

Comments are closed.