In this video, I receive an M20 from France, upgrade the RAM, add compactflash, design a speech synthesizer, get killed by a Troll in ZORK, and do some forth programming:
The journey that led here
I forget exactly how I first became interested in the Z8000 processor. It was probably while browsing through eBay listings, and coming across some strange CPU that I’d never heard of before. I watched a video or two, read up a few articles on the interesting history, and tried in vain to find the one noteworthy personal computer that used the Z8000, the Olivetti M20. M20s are simply not to be found in the USA. So I ended up designing my own CP/M-8000 Z8000 computer, the Clover Computer, which you can find on this site. I even found a Z8000 Trump Card, chatted with Steve Ciarcia about it, and thanks to a helpful reader, found the lost software. But the M20 remained elusive.
Eventually one popped up on eBay, from a seller in Italy who was willing to ship it to the USA. We made arrangements for it to ship via Poste Italiane, the tracking went dark for a few weeks, and then I heard from the seller that outbound customs had kicked the package back to him as an explosion hazard. Apparently they thought the 40 year old vintage computer must be full of Lithium Batteries.
While chatting with Salvatore Paxia, a fellow M20 enthusiast about my woes with the Italian shipment, he mentioned to me that he had recently helped out an M20 owner in France, a guy who needed to get some boot disks, and that the French guy was interested in selling his M20. A deal was worked out that left us both mutually pleased, and the M20 was packed up for shipment from France, this time by DHL — I wasn’t going to roll the dice on another postal service; DHL seemed to have some positive experiences. The French seller stuffed the M20 computer, monitor, disks, manuals, and even a printer into a single box with some chunks of cardboard and sent it on its way. I was a bit uneasy about such a package safely making such a long journey, but the minimalist packing saved me a good deal on shipping, and it actually made it here in one piece. After re-jumpering the power supply for 120V operation, it booted right up. A true success story.
Increasing the memory
My first task was to increase the memory. Salvatore sent me three of his RAM expansion boards, each one would add 128 KB of RAM to the M20, bringing it up to an eventual total of 512 KB. This is well less than the maximum memory supported by the Z8000 CPU, but is the limit for which the M20 computer was designed for. It’s a pity the Olivetti engineering team didn’t have a longer term vision that could have seen this computer with 2 MB or more of RAM. Anyhow, 512K is certainly enough to run any software designed for the M20.
In order to use the 128 KB RAM boards, you have to remove some ICs from the motherboard, install some jumpers, and move some other jumpers around. It’s a little bit of a daunting process, compared to what you have to do in say for example an IBM PC. I linked the appropriate page from the M20 service manual here. Yeah, it’s in Italian, but it’s relatively easy to translate.
Adding a hard drive
There was an optional hard drive for the M20. It used a bridge board installed in the computer, together with a WD-1000 style hard drive controller. These hard drives are few and far between, even more rare than the M20 computer. There is a variant of the M20 that includes an internal hard drive, and there are external hard drives. The most popular configuration of the M20 appears to be with the dual floppies.
Salvatore sent me his compactflash / IDE board, which allows you use to a compactflash card, or a 40-pin or 44-pin DOM (Disk On Module). Compatibility was a bit spotty. Some DOMs worked for me, others did not. Some Compactflash cards worked, others did not. In the end I found a compactflash card I was happy with.
Unfortunately the sector addressing scheme between the WD-1000 and compactflash is slightly different. I ran into the same problem with the Epson QX-10 when I implemented compactflash for it. Salvatore ran into the problem with the M20. He attempted to correct the sector addressing in hardware, using a CPLD device, but as of yet that’s not yet perfected. He sent me floppy images that are patched to correct the sector addressing issue.
The Alternate Processor Board
The Z-8000 CPU is, unfortunately, really not software-compatible with anything. You can’t run Z80 software on it. You certainly can’t run x86 IBM PC software on it. To increase the appeal of the computer, Olivetti introduced the Alternate Processor Board, or APB. The APB features an 8086 CPU together with a couple small ROMs to bootstrap it, and the necessary logic to share the M20’s bus with the Z-8000. While it seems like the architecture would permit switching between CPUs at will, it seems like the general process was to switch at boot time with a simple yes/no prompt on whether you wanted to use the APB. Well, Salvatore sent me a bare pcboard for one of these too!
The APB together with Olivetti’s custom MS-DOS 2.00 image, is software-compatible with MS-DOS, but is not hardware-compatible with the IBM PC. What’s the difference, you ask? Well the IBM PC includes several well-known peripherals at well-known memory addresses — everything from the video cards (CGA, MDA, etc) to the keyboard controller, to the counter-timers and interrupt controllers. As long as a piece of software strictly makes DOS system calls (or even BIOS system calls?) it’ll work. But if that software attempts to use any hardware directly, it’ll fail miserably. A lot of IBM PC software does indeed use hardware directly, because it’s more efficient to do so and yields better performance. So while an APB in theory opens up a vast amount of x86 software to the M20, you still end up hitting an unfortunate wall.
One program I was able to run was Infocom’s ZORK adventure game. It’s strictly a text game, so it loads fine. I was also able to kinda-sorta get Turbo Pascal 3.0 to work. I suspect there’s probably a decent number of programs out there one could play with, but figuring out what works and what does not is a lot of trial and error.
Once you play with the APB, you quickly realize that running DOS software is much more convenient on a DOS computer, and you’d have a much better experience on a 5150 PC, a Tandy 1000, or any of the numerous fully-PC-compatible clones. The APB is cool, but it’s more of a gimmick if you have the means to have a true PC-compatible. I shelved the APB and went back to native PCOS on the Z8000.
Serial Console
For the true vintage computer experience, you of course want to sit down at the console and type away. But, in 2023, we’re used to our modern conveniences and like to get things done a little more efficiently. It’s nice to be able to copy/paste something from a webpage into your vintage computer, to download and install software from the ‘net, or to edit source code in a modern editor like vscode.
One way to accommodate is by using a serial console on the M20. The M20 includes one serial port on the system board, and two optional serial ports on an add-in board. The on-board port on the system board is sufficient. It’s capable of supporting baud rates up to 19.200 baud. The M20’s PCOS operating system includes software for attaching any of the serial devices to the console, so you can have a remote serial console.
The M20 uses a weird nonstandard serial edge connector. The make this easier, I mounted a standard DE-9 (more commonly referred to as DB-9) connector to the header pins on the M20 motherboard. Then I can plug a standard RS232 USB dongle right into the back of the M20.
The commands necessary to enable the serial console are:
RS232
sc com:,19200,none,0,8,half,off,2048
ci 0,o,0
+scom:, +dcom:
I also ported an xmodem sender and receiver originally written by Georges Menie to PCOS. These can easily be used to transfer files (both text files and binary files) between a modern PC and the M20. The compiled xmodem binaries are present in my github repository.
ZORK in PCOS!
Every computer I own (yes 8008 I’m eventually coming after you one of these days…) needs to be able to natively play ZORK. While as I stated above, I could do this with the ABP, that’s not exactly a “native” experience. So I took my Z8KZORK port, which was originally a port of Mojozork, and ported it over to PCOS. Now I have a native Z-Machine that can play Zork-1 and Zork-3 (but not Zork-2. It’s just ever so slightly too large).
10> olizork
z8kzork based on mojozork by Ryan C. Gordon.
modifed for Olivetti PCOS by Scott M Baker, www.smbaker.com
ZORK I: The Great Underground Empire
Copyright (c) 1981, 1982, 1983 Infocom, Inc. All rights reserved.
ZORK is a registered trademark of Infocom, Inc.
Revision 88 / Serial number 840726
West of House
You are standing in an open field west of a white house, with a boarded front door.
There is a small mailbox here.
>open mailbox
Opening the small mailbox reveals a leaflet.
>take leaflet
Taken.
Forth in PCOS!
In my 8008 projects I had been playing with a forth variant called Jonesforth. I didn’t really want to write another Jonesforth variant from scratch in yet another assembly language, so I search the web and came up with Leif Bruder’s “lbforth.c”. This is a Jonesforth variant written in C. While not as performant as a native assembly implementation, it was easy to port it and compile it using Chris Groessler’s z8kgcc cross-compiler. I extended it with a few features like reading and writing IO ports, reading a source file from disk, etc.
Forth is a fun language to program in, and it’s convenient for getting relatively close to the hardware.
10> lbforth
lbforth by Leif Bruder.
Modified for olivetti M20 by Scott Baker, www.smbaker.com.
Initializing...
OK
s" brutprim.f" readfile
OK
: banner ." Brutprim: the worlds worst prime number generator. www.smbaker.com" CR ;
OK
: check 2 BEGIN 2DUP = IF DROP . EXIT THEN 2DUP MOD 0= IF 46 EMIT DROP DROP EXIT THEN 1+ AGAIN ;
OK
: brutprim banner 255 3 DO I check LOOP ;
OK
brutprim
Brutprim: the worlds worst prime number generator. www.smbaker.com
3 .5 .7 ...11 .13 ...17 .19 ...23 .....29 .31 .....37 ...41 .43 ...47 .....53 .....59 .61 .....67 ...71 .73 .....79 ...83 .....89 .......97 ...101 .103 ...107 .109 ...113 .............127 ...131 .....137 .139 .........149 .151 .....157 .....163 ...167 .....173 .....179 .181 .........191 .193 ...197 .199 ...........211 ...........223 ...227 .229 ...233 .....239 .241 .........251 ... OK
Designing a speech synthesizer
Every new computer I acquire needs to get a speech synthesizer designed for it. It’s kinda my thing. Speech synthesizers using an IC like the SP0256A-AL2 or the Votrax SC-01 are really easy to implement. You just need one port for outputting phonemes to the speech IC, and another port for polling status. I went ahead and implemented this, my first M20 card.
I designed the speech synthesizer to support either the SP0256A-AL2 or the Votrax SC-01. The SP0256A-AL2 is by far the easier to obtain and cheaper to buy chip. The SC-01 is rare and expensive. A couple of GAL devices are used for addressing. You can find the GAL source and compiled JED files in my github repo.
Hello, I tried to find the gerbers of your two boards on your github but I didn’t find then. Same for the GAL source for the speech board.
Regards.
Sorry about the delay — I’ve updated the github repo and all gerbers should be there now.