Turning A Pi Into A PDP

There’s no better way to learn how to program a computer than assembly, and there’s no better way to do assembly than with a bunch of blinkenlights and switches. Therefore, the best way to learn programming is with a PDP-11. It’s a shame these machines are locked up in museums and the garages of very cool people, but you can build your own PDP-11 with a Raspberry Pi and just a few extra components.

[jonatron] built his own simulated version of the PDP-11 with a lot of LEDs, a ton of switches, and a few 16-bit serial to parallel ICs. Of course the coolest part of any blinkenlight simulator are the front panel graphics, and here [jonatron] didn’t skimp. He put those switches and LEDs on a piece of laser cut acrylic with a handsome PDP11 decal. The software comes with a load of compiler warnings and doesn’t run anything except for very simple machine code programs. That’s really all you can do with a bunch of toggle switches and lights, though.

If this project looks familiar, your memory does not deceive you. The PiDP-8/I was an entry in this year’s Hackaday Prize and ended up being one of the top projects in the Best Product category. We ran into [Oscar], the creator of the PiDP-8, a few times this year. The most recent was at the Hackaday SuperConferece where he gave a talk. He’s currently working on a replica of the king of PDPs, the PDP-11/70.

Video below.

28 thoughts on “Turning A Pi Into A PDP

  1. A group of toggle switches, some LEDs. Add some 7-segment displays and / or a 16×2 LCD and market it as an IO interface board.
    Every CPU or FPGA design could interface with it. Provided there was agreement on the interface format, of course.

    1. The world needs more open standards open to change and compatibility.
      As developers we need tools and parts that work for us.. not us for it.
      As a network admin of a overloaded server and network… pls someone figure out a way to automatically keep wireless networks running over December without some poor schmuck having to admin the network till 5 in the morning only to start again 6 next morning.

      SOMEONE PLEASE HELP

      1. Tell your employer to hire more network admins or you will take your valuable experience somewhere else.Only work your contracted hours and take your lunch hour.Employers do not appreciate work done for free.

          1. /Incompetent/ bosses shouldn’t profit from the work of far more competent engineers and scientists. I don’t think that’s controversial. Upper management won’t see it until employees start leaving. You will just get burned out and fired and feel like it was your fault.
            If you have a boss expecting you to do shit like this, there’s something wrong. Losing sleep over this perpetually means there aren’t enough people or you need to be able to spend on better equipment. Not drive every last cent out of you as a human.
            Programmers and admins need a union or profession, at least to fight megacorps being shitty. A salary shouldn’t mean they *own* you, even if in an ideal world you should try to be on a wage to prevent such abuse.

            And btw this is nothing new. Basic 1920s shit. You have to maintain pressure when you’re dealing with corporate cost minimization.

          2. I have to agree, 51 yrs old with about half of that working in Industry. You need to balance work and free time or die early.

            Two major projects I worked on (and my ass off while on) collapsed within months of my departure. One is now a $26M lawsuit.

            I still haven’t figured out exactly when an MBA degree required either a pact with Satan or a Frontal Lobotomy as a prerequisite for graduation, but it seems to be the case nowadays…

      2. The Tech work environments are now inherently hostile to individuals, and anyone who says they have your interests in mind is selling you something. “Burn and Churn” is a popular policy with larger organizations that hire naïve students right out of university, hold them to a 70+hr work week, and burn them out within 2 years. When interviewing with employees, I quietly laugh when kids tell me they want to work at Facebook, EA, Microsoft, Google, IBM, and Disney.

        Fundamentally, people’s rational self interest is exploited to drive them into a form of indentured servitude. Anyone who thinks they are going to pay off a student loan competing with people who’ll currently work for $8.50/hr is delusional. I am thankful to be nearing retirement, and don’t have to compete in this kind of workforce.

        The whole STEM education initiative was intended to increase a population of low-skill technology workers. Accordingly, the corporate HR strategy is to increase competition for lower quality positions, and drive down labour costs for jobs unable to be outsourced. The division of these skilled workers means unionisation is improbable, as people turn on each other to compete for minor concessions. As near as I can figure, these “savvy” workers must like their BS flavoured sandwich, and are kept way too busy to look for better jobs.

        https://www.youtube.com/watch?v=wvVPdyYeaQU

      3. I helped write about 22 in-depth documents, which described how all the servers (Unix and Windows) were to be configured before being attached to the network. Each server had to pass an inspection which checked exactly on those things it demanded, and made sure some parts were disabled (USB, etc). This was in a TS security environment. I felt that the task was kind of stupid, because once you document everything, then they can hire an operator to do it.

        That’s what they did. After a year of setting-up everything, they laid me off and hired a kid off the street. But, hell, I don’t stay around those places longer than 2-years anyway. It’s like the blind leading the blind.

        I’ll give people a hint – old age comes fast. Get in, get the most money, and get out. Repeat. Life is short! Now all I worry about is where to gamble all the money in the stock market, as I sit in my pajamas and drink beer.

    2. I have the standard that should be used. Simple cheap I2C io expansion chips. the whole dang thing can easily be ran by the common MCP23XXX i2c IO expander chips to read switches and light led’s.

      That way you can have anything you want become the emulator.

  2. “… and there’s no better way to do assembly than with a bunch of blinkenlights and switches.”

    This is not assembly programming it is binary coding and it is tedious and boring. Best way to discourage new comers.

    1. I think it was called machine code, typing in all those opcodes by hand. Assembly language was the high-level, easy-chair of programming back then, because a compiler did all the work for you.

      Doing it with switches probably taught you to be very economical with your assembly language and to get it right the first time. It would be a good if painful way to learn PDP-8 assembler.

      1. A few nits:

        Assembler code was translated to machine code using an ‘assembler’ and associated tools like linkers, loaders, and macro processors.

        The PDP-8 had a very, very small instruction set, and it’s considered one of the cleanest instruction sets to learn machine/assembler code on.

        Using switches to load a bootstrap program on a system like a PDP-8/11 is painful enough to teach young programmers to be careful. ;^)

    1. Well, he has a point. If you just want to repurpose or copy/paste a bunch of high level scripts together it’s probably not going to be helpful but if you want to think about what’s happening at a bare-metal level of the CPU vs. Clock and register level, then machine language coding will get you there. A small 8-bit or 12-bit processor is going to be manageable and who knows, it might just provide a different POV when tackling a coding problem in today’s, high-level world of programming.

    2. This a early 70s instruction set. Back then almost everything was written in machine language (assembly) directly, so the instruction set was designed to be relatively easy to code in, at the expense of processor complexity and inefficiency.

      1. >Back then almost everything was written in machine language (assembly) directly

        I’ve seen this sort of misinformation in a lot of places – where do people get it from? There were assemblers and compilers long before that. There were even interpreters in the early 1950s (and possibly before that, at least theoretically).

        1. I never said there weren’t compiled languages. There were some big ones already, namely Algol, Fortran, and Lisp. But these were used at the time for scientific computing, artificial intelligence, simulation; state of the art stuff. Ordinary systems programming was largely in machine language, until C took hold. This is the machine C and Unix proliferated from. And, in the beginning, the compiler, kernel, and other system utilities were mostly in machine language.

    3. Yup, utter and complete rubbish. Someone got confused, having the Raspberry Pi Foundation’s stated goals back in memory and thinks it applies to this project. Nonsense. The Pi here is just a practical and cheap way to connect the SIMH emulator to the pretty (if you’re into blinkenlights aesthetics) front panel.

      Entering machine code via front panel toggle switches is to computing today as relevant as the hand-crank to motoring. Can’t believe that some people here made me feel that there is a need to state this.

      1. The best PDP-11 I ever programmed, was a PDP-11/73. It was in a back room, and all the terminals were in a nice quiet room across the floor. No fan noise. The best part, it ran BSD 2.9 Unix, and while we only had UUCP dialup, we had ethernet thicknet where we could write networking code and test it in the real world. A few years later the Internet happened, and the PDP-11/73 was loaded on a truck and sold for scrap. If anyone played with the front panel, they were probably from the mental retardation research facility in the basement, where they kept all the electrical probes and such…

      2. You might read the article this post points to before slamming it based on your own inflated opinions. This in no way uses SIMH. This runs the author’s emulator written in C. From the article:

        Quote:”I assume you’ve written an slightly-working and badly written PDP-11 emulator that uses wiringpi. It’s probably the first and only C project I’ve done, so it’s not a fine example of my programming.

        If not, download mine here: https://github.com/jonatron/pdp-11/tree/master/newsrc

  3. The PDP-11/70 was the king of the ’11s, at least until the larger ones fit on one chip. Some of the final single-chip systems overtook the PDP-11/70 in performance and capability. The overall PDP king was probably the 36 bit PDP-10 and its descendants.

    1. I’ll second that. I lived and worked nearly next door to the DEC plant here. Give me a PDP-11, a VT100 and a couple of ASR-33s or a DEC Writer and I’d be quite happy. I’d run RSTS/E, probably the nicest OS ever.
      Fetch my pipe and slippers, why don’tcha.

  4. I remember my final project for a class using the PDP-8. Given that the PDP8 had ram that spanned the entire address space, can you write a program that clears all of memory, including itself? The program does not need to halt.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.