This Manchester Baby Emulator Operates Over ICMP Ping Packets — Because Why Shouldn't It?

Dubbed "BabyPing," this emulator blends the height of 1940s technology with a protocol first introduced in 1981.

Gareth Halfacree
3 years agoRetro Tech

Developer Hrvoje Čavrak has created an emulator for the vintage Manchester Baby computer with a difference: It stores its state in short-lived Internet Control Message Protocol (ICMP) packets whizzing over the wire.

Officially pressed into service in June 1948, the Manchester Baby - more formally the Small-Scale Experimental Machine, or SSEM — was created by Frederic C. Williams, Tom Kilburn, and Geoff Tootill at the University of Manchester, England, and is generally recognized to be the first electronic stored-program computer. While a test-bed creation, it would go on to inspire the Manchester Mark 1 — which, in turn, would serve as the prototype for the Ferranti Mark 1, the world's first commercially-available general-purpose computer at its release in 1951.

With modest specifications, writing an emulator for the Manchester Baby isn't that much of a challenge — unless, of course, you make it so by tying its operation into ephemeral ICMP "ping" packets transmitted back and forth over the internet.

"[The] ICMP packet is received by the XDP [eXpress Data Path] hook," developer Čavrak explains. "It parses the ICMP payload, extracts the memory, program counter and accumulator state. Using this information, it fetches and executes the next instruction; it writes the state back into the ICMP packet payload; [the] XDP module changes an incoming ICMP echo response into request, swaps incoming and outgoing addresses to return it back to the sender, creating a potentially endless ping-pong exchange; the ICMP packet is transmitted out for the next iteration."

"While the packet is in flight, the computer has no idea about it any more, as no persistent storage is used — it only lives within the ICMP packet, using it for storing memory and state."

The use of ICMP means that the performance of the emulator is tied more to network conditions than the processor on your host system: "If you choose a very remote location with 250ms [latency], you will get roughly four instructions per second and the speed will go up as you ping a location closer to you," says Čavrak. "Ping of 1.2ms should roughly match the speed of the original machine."

The display — a 32×32 Williams cathode ray tube on the original - is emulated by dumping the ICMP packets and mapping a "o" for a lit pixel and "." otherwise. "Each row is followed by a newline which is respected and displayed properly by tcpdump in ASCII mode," Čavrak adds. "This weird hackery is actually well aligned with display doubling as storage in the original machine."

The full project — which Čavrak jokes is "better than doing drugs or JavaScript" — is available on GitHub under the permissive MIT license.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Get our weekly newsletter when you join Hackster.
Latest articles
Read more
Related articles