The PDP-11 was a series of 16-bit minicomputers sold by Digital Equipment Corporation (DEC) from around 1970 until the 1990s.
According to Wikipedia, the PDP-11 offered a number of uniquely innovative features and was easier to program than its predecessors due to the inclusion of additional general-purpose registers. Perhaps most importantly, the very first officially named version of Unix ran on the PDP-11/20 in 1970.
Recently, an engineer named Dave Cheney kicked off a project to simulate the PDP-11 using a board powered by Atmel’s versatile ATmega2560 microcontroller (MCU) and a custom-built SPI SRAM shield. Combined, the two components form a platform aptly dubbed “AVR11.”
“Today the simulator boots V6 Unix and can execute some simple commands. [Yes], there are some remaining bugs in the mmu which cause the simulator to fail when larger programs (/usr/bin/cc and /usr/games/chess for example) are executed,” Cheney explained in a blog post describing the project.
“The hardware emulated is somewhere between a PDP11/40 and PDP11/45. The EIS option (MUL and DIV) is properly emulated, but FIS (floating point is not). Only a single RK05 drive is simulated, backed by a file on the micro SD card.”
Cheney says he ultimately plans on improving the accuracy of the simulator so it can run V7 Unix, 2.9/2.11 BSD, RSX-11M and even the original DEC diagnostics. In terms of speed, Cheney confirms the simulator is approximately 10x slower the an original 11/40.
“I was never expecting to be amazed with the speed of this simulator, especially at this early stage. However, on a performance per watt basis, I think it’s hard to beat AVR11. The PDP-11 that this simulator models is spartan, even by the standards of the early 70s, yet still consumed over 2 kilowatts of power for the CPU and memory (256kb),” he continued.
“The 2.5 megabyte RK05 boot drive was another 600 watts. Real Unix installations would have three or more drives, so there goes another 1200-1800 watts. Compared to that, the AVR11 draws well under the 500ma limit of a USB port. Although I lack equipment to measure the current draw I estimate it to be around 100ma at 5 volts which is 0.5 watts.”
Interested in learning more about simulating a PDP-11 with an Atmel MCU? You can check out Dave Cheney’s project page here or download the relevant code from GitHub.