PiDP-1


The PDP-1 was the first computer made by DEC - Digital Equipment Corporation, based on MIT's TX-0 and TX-2 experimental computers. Its history is told very well on Wikipedia. A team at the CHM has restored one PDP-1 to working order; and Angelo Papenhoff has written exact simulators in both Verilog and C - including the Type 30 display. Our replica is based on this simulator.
Three years ago, we started work on a replica, to complete the PiDP series (-8, -10, -11). Little did we know that this adorable dinosaur would become our favourite of the whole range. The PDP-1 is a truly fun machine to work and play with - and so, this text turned out a bit less formal than the other machines' pages.

PiDP-1 Rack version
PiDP-1 Rack version
PiDP-1 Console image
PiDP-1 Console version


The PDP-1 was a first in many respects. But it is also simple enough to be quickly understandable to any 21st century computer user. It remains the original Hacker's machine. - the word comes from the hacker community forming around the PDP-1 at MIT; their demo programs are still attractive eye candy thanks to the Type 30 display. Which was a converted radar display.
Driving the electron beam over its phosphor, you can get very pretty graphics effects from only a little bit of simple programming. But serious programs were also written, despite the minimal resources of the machine it spawned the first-ever text editors, a sensational Lisp, and FORTRAN. Even the first interactive multi-user system software. Much of this has been preserved and brought to run again.

Exactly because of its simplicity, this is the machine we'd really want to learn assembly language on. Before you laugh, let us give an overview of the machine from three different perspectives. Forgive us for such frivolity with a historical machine.

Three Ways To See The One

PDP-1 Spacewar

The first games console

Is it a stretch to call a $100,000 computer from 1959 a games console? No. It is where the computer video game was invented: Spacewar! And it is where games controllers were first introduced. Games are still being written for the machine - hackers still exist :-)

PDP-1 Democoding

The original democoder machine

The PDP-1 was tiny enough so that it could not do too many things. Elegant, mean and lean graphics demos were thus a natural application for it. And that's not a trivial thing; a lot of graphics algorithms were invented here. And the notion of interactive graphics.

PDP-1 at Lawrence Livermore

A huge milestone in computer history

Many ideas were born on the One: text editor, interactive debugger, the REPL idea now famous from Python. And timesharing: it's the first-ever multi-user system. And a PDP-1 was Arpanet's real-time monitor, pushing the first-ever online software updates, to routers in the field.

So we'd like to look at the machine in these three ways, violating historical correctness but focusing on why we love the One. Of all the pre-home computer systems we played with over the years, this is the most fun. Look at it as the first games console, then as the first democoder platform, and then read about the Serious Work that was done on this historical computer. It deserves to live on in the 21st century as the 'original retrogaming/democoding computer'. Just a few dozen lines of surprisingly friendly assembly give pretty cool graphics on the radar tube, and we want to show you!
Historical versions of the PDP-1

The One comes in many forms


DEC had trouble making up its mind on the appearance of the PDP-1.

It made a few table-top 'console panels', but then decided to mount the panel on the side of the rack. And they frequently alternated between white and blue front panels.

Who, then, are we to make such important choices for the replica? We chickened out: the replicas come with interchangeable white and blue front panels.

Also, we decided to build both the racked and a console variants, thus leaving the hardest decision to you. There is a way out, though: if you opt for the rack, it comes with a spare console case as well. You can transplant the PCBs at any time, and continue the heritage of indecision. If DEC itself could not make up its mind, it is probably important to remain undecided... :-)

Historical significance

The PDP-1, introduced by Digital Equipment Corporation in 1960, marked a turning point in computing. It was the first commercial computer designed for interactive use rather than batch processing, enabling real-time programming, debugging, and display output. The PDP-1 was the platform for several historic software “firsts”: Spacewar! (1962), one of the earliest digital video games; early text editors; interactive debuggers; and pioneering time-sharing experiments at MIT.

Its low cost (only $120,000 in 1960) and accessibility brought computing out of the exclusive realm of mainframes and into research labs and universities. Hacker culture emerged, and the first notion of personal computing. By demonstrating that computers could be used for creativity, interactivity, and individual exploration, the PDP-1 shaped the trajectory of modern computing far beyond its modest production run of ~54 units.

Interesting software

Studying historical computers is fun. It becomes much more so if A) it is fun to program for the machine (check!), B) it is not too hard and C) there is some good software to play with.
In terms of good software, the PDP-1 is going as far back as you can go in history with saying 'check' to point C. An amazingly broad range of software has been preserved, both as source code to read (which is easy with only the 27 instructions to know) and as runnable binaries to play with. They fall into roughly three categories:
  • Graphics demos
  • Games
  • Programs
In terms of democoding, that tradition starts with the PDP-1. People were not quite sure what to do with a computer plus display, so lots of early demos were written as exercises. Driving the electron beam of a slow-phosphor radar tube is still a nice change from pushing pixels in bitmap memory. We'll just show you some to close this section.

PDP-1 Minskytron Minskytron
PDP-1 Snowflake Snowflake
PiDP-1 PDP-1 Munching Squares Munching Squares
PDP-1 Mapes Graphical Fun Mapes' Graphical Fun

For games, everyone knows about spacewar as the first-ever computer video game. It is still very playable. The physics of gravity, thrusters to drive you closer to your opponent whilst not getting sucked into the sun: the game dynamics are still good.
In terms of modern games programming, we mention Pong. The real Pong from Al Alcorn came about because he knew spacewar, as he says. But Pong is a later invention, and actually is all electronics, no computer. So the backport of Pong to a computer that could have run it 10 years earlier is a delicious retrogaming example. There are more games - a dual-display version of spacewar is the first ever multiplayer FPS, in fact.

PDP-1 spacewar

PDP-1 pong

PDP-1 lunar lander

For user programs, a neat toolchain has been preserved of text editor (ET), macro assembler (MACRO) and debugger (DDT, actually the first debugger ever). In terms of programming simplicity, look at this program - 8 assembly instructions is all that it take to draw a circle on the Type 30 tube. We have a dedicated page to go into a
hands-on PDP-1 programming session here (link).
But equally, you can program in Lisp or FORTRAN - the stories of how these compilers were written is a story in and of itself. Lisp was ported by a genius high school kid, Peter Deutsch. Who invented the REPL of Python fame along the way. You can also use newly written comfortable cross-assemblers and even C!

go,         lac x
lup,        cma
		sar 4s
		add y, dac y, lio y
		sar 4s
		add x, dac x
		dpy
		jmp lup
						
    We throw in an image of the PDP-1 Blinkenlights - it's operating the front panel that makes coding the PDP-1 fun.

Hardware design

The PDP-1 used a simple 18-bit word architecture with a single accumulator and core memory, lacking all the complexity of modern CPUs. Programs normally ran directly on the hardware without an operating system, giving full control but demanding expertise. Its fast I/O channels and vector CRT display enabled real-time interaction, unlike the batch mainframes of the era.

The extreme simplicity made the computer extremely 'hackable'. The diagram gives an overview of all there is in the system:

  • 4K words of 18-bit memory - although upgradable with paged memory to 64K

  • A CPU visible to the programmer as just an accumulator AC, an IO register (able to send and receive 18 bits to the outside world), and of course a Program Counter PC.
    The fascinating thing is, of course, to see that nothing more is actually needed to make a fully functional computer.

  • Three peripherals:
    • A typewriter for keyboard input and printed output
    • A paper tape reader to read data into the machine,
    • And a paper tape punch to store data.
PDP-1 Block Diagram
More devices could be added, but generally were not. Truly useful was a rotating drum storage, that had the ability to swap whole 4K pages in & out in the time of only a single instruction. That, and an interface to add multiple typewriters, led to the first-ever interactive multi-user systems.

Amusingly, the PDP-1's most influential peripheral is not shown in the diagram: the Type 30 graphics display, which even at the time was considered the feature that gave the machine its character. Built from a converted radar tube, it took bits straight out of the IO register as X/Y coordinates. A simpler graphics subsystem could not be imagined. Still, the PDP-1 could plot 20K dots per second. The downside being, they had to be replotted a few times per second as there was no bitmap memory: the electron beam briefly lit up the phosphor, and even with a slow-phosphor radar tube the dot would fade quickly if not redrawn quickly.

PDP-1 Instruction Encoding
The instruction set was equally minimalistic - but very clever in eking out the maximum of features from what was possible with just 2700 transistors (even a 6502 had 3500 - an 8086 took 26000). In the 18-bit accumulator, 5 bits encoded the instruction number, 1 bit was used to indicate indirect addressing, and the remaining 12 bits could hold a memory address to be used by the instruction.
Of course, if an instruction has to be encoded in 5 bits, you can't have more than 32 different instructions. In fact, the PDP-1 kept it to 27. But some instructions that did not need to encode a memory address were like Swiss Army knives - their 12 free bits could trigger flip-flops in the machine to drive many special actions. Clear the AC, clear the IO, each of these things only needs one bit - and can thus be packed togethre in one Swiss Army knive instruction.

Still, 27 instructions can be condensed on a small cheat sheet and are easily remembered with just that at hand. It made assembly-language programming very, very easy to start with. But the price for that of course was that you needed to be truly ingenious to craft a more complex program within those confines. Even then - with only 27 instructions to know, the 'poetry' of PDP-1 code is very easy to read for anyone with basic computer knowledge today. That is part of the joy of studying the PDP-1: its programs are easy-to-understand logic poems'. We did apologise for the informal tone of this page, right?

Official PDP-1 Instruction Reference Card     That's the entire computer! You need to know no more than this to read assembly code.


Why not try it out? Experience the PDP-1 on your laptop or Raspberry Pi

Of course, we hope we have whetted your appetite for a PDP-1 test drive. You can install and run a virtual PDP-1 on your Linux laptop or a Raspberry Pi from our github (link). No further hardware required, although if you want you can use our hardware replica with the exact same software.

PDP-1 simulator on Ubuntu Linux

Tweets

Photos


Web-Stat traffic analysis