Write-up: "Spacewar 1 and the Beginnings of Video Game Aesthetics"

Maybe interesting to some, I did a write-up regarding the early history of Spacewar!. There’s even a reconstruction of the very first version, which is lost to history, in true PDP-1 assembler code, based on what we do know about this and what can be filled in based on reasonable conjecture.

The resulting program can be experienced here (in a somewhat unrelistic presentation, which provides improved access to the sense switch option in order to provide for an easy comparision of various version of the program) — with options for the early demo preselected:

4 Likes

Casually I stumbled upon this video:
“Lyle Bickley explains the PDP-1 (and we play the original Spacewar!)”

3 Likes

Nice find! From there I see a link to the work of Hrvoje Čavrak, who made a re-implementation for FPGA:

2 Likes

This is a great video, which I’ve also listed under the related links of the emulation at https://www.masswerk.at/spacewar.

There are two other videos with Lyle Bickley and the PDP-1:

2 Likes

BTW, an obscure bit of PDP-1 trivia:

According to Ed Fredkin (at the DEC PDP-1 Lecture, Boston Computer Museum, Nov. 29, 1990, see this CHM video) John Cocke drew his inspiration for the IBM RISC architecture directly from the PDP-1 (subsequently proving that such an architecture could be twice as fast as the S/360) and the PDP-1’s architecture thus somewhat lived on in the IBM 801 and the RS/6000.

Just in case, somebody would object to the PDP-1 being called a RISC architecture… :slight_smile:

2 Likes

Interesting! Here’s that lecture cued up at about the 22 min point:

3 Likes

The prehistory to this point in the video (again, according to Ed Fredkin): When Ed Fredkin founded his own firm, he didn’t only obtain a PDP-1 of his own, but Ben Gurley (the designer of the PDP-1) had also left DEC to work with Fredkin (before he was tragically shot in Nov 1963). One day, Fredkin had invited his friend John Cocke and showed him around, especially the PDP-1 and the three of them spent the night discussing and going over the architecture of the PDP-1 in depth. So John Cocke had detailed knowledge, from very first hand.

2 Likes

As one of the few (sometimes) active PDP-1 coders around, I cannot stress enough how human and versatile this instruction set is. Amazing are also the constraints: All instructions are single-word and perform in a single memory cycle, where any memory access adds another cycle to this (as does any step of indirection in this addressing, of which there may be multiple) – that’s it.

Where the PDP-1 is not purely RISC, are the instructions that are altering the internal state of the CPU registers (found in the operate group), which are microcoded and microsequenced and may be thus combined into a single operation (owing to the TX-0) and the instructions of the shift-rotate group, which are again microsequenced, thus allowing for shifts and rotates by up to 9 bit positions (the sequence simply counting up high-bits in the less significant half of the instruction word) per instruction.
(However, even Sophie Wilson allowed the ARM to have a barrel shifter.)

A major exception are the operations of the automatic hardware/multiply option (Type 10), which performs a small internal program for each of the two operations, driven by its own micro-cycle clock (effectively halting the main CPU sequence). But this was a later extension and not part of the original design, which had just multiply/divide-shift steps over the combined two internal registers (AC and IO).

Regarding the single-word instruction format, this comes with a handicap, namely a fixed size of address space, which was 4K. The PDP-1, however, could be extended to up to 16 modules of 4K each, giving 64K. Apparently, inferring from the markings of the operator console, the first production prototype that went to BBN had an addressing scheme much like seen later on the PDP-8 (field selection for separate data and instruction fields, suggesting DF/IF bank switching — according to BBN-alumni, this was never used with Ed Fredkin opting for drum memory instead, using a custom designed drum, which wrote or read the entire 4K in a single revolution, which was essential for time-sharing on the PDP-1), while the production machines featured two other modes: one for extended addressing, where the indirection-bit featured as another address bit (thus losing the ability for indirection, which lets this appear rather unattractive), or mounting and switching of (named) banks.

(A second such drum was delivered to MIT, where it facilitated MIT’s own PDP-1 time-sharing project, which became operational in early 1963. Both projects were inspired by John McCarthy.)


P.S.: As a testament to the PDP-1 it can be said that I wrote an entire video game (a Computer Space Simulator) for the PDP-1, not even once having to resort to a debugger. (My emulation doesn’t implement an UI for the console typewriter or the console lights or most of the console switches, so it was really coding in the dark, as there isn’t any facility to output text onto the screen either – for which you have to implement a renderer in software.) Doing the same a year later for the 6502 on the PET was much harder and felt like work, while the principal logic had been worked out already.

1 Like

Just curious, is there some system (single user, timesharing, or otherwise) that would allow you to do self-hosted development on the PDP-1? Of course there were several such systems back in the day, but how about today? E.g. there are several interesting looking PDP-1/X tapes, would they be of any use?

Self hosting back then ment ‘from paper tape’. Not something you could port UNIX 1 too. :slight_smile: I guessing Timesharing on the PDP 1 may have ran the 1st LISP.
Ben.

Regard running something today, the closest thing may be simh (which, of course, you already know) and its PDP-1 emulator, which gives you bare metal machine. However, last time I had a look, there was no PDP-1/X (I doubt there’s now) and no emulation of the BBN/MIT drum (it’s just two of-a-kind), Which pretty much limits the possibilities for advanced stuff.

Regarding system like software, there’s Peter Deutsch’s Lisp, the MIT time-sharing system (which basically swaps bare metal machines in and out), and, if I’m not mistaken, MITS started on a PDP-1. Then there are also FLIP (a floating point interpreter), and language compilers like Fortran. And, many of the tools, we know today, started on the PDP-1 (text-editors like ed and teco, symbolic debuggers like ddt, symblic macro assemblers, etc – there are many firsts on the PDP-1).

Something I don’t have any idea of is execAlpha and rvh, which may be also some kind of execution environment (these seem to be non-standard paper tapes).

FOCAL only arrived with the PDP-6. So, I guess, it’s FLIP for easy and accessible math and bare-bones for most other things (with the optional addition of on-line tools, like ddt, and higher language compilers.).

But I don’t know much about the software side, since my own thrills are bound to bare-bones programming (cross-compiled on a C-implementation of the “Macro” assembler), something that we aren’t to experience on a regular basis, nowadays.

P.S.: Lyle Bickley (compare above) should be an ideal address for those questions, since he was once heading DECUS – and is still helpfully minded.

1 Like

The first LISP was on an IBM.

Here are listings from MIT’s PDP-1/X timesharing systems:
http://bitsavers.org/pdf/mit/rle_pdp1/listings/

I believe Kossow has some paper tapes. Emulating the drum would probably be entirely feasible.

There is also some in the software archive, http://bitsavers.org/bits/MIT/rle_pdp1x/.
The problem being that the hardware of the PDP-1/x varied over time. There may be even conflicts (not sure about this). Still, coming up with a suitable emulator is totally possible, but probably a time consuming project.

Still, coming up with a suitable emulator is totally possible, but probably a time consuming project.

That’s where the fun is! It seems to me that for most people, retrocomputing is mostly about getting old artifacts to run again. Once you repaired the hardware, or made an emulator, or installed the software, what do you do next?

That’s why I’m glad to hear about people like you who like to actually use and write new programs for old machines.

By the way, I see more timesharing stuff here: Index of /bits/DEC/pdp1/papertapeImages/20031202

2 Likes

Reviewing the videos from the DEC lectures at the Boston Computer Museum (Nov. 1990), there’s a correction to the article to be made:

The random starfield (displayed prior to the addition of the “Expensive Planetarium”) wasn’t generated by the program, but rather used lookups into unused memory, where usually the on-line debugger “ddt” resided. (Using code as a random source for display wasn’t invented by Atari VSC/2600 games!)

(Also added a related note to update to the article.)

Which was implemented (and somewhat invented by deciding that M-expressions weren’t necessary) by Steve Russell and Dan Edwards, who later played a decisive role in the history of Spacewar!.
(So it somewhat remains “in the family”. :wink: )

*) Dan Edwards had coded the Garbage Collector (already before this)
Steve Russell also suggested the dual nature of interpreter and runtime, compare this quote by John McCarthy:

Steve Russell said, look, why don’t I program this eval … and I said to him, ho, ho, you’re confusing theory with practice, this eval is intended for reading, not for computing. But he went ahead and did it. That is, he compiled the eval in my paper into IBM 704 machine code, fixing bugs, and then advertised this as a Lisp interpreter, which it certainly was. So at that point Lisp had essentially the form that it has today …

CAR and CDR in Lisp came from the IBM 701 assembly language operations. But that was a batch system: you put in the cards with your program and later got back a printed listing of the result. The PDP-1 Lisp was the first where you typed expressions at a prompt, so it was an important step towards modern computing. I don’t know if it predates JOSS since both are from 1963.

1 Like

Other information says it was fist written for a 704.

LISP 1.5 was also available on CTSS. I don’t know if it was more interactive there.

Also compare the above McCarthy quote.
To my knowledge, the machine at MIT was a 704.