Wiznet makers

lawrence

Published August 18, 2026 ©

173 UCC

9 WCC

33 VAR

0 Contests

0 Followers

0 Following

Original Link

the kek PDP-11/70 Emulator

The PDP-11/70 is a 16-bit minicomputer built by DEC (Digital Equipment Corporation) in the 1970s. It is the hardware on which UNIX was first developed and the e

COMPONENTS
PROJECT DESCRIPTION

Fifty-Year-Old UNIX Joins a Modern LAN Through the W5500 — the kek PDP-11/70 Emulator

What Is a PDP-11/70, and Why Run It Today?

The PDP-11/70 is a 16-bit minicomputer built by DEC (Digital Equipment Corporation) in the 1970s. It is the stage on which UNIX matured after being rewritten in C — and the environment where the C language itself was born. Every Unix-like OS in use today traces its lineage back to this machine. A single unit once cost tens of thousands of dollars and weighed hundreds of kilograms. Half a century later, it lives again on a palm-sized board carrying an ESP32 and a W5500.

The emulator kek is not just a retro-computing curiosity. What sets it apart from other emulators is that the emulated PDP-11 connects to a real Ethernet network. The DEQNA — the Ethernet adapter fitted to PDP-11s in the 1970s and 80s — is reproduced in software, and the raw Ethernet frames it emits are carried straight onto the physical wire by the W5500.

The result: you can Telnet from a modern PC directly into UNIX v7 or BSD 2.11 booted on the emulator. A fifty-year-old operating system, joining today's LAN through a W5500.


WIZnet Product Used — Raw MAC Frame Access

ProductLibraryAccess ModeRole
W5500folkertvanheusden/W5500MacRaw (Git submodule)Raw Ethernet frame TX/RXPhysical layer for the emulated DEQNA Ethernet card

W5500MacRaw is a library the author, Folkert van Heusden, forked directly from WIZnet's ioLibrary Driver. Instead of a conventional TCP/UDP socket API, it accesses the W5500 at the raw Ethernet frame level. The fork also adds runtime-configurable SPI pins to support the Waveshare ESP32-S3-ETH board.

Because the W5500 handles the Ethernet MAC/PHY layer entirely in hardware, the ESP32 CPU stays focused on its real job: emulating PDP-11 instructions.


Why the W5500 — DEQNA Emulation Demands Raw Frames

The PDP-11's Ethernet card, the DEQNA (DEC QBUS Network Adapter), embodies a different philosophy from a modern NIC. The operating system assembles arbitrary Ethernet frames itself and pushes them to the card; the card simply puts them on the wire. Upper-layer protocols — DECnet, LAT, IP — all live inside the OS, not the hardware. Emulating this faithfully requires raw MAC-layer (L2) access, which a library that only exposes TCP/UDP sockets (L4) cannot provide.

FactorStandard TCP socket libraryW5500 raw MAC (W5500MacRaw)
Access layerTCP/UDP socket (L4)Raw Ethernet frame (L2)
DEQNA emulationNot possible — arbitrary EtherTypes blockedPossible — arbitrary frame assembly and delivery
Non-IP protocols (DECnet, etc.)Not supportedSupported
ESP32 CPU loadSoftware stack requiredHandled in W5500 hardware
Waveshare board supportRuntime-configurable SPI pins (author-modified)

This raw MAC access is precisely what allows fifty-year-old UNIX to reach a modern Ethernet.


System Architecture — Where Emulation Meets Physical Hardware

(Diagram: emulated kernel → DEQNA emulation → W5500 → physical LAN)


Core Capabilities — a 1970s OS on a Modern Network

CapabilityDetailSignificance
Supported OSesUNIX v7, BSD 2.11Boot and use historic Unix systems for real
DEQNA Ethernet emulationRaw MAC frames → W5500The emulated OS joins a real physical network
DZ-11 Telnet multiuserTCP ports 1101–1104Log into UNIX v7 from a modern terminal
Disk imagesRK05 / RL02 / RP06 / TM11 tapePDP-11-era disk and tape formats
NBD remote diskNetwork Block DeviceMount disk images from a network server
Built-in debuggerInstruction, memory, register breakpointsInspect emulation state in real time
Supported platformsESP32, Teensy 4.1, PICO2W, Linux, macOS, WindowsOne emulator from desktop down to MCU

Among these, the DEQNA emulation + W5500 raw MAC combination is the decisive differentiator. Most retro emulators either leave networking outside the emulation boundary or detour through the host OS's TAP interface. kek connects to physical Ethernet through the W5500 and lets the emulated OS run its own network stack, end to end.


Hardware Configuration

ComponentInterfacePinsRole
ESP32-S3PDP-11/70 CPU, MMU, and bus emulation
W5500 (integrated on the Waveshare board)SPIPer board spec (not listed in README)DEQNA raw Ethernet frame TX/RX
SD cardSPIMISO=19, MOSI=23, SCK=18, SS=5Disk image storage (.dsk files)
MAX232 / UARTUARTTX=17, RX=16External serial terminal
Heartbeat LEDGPIO25Emulator status indicator

Recommended board: Waveshare ESP32-S3-ETH — the README says so directly: "If possible, use a waveshare-esp32-s3-eth: that device can do Ethernet for the emulated system over its Ethernet port."

Build environment: PlatformIO (cd ESP32 && pio run -t upload && pio run -t uploadfs)

Desktop build requirements: libncursesw5-dev, cmake, build-essential, pkg-config, libjansson-dev (required); libsdl3-dev, libsdl3-ttf-dev (optional — ImGui graphics output)

Recommended memory: at least 2 MB PSRAM (ESP32 variants)


Communication Architecture — Three Layers Across the Emulation Boundary

SegmentProtocolNotes
DEQNA ↔ W5500Raw Ethernet frames (L2)Via eth_transport_esp32.cpp; arbitrary EtherTypes supported
DZ-11 ↔ clientsTelnet (TCP 1101–1104)One port = one virtual serial terminal; up to 4
Disk backendLocal file / NBDDisk images on SD card or a remote server
Networking inside the emulated OSstartnet (UNIX internal command)The OS configures its own networking

Because access happens at L2, every upper-layer protocol (DECnet, IP, and so on) is handled entirely by the emulated UNIX. The kek emulator itself is protocol-agnostic — it simply shuttles frames to and from the W5500.


Implementation & Design Notes

kek drives the CPU, bus, disks, network, and serial devices from a single emulation loop. Each device lives in its own module (deqna.cpp, dz11.cpp, dc11.cpp, etc.), so accuracy improvements stay localized to one file.

Data flow (Ethernet path):

UNIX v7 / BSD 2.11 (emulated kernel)
 → DEQNA driver (code inside the emulated OS)
 → kek DEQNA emulation (deqna.cpp) — assembles the raw frame
 → eth_transport_esp32.cpp — calls W5500MacRaw
 → W5500 (SPI) — transmits the physical Ethernet frame
 → Real LAN

Built-in debugger:

FeatureDetail
Instruction breakpointHalt on a specific PDP-11 instruction
Memory breakpointHalt on read/write of a specific address
Register breakpointHalt when a register meets a condition
Compound conditionsAND / OR combinations

Output interfaces: ImGui (graphics), ncurses (terminal), and the POSIX console.

W5500MacRaw customizations: compared with the original WIZnet ioLibrary Driver — ① runtime-configurable SPI pins, ② variable-name conflict fixes — both made specifically to support the Waveshare ESP32-S3-ETH board.


Project Value & Broader Applications

The core pattern here is "W5500 raw MAC + MCU emulator → legacy network hardware bridged onto modern Ethernet." It is a reusable structure for any system that must handle arbitrary L2 frames without being bound to TCP/IP — a bridge between old equipment and new infrastructure.

  • Industrial legacy protocol bridges: Connect RS-232 or HDLC-era equipment to a modern LAN via W5500 raw Ethernet
  • Protocol analysis and test tools: L2 test gear that generates and captures frames with arbitrary EtherTypes
  • Educational networking platforms: Students implement a TCP/IP stack from scratch and validate it against real traffic through the W5500
  • Historical network protocol research: Reproduce non-IP protocols such as DECnet or XNS on modern hardware

The W5500MacRaw library is independently reusable, and the fact that its author actively maintains it for Waveshare board support bodes well for long-term viability.


Q&A

Q1. Why does a PDP-11/70 emulator need real Ethernet at all?

Typical emulators route networking through the host OS via a TAP interface or SLIP. kek emulates the PDP-11's DEQNA Ethernet card itself, so the emulated OS runs its own network stack from within. That is why UNIX v7 genuinely processes IP packets — and why an external PC can Telnet straight into the emulated system.

Q2. Why W5500 raw MAC access instead of a standard TCP library?

The DEQNA is a card to which the OS hands fully formed Ethernet frames with any EtherType — including non-IP protocols like DECnet and LAT. That requires L2 (MAC frame) access rather than L4 (TCP/UDP) sockets, and the W5500MacRaw library provides exactly that.

Q3. Is the Waveshare ESP32-S3-ETH board mandatory?

The README recommends it but does not require it. Since W5500MacRaw supports runtime-configurable SPI pins, any ESP32 board with a W5500 attached should build. The Waveshare board is simply the easiest path, with Ethernet built in.

Q4. Can operating systems other than UNIX v7 and BSD 2.11 run on kek?

The README names UNIX v7 and BSD 2.11. Other OSes that ran on real PDP-11/70 hardware (RT-11, RSX-11, etc.) may work in theory, but kek's support for them is not stated in the README.

Q5. Is Ethernet available on the Teensy 4.1 and PICO2W builds?

The W5500 submodule exists only under the ESP32/ directory, so the Teensy 4.1 and PICO2W builds appear to offer serial terminal access only, without Ethernet (inferred from the directory structure — direct code verification recommended).

Documents
Comments Write