SuperPaint Lives!

In September 2005, in connection with a patent litigation, I was asked if the SuperPaint system from the mid-1970s could be recreated on a modern Windows PC based on the original source code listings and hardware schematics. The goal was simple: A faithful reproduction of the SuperPaint functionality and user experience, circa 1978. The process, however, was not so simple, see below.


The Results

Here are the results, with all functions working:

SPwins.png   SPwins1a.png
  SPwins2a.png
SuperPaint'78 on a Windows PC 


The Download

The executable SuperPaint'78 program, some original image files, and complete source code in C may be downloaded as a ZIP archive here: Download SuperPaint. To the best of my ability, this program runs correctly and safely on any Windows PC from Win98SE onward, but no guarantees are possible. Usage is at your own risk.

Download to a new folder, unzip, and double-click SP.exe. The program can be run in 4 different modes corresponding to the original hardware setup with 1 or 2 monitors and Menu and Canvas overlaid or separate, respectively. The "GetPic" mode just allows recall and display of both 4- and 8-bit pictures such as "blackgirl" and "itworks" (the very first picture ever displayed on the system).

I will perhaps produce a proper manual some day, but the various functions are briefly listed in these slides. Most functions are self-explanatory, and more details can be found in the Datamation and IEEE Annals articles. Any and all feedback on the program is welcome to rgshoup at rgshoup.com.


The Process

The conversion process was not easy. The source code was only available as printed listings, and the program was written in a variant of BCPL used only at Xerox PARC in the 1970s. It took me several weeks of drudgery, but the results are worth it.

1. Source listings : scan and OCR -> raw BCPL
Only the printed listings were available (though we still hope to retrieve the source files and picture files from the original system some day). These were scanned and converted via optical character recognition -- with a great many errors.
2. Raw BCPL : hand correct -> BCPL
I went over every file, every line (only about 5000), and hand-corrected using a text editor. The result was a recreation of the original text files as they existed in 1978 PARC BCPL.
3. BCPL : run bcpl2c.pl -> raw C
I wrote a few pages of PERL script (regular expressions, etc) to convert most of the syntax of BCPL to C, as they are quite similar. Note however that this was Jim Curry's version of BCPL used at Xerox PARC in the 1970s, and has quite a few differences from the original BCPL created (and still maintained today) by Martin Richards at Cambridge.
4. Raw C : hand correct translation -> C
After the crude lexical translation in PERL, many corrections were necessary to the C code. The code looks awful, and is full of strange constructs due to its origin, but I wanted the closest possible translation from BCPL.
5. C : compile, fix syntax, pointers, etc -> compiled C
As I compiled the translated C, a large number of changes had to be made manually to account for language differences, especially strong typing and treatment of pointers.
6. Compiled C: integrate, link, run, debug, etc, etc -> SP
I had to write and integrate a) a SuperPaint frame buffer and hardware emulator including the Nova assembly code interface, b) a simulation of the Nova DOS I/O system including disk and character I/O, c) a small floating point library, and d) a Windows class and routines to control and execute all of this. I was helped greatly in the latter task by studying a recreation of Alvy Ray Smith's Paint3 program done by Jack and Marion Newlevant.
7. SuperPaint program in Windows environment
Eventually, all this coalesced into a working SuperPaint program, running just as it did in 1978. I judiciously avoided all temptations to "improve" the program or to change any features. Some original bugs were left as is. Various delays were inserted to approximate the speed and feel of the original system.


Alvy Ray Smith's Paint3 program from the late 1970s has also been revived running on a Windows PC (again in connection with a patent litigation). I never thought I'd see this!:


SuperPaint and Paint3 

Alvy's and my paint programs from the late '70s running simultaneously on a PC.


Entire site © Copyright 2000-5, Richard Shoup (rgshoup at rgshoup.com), all rights reserved.