Mini replica of DEC PDP-11 computer runs 2.11 BSD UNIX on ESP32 SoC

The relatively popular Digital Equipment Corporation (DEC) PDP-11 16-bit minicomputers started selling in the 70s, and were still available in the earlier 90s. While being stuck in Europe due to COVID-19 restrictions, Jeroen Domburg (aka Sprite_tm) decided to design a tiny replica of a DEC VT102 PDP-11 terminal based on ESP32 wireless SoC and running 2.11 BSD UNIX through SimH PDP11 emulator.

ESP32 PDP-11 mini replica

Jeroen had to do significant work to make SimH works on ESP32 however, with notably the need to optimize the memory footprint:

Obviously, ‘just port SIMH to an ESP32’ is a bit of a understatement for the effort that was needed. Even while SIMH is a pretty nice program when it comes to not using any unique APIs, it still is a system developed for a full-blown workstation and assumes RAM is cheap and plentiful. In order to get it running on an ESP32 and still have some memory left we can use as RAM for the emulated machine, I needed to strip it down first.

He has to significantly strip the network stack and the configuration parser in order for the emulator to fit into ESP32 memory and flash storage, and also removed non-necessary peripherals including tape drives, vector monitors, punch card readers, etc… This allowed ESP32 to emulate a PDP11-23 clone (Russian made ELEKTRONIKA 60M) and run Tetris on a ESP-WROVER32-Kit with display.

ESP32 Tetris SimH emulator

Tetris was only using a few tenths of KB of RAM, while the ESP32 was also equipped with 4MB PSRAM adding to the internal RAM, so Jeroen decided to port 2.11 BSD UNIX with a full TCP/IP networking stack to the chip. The latter required the use of ESP-NETIF from the ESP-IDF tying together network interfaces and higher-level code like TCP/IP stacks.

Finally, a case had to be designed, and the final results looks cute enough, and more important appears to work just fine.

You’ll find more details about the full development process on blog, as well as all resources to build your own on Github.

Share this:
FacebookTwitterHacker NewsSlashdotRedditLinkedInPinterestFlipboardMeWeLineEmailShare

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK 5 ITX RK3588 mini-ITX motherboard

7 Replies to “Mini replica of DEC PDP-11 computer runs 2.11 BSD UNIX on ESP32 SoC”

  1. This is excellent! That’s something I also considered doing on spare time after seeing that ESP32 have way more resources than needed to run BSD2.11, but didn’t know how I could make it run as an application of the existing SDK to benefit from the network interconnection. In addition one of the features I’d be very interested in would be to have a native editor and C compiler on board, but while that was easily doable at the time of these BSD, I’m not sure what the amount of effort is to port the tensilica LX7 instruction set to an old non-portable compiler (and no, there’s no way any version of gcc would run on such hardware). My aim was really to have totally autonomous machines running a fully interactive and networked operating system, and I’m sure most ESP32 devices have this capability.

  2. I’m also curious to know how he dealt with interrupts and any bottom-up events in general. I mean, either the code runs in a loop and that’s not easy, or it runs out of a loop and then I’m wondering how the WiFi doesn’t disconnect. That was one of the dilemma I faced when thinking about the model.

  3. I think at my first year at university, I worked on a PDP-11. Or was it a VAX/VMS? Can’t remember. But greenscreens, shared computer, certain amount of runs we were allowed to do. I believe we ran PSPICE

  4. There is a 2.11 BSD running natively on mips from microchip retroBSD and liteBSD. Wondering which porting effort was higher, to the bare metal MCU or the sim?

    1. For having had a look at that, I figured that bare metal is the hardest. For example there’s no version of the native C compiler on the PIC32, so while it works for certain things, it’s not as complete a solution.

Leave a Reply

Your email address will not be published. Required fields are marked *

Khadas VIM4 SBC
Khadas VIM4 SBC