Close

Hack Chat Transcript, Part 2

A event log for Hacking Apollo Hack Chat

Apollo was a hack from the Earth to the Moon

dan-maloneyDan Maloney 04/22/2020 at 20:210 Comments

Mike Stewart12:26 PM
not long -- a guy by the name of George Silver observed the problem at the Cape while testing LM-3, documented it, and reported it. and he knew instantly what had happened

curiousmarc12:26 PM
@Mike Stewart But we understand a lot more of it now. It has not been reported correctly by anyone so far as we can tell. It's a horrendously complicated fault.

carlclaunch5112:26 PM
The behavior had been observed at both Grumman and during testing, but its impact on the mission wasn't fully realized

Mike Stewart12:27 PM
@Jeremy Weatherford essentially yes, but exactly how the circuit breaks down and, more importantly, what the dynamic behavior in response to that breakdown was is something we're still working on

curiousmarc12:27 PM
@Jeremy Weatherford Yes that's one of the root causes.

carlclaunch5112:28 PM
In simulated landings, there is a very narrow range of load which generates the alarms but doesn't crash the vehicle. Luck was involved.

curiousmarc12:28 PM
The equipment that "failed", as it is not so much a failure as an unfortunate system miswiring, was the digitizers for the Rendez-vous Radar position sensors.

Mike Stewart12:29 PM
the two power supplies were also at different voltages by the time they reached the CDU -- normal was 28Vrms, but it dropped to 15Vrms when switched to the other supply

carlclaunch5112:29 PM
@Mike Stewart oh, even more subtleties and details we hadn't noticed before

curiousmarc12:30 PM
It's in the CDU, the Coupling Data Unit, which is a big A/D, bigger than the AGC even. Very complicated.

Mike Stewart12:30 PM
for our landing demonstrations I triggered the alarms by using the test connector to halt the computer temporarily every configurable number of memory cycles, and then tuned that number to be a load that would work well for demonstrations

Mike Stewart12:31 PM
so things wouldn't get too out of hand :)

Ken Shirriff12:31 PM
Another AGC project I'm currently working on is writing an emulator for the Honeywell 1800 mainframe. This computer ran the assembler that created the binaries for the Apollo Guidance Computer. It also created the tapes that were used to put the code into core rope memory.

carlclaunch5112:32 PM
Mike's method works equivalently to the real overload because each pulse from the resolver/digitizer would force a hidden instuction thus taking memory cycles

curiousmarc12:32 PM
@Mike Stewart Remember how I first made a simple device that produced the pulse stream that was reported in the accident. We connected that to the AGC and that sure ruined your landing.

Peter Bosch12:32 PM
did any of the tapes/other sw media survive?

Mike Stewart12:32 PM
haha yep

Mike Stewart12:32 PM
no, we haven't found any tapes no

Mike Stewart12:33 PM
pretty much just listings

Mike Stewart12:33 PM
and all of the mechanical/electrical engineering drawings in the National Archives

carlclaunch5112:33 PM
and binary in the core rope modules we have been able to read

Mike Stewart12:33 PM
yep

curiousmarc12:33 PM
So it's more subtle than what has been reported. And they were a lot closer to crashing that was also reported. They really lucked out.

Ken Berkun12:33 PM
May I interrupt with a background question or two? 1. how do you folks find the time for this (those who aren't retired)? And can you please fill us in on your backgrounds that enabled you to do this fascinating work? Thank you.

Mike Stewart12:34 PM
also, while Ken is working on that Honeywell 1800 emulator, I'm slowly taking all of our listings back to punch-card format to feed into it: https://github.com/thewonderidiot/pyul/blob/master/decks/SOLRUM55.R0.deck

Peter Bosch12:34 PM
i assume no cores from ground equipment survived?

carlclaunch5112:34 PM
@Ken Berkun Ken and I are retired, Marc is semi-retired and Mike is a force of nature

Mike Stewart12:34 PM
I just spend all of my time at home, nights and weekends, working on this stuff. And probably spend too many work hours thinking about it

curiousmarc12:34 PM
I just took two weeks off...

carlclaunch5112:35 PM
we operate at the hairy edge of family resentment

Ken Shirriff12:35 PM
The background that helped me with this project was my experience restoring other old computers, starting at the Computer History Museum and then other projects with Carl and Marc.

Mike Stewart12:35 PM
I have an embedded software background, but before starting in on the AGC project couldn't even work through simple transistor circuits. I like to pick projects that I don't know how to do, because learning is most of the fun

Ken Berkun12:36 PM
Do you have education in hardware? EEs? Learn on the go? Just curious and very admiring of your work. (I'm a software guy, hardware amazes the heck out of me. Especially analog.)

Ken Berkun12:36 PM
Thanks Mike, you answered my question before I asked!

carlclaunch5112:36 PM
@Ken Berkun mostly learn as we go

curiousmarc12:36 PM
Also the part that is most time consuming, the researching and understanding of the documentation, Mike had a 5 years head start on this!

Mike Stewart12:36 PM
I have half a college education in computer engineering / electrical engineering. Dropped out to accept a job offer and still haven't finished my degree...

Ken Shirriff12:37 PM
I'm a software guy, so I don't have any real electronics qualifications. LTspice helps me figure out a lot of circuits :-)

Ken Berkun12:37 PM
I agree about taking on projects that you don't know how to do. I've often said that I wouldn't take a job I knew I could do. Of course my wife gets tired of my moaning about having no clue about how to proceed at times...

Mike Stewart12:37 PM
hehehe

carlclaunch5112:37 PM
I found the MITX (EdX) EE course sequences very helpful

curiousmarc12:37 PM
I am trained as an optical physicist, no formal education in EE either. All picked up.

Mike Stewart12:38 PM
yeah LTspice is a godsend for poking at and understanding things

Ken Berkun12:38 PM
Thank you all, keep up the great work!

Peter Bosch12:38 PM
ken: you also a lot of IC reversing, right? any good resources/chatrooms for that? (besides mcmaster's website and your hackaday talk)

carlclaunch5112:39 PM
often I will start on a circuit analytically and Ken will get the answer from LTspice before I am done

curiousmarc12:39 PM
Also working as a team. This is a project that required more talent that can fit in one person.

Dag Spicer12:39 PM
1202

Mike Stewart12:39 PM
100% yeah

Mike Stewart12:39 PM
hi Dag!

carlclaunch5112:39 PM
Hi Dag

curiousmarc12:39 PM
Houston, give us a reading on the 1202

carlclaunch5112:40 PM
Complementary talents and shared commitment

Dag Spicer12:40 PM
Hi guys -- I've been enjoying lurking on thi discussion!

Ken Shirriff12:41 PM
Peter: I don't have a lot of good resources for IC reverse-engineering. I've bought some old (1970s) books on chips that help understand the circuits from that era. Two online sources are Mead & Conway for digital (http://ai.eecs.umich.edu/people/conway/VLSI/VLSIText/PP-V2/V2.pdf) and Designing Analog Chips (http://www.designinganalogchips.com/_count/designinganalogchips.pdf)

Mark VandeWettering12:41 PM
Enthusiasm and persistence (and more than a little talent) seem to be essential in this endeavor (as it is in most).

curiousmarc12:41 PM
@Dag Spicer Hi Dag. Thanks for letting us poke at the CHM's AGC!

curiousmarc12:42 PM
With the help of Dag we were able to recover the core rope that was inCHM's AGC

Mike Stewart12:42 PM
and have disassembled it here: https://github.com/virtualagc/virtualagc/tree/master/Retread50

curiousmarc12:42 PM
Dag is senior curator at the Computer History musesum and a space nuts ;-)

Mike Stewart12:43 PM
still working on the disassemblies for all of the other modules we've dumped...

Dag Spicer12:44 PM
Thank YOU guys for recovering and preserving lost knowledge. It's why we exist.

carlclaunch5112:45 PM
Mike works back from binary code and somehow ends up with commented source listings. Intellectual feat

curiousmarc12:46 PM
@Mike Stewart Which makes me think I still didn't make a video of the footage of you going through the original Luminary listing you bought! That was amazing. I'm glad that one ended up in your hands

Ken Shirriff12:46 PM
I've been studying the LVDC recently, the IBM computer that was on the Saturn V rocket. It's interesting because it had a similar role to the AGC, but the two computers were built completely differently. The LVDC used hybrid modules, not integrated circuits. It was triply-redundant, with three copies of the circuitry and voting. It was a 26-bit computer and operated serially, one bit at a time, so it had a 1-bit ALU, bus, etc. It used printed-circuit boards and backplane, not the modules and wire-wrapped backplane of the AGC.

Mike Stewart12:46 PM
the comments are mostly borrowed from related listings, where I've been able to find precursor/successor code :)

carlclaunch5112:46 PM
Yes, that triangulation is part of the intellectual feat

Mike Stewart12:47 PM
@curiousmarc ah yeah, I was wondering if/when that was going to make it into a video, haha

Rob Weinstein12:47 PM
Hi Mike. I read that before you got involved with the real AGC, you built a gate-for-gate implementation of it using FPGAs. Can you describe how you did that and what were some of the challenges (e.g., two phase clocking)? How did that experience lead to working on the real AGC?

curiousmarc12:47 PM
@Mike Stewart I just forgot about it :-o ! Guess what I am working on next...

Mike Stewart12:48 PM
the code is all here: https://github.com/virtualagc/agc_simulation -- be warned that it was the first time I had ever written verilog

Mike Stewart12:48 PM
the biggest challenge was that the AGC is sort of asynchronous -- there's a main clock but a lot of things are timed with propagation delays

carlclaunch5112:48 PM
Very common in the 1950s and early 1960s as we know from the IBM 1401, 360 and 1130 systesm

Mike Stewart12:49 PM
the realization that let me put it into an FPGA was that since it's entirely made of a single type of chip, every gate will have roughly the same propagation delay, barring differences in loading on each net

Mike Stewart12:49 PM
so you can think of the whole system as having discrete timesteps, where each timestep is one Tpd

Mike Stewart12:50 PM
so I ran a clock into every NOR gate whose period matched the propagation delay of the gates, and step all of the gates in tandem

Mike Stewart12:50 PM
and the problem then became initial conditions to keep the flip-flops from getting into bad oscillating states

Peter Bosch12:50 PM
is Tpd close even when multiple gates are strapped together?

Mike Stewart12:50 PM
close enough!

Mike Stewart12:50 PM
apparently :P

Mike Stewart12:51 PM
we didn't actually measure that on the real thing

Mike Stewart12:51 PM
but it works fine with that assumption in simulation

carlclaunch5112:51 PM
helps that you were working with huge feature size RTL logic

curiousmarc12:51 PM
That FPGA replica was a Godsend during the restoration. Since it's gate exact, we could look at what each signal should look like and compare with the actual AGC we were trying to repair. It even predicted the glitches accurately.

Peter Bosch12:51 PM
thats a pretty cool approach to simulating it :)

Mike Stewart12:52 PM
anyways, it all applied directly to the restoration, because at that point I had worked through all of the schematics and had them all roughly in my head, so it was very easy to pinpoint stuff we were looking for while restoring

Mike Stewart12:52 PM
not gate for gate but enough that I can normally tell you which page a particular thing is implemented on

carlclaunch5112:53 PM
Mike was faster than Google Search - almost instant citation of the relevant documents, signals and gates

Mike Stewart12:53 PM
and yeah, the prediction of glitches was unexpected and very fulfilling, haha

carlclaunch5112:53 PM
Which you verified existed undetected on the real AGC hardware

curiousmarc12:54 PM
@Mike Stewart You should also mention the FPGA replica you made of the ground equipment AGC monitor. And even enhanced it. That was key to the restoration.

Mike Stewart12:55 PM
that's at https://github.com/thewonderidiot/agc_monitor and the verilog is much better, haha

carlclaunch5112:55 PM
Plus Marc's company, Samtec, recreated the unobtainium miniWasp connectors without which it would have been much, much more difficult to proceed.

Mike Stewart12:55 PM
we don't have any schematics for the original AGC monitor, so that was essentially reading through the manual ( http://www.ibiblio.org/apollo/Documents/HSI-208487.pdf ) and figuring out how to make those things happen with the pins available to me on the test connector

Mike Stewart12:56 PM
and then eventually realizing that the test connector pins gave me far more control over the computer than was really intended, which let us do erasable memory simulation and the interface to NASSP

Rob Weinstein12:57 PM
Mike, how did you get involved with the owner of the real AGC? How did you come to meet Carl, Ken, and Marc?

carlclaunch5112:57 PM
Ken had to reverse engineer the core rope simulator modules, which were undocumented, in order to provide the core rope data for each AGC fetch. Once he figured it out, he built a device to respond to fetches.

Mike Stewart12:58 PM
I got into contact with Jimmie very shortly after I found this drawing from Grumman in the National Archives: http://www.ibiblio.org/apollo/Documents/LDW370-54001.pdf

Mike Stewart12:58 PM
that drawing contained a more-or-less complete pinout of the main connector of the AGC in the LM, which was info I had been missing and trying to find for years

Mike Stewart12:59 PM
with that and the full/partial schematics available at the time, I became pretty convinced that if I had access to a real AGC for a few days, I would be able to beep out the rest of it and complete our partial schematics

Mike Stewart1:00 PM
I had also seen this video on youtube by Francois Rautenbach:

Mike Stewart1:00 PM
I had talked to him a few times on the virtualagc mailing list about the (at the time) mysterious DSKY internals, so I reached out to him to see if he could put me into contact with whoever owned the AGC he was looking at there

Mike Stewart1:00 PM
and he got me into touch with Jimmie, who brought up the idea of powering the AGC up in his very first email to me :)

Mike Stewart1:01 PM
so at that point I had access to an AGC, an owner who wanted to power it up. With no experience at all working with old hardware, but I did know the thing inside and out

Ken Shirriff1:01 PM
Mike got in touch with me through John McMaster (siliconpr0n.org). Mike told me about the AGC and asked if I was at all interested. I told him I was ready to book the next flight to Houston :-) Carl and Marc joined me in the restoration, which we did in a hotel room outside Houston.

Mike Stewart1:02 PM
yeah, so I asked John if he knew anybody that did old computer restorations, and he introduced me to Ken

carlclaunch511:02 PM
When Ken asked if I was interested in joining the project, i

Discussions