
Restoring YC's Xerox Alto day 8: it boots - dwaxe
http://www.righto.com/2016/09/restoring-ycs-xerox-alto-day-8-it-boots.html
======
raldi
I love that the first boot screenshot at
[https://lh3.googleusercontent.com/-JB4VOj7FgnU/V-lCHIADrsI/A...](https://lh3.googleusercontent.com/-JB4VOj7FgnU/V-lCHIADrsI/AAAAAAAA9Ak/WJgwdr60tqYHWLM7htNMygs1JuuUaEiJwCHM/s9999/boot.jpg)
says:

    
    
        Date and Time Unknown
    

Oh, you poor sweet computer, if we told you the answer, it would blow your
little mind.

~~~
kens
I happened to come across the Alto's time handling code [1] while looking for
something else. The Alto counts seconds since Jan 1, 1901 and the time can run
until 2036 since it uses a 32-bit value. (Unix time in comparison runs from
1970 to 2038; it runs half as long because it loses a bit by using a signed
value.)

The point of this is the Alto can handle dates until 2036, but will run into
problems two years before Unix self-destructs in 2038.

[1]
[http://xeroxalto.computerhistory.org/Indigo/AltoSource/TIMES...](http://xeroxalto.computerhistory.org/Indigo/AltoSource/TIMESOURCE.DM!2_/.TimeConvB.bcpl.html)

~~~
userbinator
Good to see they at least thought some reasonable amount of time into the
future; in contrast, the Apple Lisa, released 10 years after the Alto and a
few years after the IBM PC, had an RTC that only went to _1995_ :

[https://systemfolder.files.wordpress.com/2009/11/lisaem-
date...](https://systemfolder.files.wordpress.com/2009/11/lisaem-date.png)

[http://lisafaq.sunder.net/lisafaq-hw-io-
cop421_clock.html](http://lisafaq.sunder.net/lisafaq-hw-io-cop421_clock.html)

(Apart from this shortsightedness, the rest of the Lisa's design is also...
interesting. Proprietary custom ICs, a pretty much locked-down user-is-an-
idiot GUI, and complete separation between users and developers. It failed
then, but unfortunately the same strategy is now considered the norm 30 years
later...)

------
rhardih
This series is the best thing on HN in a long time. As a software engineer by
trade, I feel like I've been missing out not learning more about electrical
engineering. The level of knowledge and skill involved in this restoration is
downright awe-inspiring.

~~~
grecy
At my University (Swinburne, Melbourne, Australia) I studied Software
Engineering with a minor in Digital Electronics.

They said all along the goal wasn't for us to be as competent as the
Electrical/Electronic Engineers, but to teach us their language and the basics
so we could work together. It was great.

My degree is accredited by the Australian Institute of Engineers.

~~~
ajdlinux
At ANU I took one of our (quite few) digital electronics courses that taught
me how to design simple digital logic on FPGAs. It ended up being probably one
of my three favourite courses of my degree.

I think what I got out of it was similar - I'm obviously not nearly as
knowledgeable as a fully fledged electronics engineer, but I have some basic
knowledge which allows me to cross the gap between software and hardware and
truly appreciate the fact that it is actually possible to get from just having
a pile of logic gates to having something resembling a processor.

To anyone reading this who's currently a CS major - if you have the
opportunity to do a course in digital logic design I'd highly recommend it.
Regardless of what layer of the stack you end up working in, it's a lot of fun
and very satisfying to understand how this stuff works. If you do end up
working fairly low in the stack it's particularly helpful - after uni I ended
up working on kernel development at IBM where even though I don't work in
hardware engineering I've found it helpful to have some of the background
knowledge.

~~~
ansible
_To anyone reading this who 's currently a CS major - if you have the
opportunity to do a course in digital logic design I'd highly recommend it.
Regardless of what layer of the stack you end up working in, it's a lot of fun
and very satisfying to understand how this stuff works._

Seconded.

There wasn't really a Computer Engineering degree back when I was in school,
but I made do. As it turned out, some EE classes would qualify for the lab
science credit, so I took those instead of more physics or chemistry.

I had been fascinated in electronics for a long time before starting college,
so I had a blast in those classes.

And it has all helped me a lot since then. I'm working on radar systems these
days, and it would have been useful to take a little more analog and RF design
courses. But those weren't my interest way back then. I've picked up a lot on
my own since then though.

------
ChuckMcM
Awesome!

All you need is the white lab coat and Gene Wilder's "It's alive!" in the
background. Congrats on getting it to this point, as anyone who has brought up
new systems for the first time knows, once you can get your central processor
to load and run software of your choice, you can use it to tell you what it
not working correctly and bring everything else up. It is always a total rush
when the system boots for the first time. (or in this case, "boots again" :-))

I would be particularly keen to insure that the arrow keys work on the
keyboard, as a lot of Altos were used to play mazewar and that was hard on the
arrow keys.

------
DIVx0
As is said every time this blog updates: This is very interesting stuff and I
enjoy reading about the progress.

I can't imagine the excitement these folks felt when the machine finally
booted up. All of their skilled trouble shooting and hard work were spot on.

I can't wait to read more.

------
tiles
This is an amazing milestone! I have to ask, why did we need a separate boot
disk sent over instead of flashing the previous disk with the contents of a
boot disk? I suppose swapping out parts is an expected part of restoration
though.

~~~
kens
We're building a FPGA-based disk emulator that we could connect to the Drive
to rewrite the junk disk, but we don't have that ready yet. The Living
Computer Museum could have rewritten our disk for us, but that would have
required sending our disk to Seattle first so they just sent us a new disk.
(The Living Computer Museum has been extremely helpful, so visit them if
you're in the Seattle area!)

~~~
raldi
Their assistance was really shrewd; I've been to the CHM in Mountain View
before, but had never heard of the LCM and probably would never have gone
before this, but now I'm definitely going to go the next time I'm up in
Seattle.

~~~
kens
I don't think they're assisting because they are shrewd, but because they are
genuinely nice and helpful people, and like to see old computers running.

~~~
raldi
Oh, of course! I didn't mean to suggest otherwise. I'm just saying, it's also
great publicity in addition to everything else.

------
CodeWriter23
The disk seek problem didn't mysteriously disappear. You need to bust out some
some contact cleaner and clean those header strip connections, both sides.

~~~
socmag
Yes it is mysterious.

Was that drive known good then?

Also what is the track sense mechanism?

Optical shaft encoder? Could have been just a bunch of dust.

Also a lot of drives used a Hall sensor or even an opto-coupler with a slot to
detect track zero. First thing was to calibrate the head with a track zero
seek.

Another thing. Those flat ribbon cables are prone to a lot of RFI over long
distances, especially when you have them hanging around on the bench. Notice
some of the other ribbon cables are twisted pair. A lot better!

I've wire wrapped my own disk controllers back in the early 80's. This series
is serious nostalgia! <3

Curious to know what the final problem will end up being diagnosed as.

The smell of old hardware like that is literally burned in my brain!

------
intrasight
This has been a fun series to track. I used an Alto when I was in college. As
an EE, we had to wire-wrap a computer using bit-slice and TTL parts.
Definitely the hardest lab component course I took (there were much harder
theoretical courses).

So a new Broadwell-EP Xeon chip has like 7 billion transistors. I'm trying to
imagine this kind of computer hardware archeology as it will be done thirty
years from now.

------
kens
The video of the Alto booting is now available:
[https://news.ycombinator.com/item?id=12590137](https://news.ycombinator.com/item?id=12590137)

------
thought_alarm
Really neat. I can't wait to see the video!

The pictures of screen look unusual, as if every second scan line is missing.
Is the Alto outputting an interlaced video signal? That would be very
interesting and unexpected.

~~~
kens
Yes, the Alto's video is interlaced. I took the photos with my phone (which
used 1/60 second speed), which would explain why scan lines are missing. I'll
use a real camera next time and see if that helps.

------
sama
Congrats to everyone who made this happen. It's so cool!

------
tkinom
What were the CPU/ ISA used in the Alto?

~~~
kens
To the programmer, the Alto's instruction set is the same as the 16-bit Data
General Nova minicomputer, with the addition of a few crazy instructions such
as "copy character bitmap from font file to screen".

The Alto's CPU is built from a whole pile of TTL chips on three boards. The
Alto's arithmetic-logic unit, like many computers of that era, uses 74181 ALU
chips. The CPU runs a crazy multitasking microcode, with one of the tasks
emulating the Nova's instruction set. The hardware manual refers to the
"microprocessor", meaning the microcode processor, not a microprocessor chip
since microprocessors as such were in their infancy at the time.

There's a picture of the Alto's ALU board in one of my earlier articles [1].
You can see the individual CPU registers, as they are made out of multiple
latch chips. For all the details of the Alto's CPU, see the hardware manual
[2].

1: [http://www.righto.com/2016/06/y-combinators-xerox-alto-
resto...](http://www.righto.com/2016/06/y-combinators-xerox-alto-
restoring.html)

2: [http://bitsavers.informatik.uni-
stuttgart.de/pdf/xerox/alto/...](http://bitsavers.informatik.uni-
stuttgart.de/pdf/xerox/alto/Alto_Hardware_Manual_Aug76.pdf)

~~~
Gibbon1
Just an addition, microcoded processors are conceptually very simple. One can
start with considering the 74181 which has four lines to control which
operation is performed with the two 4 bit inputs. So each microcode word has
four bits to control the ALU. A few bits to select which words out of register
file is presented to the inputs of the ALU, etc.

So conceptually a machine like that Alto is actually something you can grasp
without a lot of pain. Very much unlike the early 8 bit processors like the
8080, Z80, 6502 where they used lots of ticks to keep the transistor count
down.

~~~
kens
> So conceptually a machine like that Alto is actually something you can grasp
> without a lot of pain.

Have you actually looked at the Alto's microcode? It's brain-explodingly
bizarre. The first thing is it has 16 tasks (yes, in the microcode) and what
an instruction does depends on what task is running. Second, every micro-
instruction includes a computed goto, where the hardware can OR bits into the
address. And because this is task-dependent, you can't figure out the control
flow - maybe this instruction will proceed linearly, or maybe it will branch 4
ways depending on the status of the Ethernet board. Next, the circuitry uses
PROMs in various places. You say the microcode has four bits tied to the
74181, but no, the four bits go into a mystery PROM which generates entirely
different bits that go to the 74181. And then there's the constant PROM
holding all the constant values used by the microcode. And the processor bus
has the property that multiple sources can write the bus at the same time,
with the values ANDed together. Not to mention the ALU shifter output is
modified by a microcode function literally called MAGIC. And I'm just getting
started here...

My point is that even by microcode standards, Alto microcode is bizarre and
painful. And if you disagree, I have some microcode that needs explaining -
MADTEST (Microcode Alto Diagnostic Test) fails on our Alto and nobody
understands what it is doing.

------
0x0
I'm trying to read the article on an iphone but every time I zoom out to see
the full width article I get bounced over to an article about toothbrushes?!

For the better part of a minute I was wondering if they had monkey-patched the
disk controller with an electronic toothbrush?!

~~~
kens
You must have swiped left to my earlier article where I did a teardown of a
Sonicare toothbrush.

I've removed Blogger's swipe left/right navigation, which I think is more
distracting than useful, and I've re-enabled pinch to zoom, so hopefully the
navigation will work better for you now. Also note that you can tap on a photo
to get a high-resolution version (better than zooming will give you).

~~~
pjc50
It's a little thing, but thankyou for reading feedback and responding like
this with blog improvements.

------
fit2rule
I love it that its finally booting. I wonder if they've considered taking all
the probes off, and booting without debugging hardware attached ..

~~~
kens
We'll leave the probes on until we're done debugging since it's pretty tedious
to reinstall them. Is there any particular reason you suggest booting without
the probes?

~~~
cnvogel
Probably out of fear that the signals might deteriorate with probes attached.

But with a modern-ish logic-analyzer and the ancient original hardware (huge
voltage swings, slow clock, very long busses), I doubt that the probes would
make a discernible difference, would they?

~~~
kens
Yes, you're right about the signals. The Alto has a 5.88 MHz clock which is
very slow by modern standards, and the buses are a couple feet of wire-wrapped
pins so the probes are unlikely to have any effect.

I'm not sure modern-ish is the right word for the logic analyzer. It's a 1999
Agilent logic analyzer and I don't know how they managed to make it so slow.
You can ftp a trace off it over Ethernet at the glacial speed of 10 kilobytes
per second, so copying traces for analysis is a big bottleneck.

~~~
eric_the_read
Is it a 16500? If so, you might see if you can scrounge up a 16505A, which
might be able to network much faster (plus, it supports VNC and has a nice
(for the time) graphical display. The 16505A is basically a PA-RISC pizza box
that hooks up to the 16500 via a SCSI cable on the back, and adds some
X11/Motif GUI happiness on top. I took a quick look around eBay and saw one
for ~$275, but you might be able to get one cheaper if you look.

Side note: it was called a "Prototype Analyzer" because it was meant for
analyzing prototypes, but we had more than one customer tell their salesperson
to come back later when it was out of the prototype stage.

~~~
kens
The logic analyzer is a 1670G; Marc collects vintage HP equipment, although
technically this is Agilent.

~~~
eric_the_read
You might try mounting it via NFS; it's also quite possible that the serial
port might be faster for getting traces off the box than its relatively anemic
ethernet support.

~~~
kens
The serial port is also slow as molasses. If we want a full download, Marc
will run it over the serial port overnight. We haven't tried NFS.

------
dudouble
Really cool stuff. Makes me want to give another go at bringing up my C-64
(much simpler, of course).

If only I had proper tooling and knowledge...

------
bogomipz
This has really been a great series to read. Does anybody know where this will
live when they are done restoring it?

~~~
kens
It will probably be at the YCombinator office for a while but we haven't
figured out a long-term plan. Any suggestions?

~~~
david-given
Gateway the ethernet from yours to the one in the museum? After all, they are
supposed to be _networked_ workstations...

------
mempko
The living computer museum is an amazing place. Highly recommend visiting if
you ever come to Seattle.

------
julian_1
Is this the only Alto running today?

~~~
Sanddancer
The Living Computer Museum in Seattle has a fully functioning Alto, as well as
a bunch of other vintage systems.

~~~
mempko
I played with it. It was as amazing as I had hoped.

------
obaymardini
<

------
obaymardini
>>

