The Alto was a modern computer designed at Xerox PARC in 1973.
It launched the GUI, excessive-dedication bitmapped shows, the optical mouse and laser printers to the enviornment.
Nonetheless one of its most well-known contributions was Ethernet, the native self-discipline community that is composed carefully ragged at the moment.
Whereas up to the moment Ethernets contend with up to A hundred gigabits per 2nd, the Alto’s Ethernet was much slower, upright three megabits per 2nd over coaxial cable.
Even so, the Alto ragged the Ethernet for
file servers, email, disbursed video games, community boot, and even swear over Ethernet.
The Alto’s three Mb/s Ethernet isn’t any longer effectively matched with up to the moment Ethernet, making it advanced to switch recordsdata between an Alto and the out of doorways world.
To resolve this, I constructed a gateway the utilization of the BeagleBone single-board computer to mutter with the Alto’s Ethernet.
Listed right here I focus on how the Alto’s Ethernet works and the blueprint I utilized the gateway.
The Alto’s Ethernet hardware
The Alto’s Ethernet ragged a coaxial cable, in self-discipline of up to the moment twisted-pair cable.
A transceiver box was the interface between the Alto and the cable,
changing the Alto’s logic indicators to the indicators on the cable.
Within the photo below, that you just would possibly perchance perchance look a transceiver clamped onto the coaxial cable;
a “vampire faucet” punctures the cable making contact with the central conductor.
Internal a transceiver box. The “vampire faucet” on the upright connects the transceiver to the Ethernet cable. The connector on the left goes to the Alto.
The Alto’s Ethernet makes exercise of Manchester encoding of the bits. That is, a “1” is despatched as “10” and a “Zero” is despatched as “01”.
The rationale to live this as an replace of upright sending the raw bits is the Manchester encoding is self-clocking—there is a transition for every bit. If as an replace you upright despatched a raw streak of bits, e.g. “00000000000”, the receiver would beget a absorbing time vivid where the bits originate and close.
The pick below presentations how
0110 is transmitted with Manchester encoding.
An instance of Manchester encoding, for the bits 0110.
The Alto’s community protocols
The Alto predates TCP/IP, as an replace the utilization of a protocol known as Pup (the PARC Universal Packet).1
The protocol has many similarities with TCP/IP, for the reason that Pup designers influenced the TCP form in step with their skills.
The vital Pup Web Datagram has similarities to an IP packet.
A packet contains a destination contend with for the packet consisting of a community identification (1 byte), a host identification on the community (1 byte), and a four-byte socket.
A machine’s host identification is specified by jumper wires on the backplane (below).
Thus, packets will also be routed by blueprint of a shapely community to the upright machine.
Long blue jumper wires on the Alto’s backplane specify the machine’s Ethernet contend with.
Some straightforward community operations upright exchanged Pup packets, to illustrate soliciting for the time from a community server. Nonetheless for more complex operations, Xerox constructed layers on top of Pup. For a protracted-lived connection between two machines, Xerox constructed RTP (Rendezvous/Termination Protocol), a protocol to establish connections between two ports. Here’s analogous to a TCP socket connection.
Once the connection is established, the computers can voice the utilization of Byte Steam Protocol (BSP).
This protocol handles error correction and drift regulate, very such as TCP.
On top of these protocols, Xerox utilized email, FTP (File Switch Protocol), community boot, networked video games akin to Maze Warfare, community error reporting, community disk backups and the significant computer worm.
Alto User’s Primer.
Designing an Ethernet gateway
I made up my mind to present a gateway that would possibly perchance perchance allow the Alto to mutter with a up to the moment machine.
The gateway would voice with the Alto the utilization of its ragged 3Mb/s Ethernet, nevertheless would possibly perchance perchance additionally voice with the out of doorways world.
This would allow us to community boot the Alto, switch recordsdata to and from the Alto and backup disks.
I expected this project to capture a few weeks, nevertheless it ended up taking a three hundred and sixty five days.
The significant dedication was what hardware platform to exercise.
My thought was to exercise a microcontroller to generate the 3Mb/s indicators by “bit banging”, i.e. straight generating the 1’s and Zero’s on the wire.
(A odd processor would possibly perchance perchance now not contend with this in staunch time, due to interrupts and job switching.)
Nonetheless a microcontroller would no longer be precise for running the community stack and communicating with the out of doorways world; I’d want a “staunch computer” for that.
Any individual advised the BeagleBone: a credit-card sized Linux computer with an ARM processor that additionally incorporated two microcontrollers.
This would present a compact, low-cost implementation, so I started investigating the BeagleBone.
The BeagleBone single-board Linux computer is exiguous enough to slot in an Altoids tin. It has many customary/cause I/O pins, accessible by blueprint of the connectors along the pinnacle and backside of the board.
The BeagleBone’s microcontrollers, known as PRUs,2 are designed to budge every instruction in a single 5ns cycle.
Since the Ethernet pulses are 170ns broad, I figured I had masses of time to send and in finding indicators.
(It turned out that getting all the pieces performed in 170ns was tough, nevertheless it labored out within the close.)
In my gateway, the PRU reads the Ethernet signal coming from the Alto, and generate the Ethernet signal going to the Alto, besides to sending a community collision signal to the Alto.
Must you are questioning what PRU code appears treasure, the C code fragment below presentations how a byte is encoded and despatched.
The PRU code outputs the upright sequence of HIGH/LOW or LOW/HIGH pulses (the Manchester encoding), making particular every section is 170ns broad.
Every bit of register
R30 controls an output pin, so the bit for the Ethernet write pin is blueprint and cleared as mandatory.
wait_for_pwm_timer() affords the 170ns timing for every pulse.
The fleshy code is right here.
To in finding recordsdata from Ethernet, my PRU code would now not live any decoding; it upright measures the time between enter transitions and sends these timings to the BeagleBone’s ARM processor. First and significant my code decoded the Manchester encoding into bits and assembled the bits into phrases, nevertheless 170ns wasn’t enough time to live this reliably. As a replacement, since this decoding would now not must be performed in staunch time, I moved the decoding to the more much ARM processor.
The ARM processor additionally does the increased-level Ethernet protocol facing, akin to generating and checking packet checksums.
In self-discipline of contend with transceivers and coaxial cable, I connected the BeagleBone to the Alto’s Ethernet port straight, omitting the transceiver that most ceaselessly connects to this port.
This port affords customary 5V TTL indicators to the transceiver, nevertheless the BeagleBone inconveniently makes exercise of three.3V indicators.
I mandatory a circuit to translate the voltage stages between the BeagleBone and the Alto.
This must composed beget been straightforward, nevertheless I ran into varied problems along the model.
On the support of the Alto, Ethernet is accessed by blueprint of a DB-25 connector that connects to a transceiver box.
I constructed a prototype voltage translation circuit on a breadboard, the utilization of a 74AHCT125 level shifter chip (schematic).
On the opposite hand, I was getting no Ethernet signal the least bit from the Alto, so I started probing the Alto’s board for a malfunction. I stumbled on that though the Alto’s schematic showed pull-up resistors, these resistors didn’t exist on the Alto’s Ethernet board (look photo below).
With out a resistor, the commence-collector signal stayed at floor. Adding the resistors to my circuit mounted that shrink back.
One shrink back I encountered was termination resistors R8 and R9 looked on the schematic nevertheless were lacking from the board (above the word “ETHERNET”).
The next streak was to write the PRU microcontroller code to send and in finding Ethernet packets.
After replace testing with the Alto’s Ethernet Diagnostic Program (EDP), I was ready to echo packets support and forth between the BeagleBone gateway and the Alto.
The Ethernet Diagnostic Program will also be ragged to test the Ethernet. It has a straightforward GUI.
To be worthwhile, the gateway must relief the community stack: Pup packets, community booting, Alto-model FTP etc.
I started by rewriting the Alto’s community code, making an instantaneous port of the BCPL implementationthree to Python.
This turned out to be a broad number, for the reason that contemporary implementation depended carefully on the Alto’s working machine, which offered a few threads, so the applying would possibly perchance perchance budge in one thread and the community code in other threads.
I managed to get the stateless low-level Pup packets to work ok, nevertheless the increased-level Byte Stream Protocol was a tangle of busy-ready loops and timeouts.
Fortuitously the Residing Computers Museum+Lab (LCM+L) got right here to rescue.
Josh Dersch on the museum had written a C# implementation of the Alto’s community stack, so I made up my mind to discard my implementation of the community stack.
This implementation, known as IFS,four supported the low-level protocols, besides to servers for community operations, FTP, and Copydisk.
IFS was a brand unique implementation in self-discipline of an instantaneous port treasure my are trying, and that methodology labored severely greater.
The Residing Computers Museum constructed a three Mb/s Ethernet interface the utilization of an FPGA chip.
The LCM+L additionally constructed an Ethernet interface to the Alto.
Theirs was rather more complex than mine, consisting of an FPGA chip on a customized PCI card plugged into a PC.
Not like my interface, theirs communicated with a transceiver box, in self-discipline of connecting to the Alto straight.
Even supposing the LCM+L’s FPGA interface labored for us, I made up my mind to entire my interface board since
I cherished the basis of a low-cost, compact Ethernet gateway.
Their interface is more “realistic”, since it connects to a staunch transceiver and community cable and would possibly perchance perchance work with a few Altos on a community.
(The photo below presentations the mini-community connecting the LCM+L interface and an Alto.)
On the replace hand no longer all people has Ethernet transceivers lying around, so mine is more broadly usable.
A in point of fact brief three Mb/s Ethernet community, exhibiting two transceivers attached to the coaxial cable. One transceiver is attached to the Alto and the replace is attached to the LCM+L gateway card.
I made a straightforward printed circuit board to change my breadboarded prototype.
This was the significant circuit board I had designed in about 35 years and skills has absolutely modified.
Wait on within the Nineteen Eighties, I drew circuit board traces with a withstand pen on a copper-clad board, and then etched the board in ferric chloride resolution from Radio Shack.
Now, I designed my board the utilization of Eagle, uploaded the file to OSH Park, and obtained a marvelous looking out circuit board a few days later.
My three Mb/s Ethernet interface is a level-shifter card on a BeagleBone. Present the capacitor soldered straight to the motive force IC to repair a ringing signal shrink back.
Running the LCM+L’s IFS instrument on the BeagleBone took some work for the reason that BeagleBone runs Linux and IFS was written in C# for Dwelling windows.
By the utilization of the Mono platform, I would possibly perchance perchance budge most of the C# code on the BeagleBone.
On the opposite hand, the LCM+L instrument stack communicated with the gateway by encapsulating Alto Ethernet packets in a up to the moment Ethernet packet, the utilization of a .Safe Pcap library to access the raw Ethernet.
Unfortunately, this library didn’t work with Mono, so I rewrote the IFS encapsulation to exercise UDP.
At this level the Alto and my BeagleBone implementation communicated as a rule, nevertheless there beget been a few advanced bugs to word down.
The significant shrink back was FTP would get every so often fallacious packets. Ultimately I stumbled on that I had blended up byte and word counts in one self-discipline, and the shapely packets from FTP were overflowing the PRU’s buffer.
The next shrink back was that after I ragged Copydisk to reproduction a disk pack from the Alto to the BeagleBone, a dropped packet caused the community to lock up after a couple minutes.
This was puzzling for the reason that sender must composed retransmit the misplaced packet after a timeout and all the pieces must composed enhance (treasure TCP).
After leisurely debugging, I stumbled on that if the Alto and the BeagleBone transmitted packets shut collectively, a budge condition in my code caused a dropped packet.56
Then IFS disregarded to send a compulsory ack when it obtained an surprising packet, so the Alto saved resending the detrimental packet.
After fixing each and each my gateway code and the IFS ack, the community ran with out problems.
2nd version of the interface. Present the blue jumper wire to change the lacking brand.
My first version of the PCB had a few pointseight so I made a 2nd version (above).
I stumbled on that the motive force chip didn’t sink enough recent for a protracted cable, so I replaced it with the chip ragged by the transceivers (a 7438 commence collector NAND gate). I additionally made up our minds to are trying KiCad as an replace of Eagle for the 2nd board.
Unfortunately, I made a mistake in KiCad7 and the unique board was lacking a brand, so I had to solder in a jumper (which that you just would possibly perchance perchance seen within the photo above).
I probed the Alto’s Ethernet card with an oscilloscope to check the indicators it was receiving. An extender card from the LCM+L allowed us to access the card.
I examined the unique board nevertheless it didn’t work the least bit: the Alto wasn’t receiving recordsdata or sending recordsdata. I spotted that the unique driver chip was a NAND gate so the indicators were now inverted. I up thus a long way the PRU code to flip LOW and HIGH on the tips out signal. The board composed didn’t work, so I probed the Alto’s Ethernet board with an oscilloscope, comparing the indicators from the oldschool working board to the unique failing board. Strangely, each and each indicators were an identical within the Alto and looked handsome.
Ultimately Marc asked me if there would possibly perchance perchance very effectively be something detrimental with the collision detection. I spotted that the the unique NAND driver was additionally inverting the collision detection signal.
Thus, the Alto was seeing fixed community collisions and refused to send or in finding anything.
After fixing this in my PRU instrument, the unique board labored handsome. I’m making a third revision of the board to repair the lacking brand; confidently this will no longer rupture something else.
An assortment of vintage Ethernet transceivers, at the side of the faucet tools ragged to drill holes within the Ethernet cable for the vampire faucet connection.
The Ethernet gateway project took rather more time and encountered more problems than I expected.
Nonetheless it labored within the close, and quite loads of other Alto dwelling owners within the meantime are the utilization of my gateway.
I’ve commence-sourced this interface (the board structure and the gateway instrument); it is on hand on github.
The Alto I’ve been restoring got right here from YCombinator; the restoration crew contains
and Luca Severini.
My fleshy blueprint of Alto posts is right here and Marc’s extensive movies of the restoration are right here.
Thanks to the Residing Computers Museum+Labs for the IFS instrument.