Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
NASA Programming

A Spaceflight Engineer Recovers the Lost Software For Apollo 10's Lunar Module (youtube.com) 30

Long-time Slashdot reader destinyland writes: Vintage computing enthusiasts have recreated NASA's legendary "Apollo Guidance Computer," the 1960s-era assembly-language onboard guidance and navigation computer for the Apollo missions to the moon. Unfortunately, the software had been lost for the Apollo 10 mission (a manned "dress rehearsal" mission which flew to the moon eight weeks before Neil Armstrong's famous moonwalk mission).

But spaceflight engineer Mike Stewart found a clever way to recreate it, according to one science show on YouTube. Stewart found a print-out of an earlier version of the program, and "with the help of a small army of volunteers, Mike hand-transcribed the source listing and all of its programs..." — all 1,735 pages of it. (Though what used to take 25 minutes to compile together on a Honeywell mainframe now takes less than a second on his modern laptop.) There were also NASA memos which described the change, later versions of the program which had implemented the changes — and most importantly, a recently-discovered NASA document giving the checksum for every version of every program run on the Apollo Guidance Computer. So Stewart was able to cut-and-paste carefully-chosen code and variables from later versions of the program — based on the clues in NASA's memos — until he'd recreated a program with the exact same checksum.

There's also a separate video about the Apollo 10 code, highlighting "lighthearted comments in very serious code." (For example, to warn off people who'd change their crucial constants, they'd actually included a Latin phrase — a play on a biblical quote which translates roughly to "Don't touch these.") The ignition routine that actually lights the descent engine for the moon landing is named BURNBABY. The comment accompanying it? "OFF TO SEE THE WIZARD."

This discussion has been archived. No new comments can be posted.

A Spaceflight Engineer Recovers the Lost Software For Apollo 10's Lunar Module

Comments Filter:
  • For example, to warn off people who'd change their crucial constants, they'd actually included a Latin phrase — a play on a biblical quote which translates roughly to "Don't touch these."

    And fortunately, for the physical constants [wikipedia.org], nobody can.

    • Re:System security (Score:4, Interesting)

      by rossdee ( 243626 ) on Sunday June 14, 2020 @12:08PM (#60182082)

      "And fortunately, for the physical constants nobody can."

      I am thinking that the moon has moved a bit further away from the Earth in the last 50 some years.

    • by MrKaos ( 858439 )

      And fortunately, for the physical constants [wikipedia.org], nobody can.

      What if they're not constant?

      • Then atheists lose the other way, too. Like with evolution. Heads theists win, tails they lose.

        Naturally, given the Design.

        • by MrKaos ( 858439 )

          Then atheists lose the other way, too. Like with evolution. Heads theists win, tails they lose.

          What if both things are true at the same time?

          • You seem to like open-ended hypotheticals. Your point?

            God defined the physical constants. As such, he can override them at will.

            That's my position. Feel free to define yours.

            • by MrKaos ( 858439 )

              You seem to like open-ended hypotheticals. Your point?

              Interesting conversation.

              I think the thing the "God, no God" conversation misses is that both answers can be the same at the same time for different individuals. Perhaps the meaning of life is God evolving a high form of consciousness through experiences as corporeal beings and the reason why we're not supposed to know is so that we have the free will to choose.

              Obviously I don't know because I am a slightly more evolved ape that wears socks.

              God defined the physical constants. As such, he can override them at will.

              That's my position. Feel free to define yours.

              Even override them and they still appear to be the same. I'

  • by destinyland ( 578448 ) on Sunday June 14, 2020 @12:34PM (#60182148)
    The weirdest thing about this is how the primitive 1969 actually helped them recreate the code [thenewstack.io].

    The program they'd wanted to recreate was a total of 72 kilobytes of code, but they spread it across 36 different 512-byte "banks" -- and there was even a separate checksum for each bank!
  • I read the NASA didn't provide enough fuel on the lunar lander to prevent the astronauts from landing on the moon to preempt Apollo 11 from that achievement. If they went down, it would have been a one-way trip.

    • I heard that too, but I'm assuming the primary motivation was to decrease the mass of the LM assembly to give them a larger safety margin for any burns.
    • by blindseer ( 891256 ) <blindseer@noSPAm.earthlink.net> on Sunday June 14, 2020 @01:27PM (#60182332)

      I read the NASA didn't provide enough fuel on the lunar lander to prevent the astronauts from landing on the moon to preempt Apollo 11 from that achievement. If they went down, it would have been a one-way trip.

      I believe that this is well known by now. NASA may have kept this to themselves for a while since this may not have reflected well on them at the time. After the Apollo missions were complete there would be no need to keep this a secret.

      There could have also been a number of made up reasons to do this besides keeping Apollo 10 from reaching the surface of the moon. They could have said this was a weight saving measure. It could be explained as a safety feature, since a lower fuel load would be a lesser danger in case of a fire, or whatever. Some of these reasons may be true, but simply overstated to make the excuse "stick". What this most certainly did was make it clear to the astronauts was that they were not to land on the moon.

      • Re: (Score:3, Informative)

        by paulfjeld ( 641367 )
        Luminary 69 rev. 2 might well have been able to land Lunar Module 5, Eagle, the first LM that was light enough *structurally* to have the propellant margins needed to fly the landing mission. LM-4 was too heavy with a proper flight load of propellant so that would have been incredibly risky. Had mission managers decided they wanted Apollo 10 to do the landing (and there was at least one) they would have had to wait for LM-5 and launch in July anyway. By then the whole program was on a roll. They had ramped
    • by sconeu ( 64226 )

      First of all, these guys *COULDN'T* land. The LM was too heavy, and Stafford and Cernan knew that.

      Second, they were professional test pilots. They knew exactly what they were expected to do and why. They wouldn't have blown the mission.

      The LM ascent stage *was*, in fact, underfueled, but that was to simulate the mass of an LM that had launched from the moon's surface.

  • There's a reason people have moved from simple CKSUM to MD5SUM and SHA and now AES.

    I'm pretty sure since none of us have an Apollo lunar rocket and lander to test the software on, this is academic (or "moot" in the real world.)
    Still, checksum and has col's happen. Don't assume you have the "exact same thing" because of it.

    E

    • by blindseer ( 891256 ) <blindseer@noSPAm.earthlink.net> on Sunday June 14, 2020 @01:14PM (#60182282)

      The space in which one could get a matching checksum AND working code has to be very very small. This is made smaller with the memory they had available to work with.

      There's only so many ways to arrange those bits in the memory, this is a very very large number. Of those there is a smaller number with the same checksum as that noted in the records they have on file. Of those is a smaller number that will run in a way that is logical for the mission. Of those is a smaller number yet that would be consistent with the memos made noting the changes to the code.

      If this number is greater than one then I would be very surprised.

      • Re: (Score:1, Troll)

        by gavron ( 1300111 )

        I agree in principle... but the problem is we have no way to verify that the code works other than "it runs".
        When you're dealing with 8-bit machine code, there's a lot of leeway to get around issues. NOPs count.
        So yeah, I do agree that it's possible this is close or even "right on" but I don't think it's 1:1.

        E

        • by Samantha Wright ( 1324923 ) on Sunday June 14, 2020 @03:46PM (#60182848) Homepage Journal
          The actual Apollo 10 code (Luminary 69 Rev 2) was created by backporting changes from later versions (Luminary 70+ code into Luminary 69, which was the actual printout they obtained). The checksums were computed for individual 512-byte blocks, on a 16-bit machine, meaning a check existed for every 256 instructions—of which only a few were different. They were able to match the checksums by copying and pasting code from the next version, following memos that detailed what changes were made. So, the amount of guesswork involved was near zero. Given these facts, I don't think it's unreasonable at all to assume they got it exactly correct, unless the actual L69R2 code contained an unnecessary change that deviated from the primary development history (of L69 to L70), such as swapping the order in which two values were stored or calculated.
        • by lokedhs ( 672255 )
          There is definitely a way to test it. There is a simulator of the lunar module that they can fly, and they have connected an actual AGC to it and actually landed with it.

          The guy who did the work is arguably the world's foremost expert in the AGC, and has designed an FPGA-based hardware correct clone of it, and run the original hardware test equipment on it.

          You can watch the video where he explains in detail how it was done, and why it is almost certain this is the correct version. I've linked the video

    • by lgw ( 121541 ) on Sunday June 14, 2020 @03:47PM (#60182856) Journal

      No one uses MD5, SHA, or AES at low level to catch low-level bit errors. It's the wrong sort of tool. We moved to CRCs, and then ECCs. You don't use tools designed to catch deliberate falsification of data, you use tools designed to catch and ideally correct accidental bit flip or transpositions of the kind relevant to the problem at hand.

      But most of the code in the Apollo missions was in Core rope memory, [wikipedia.org] which doesn't have to worry about radiation causing bit flips. Bit of a pain to patch a bug, though, as you have to wait for the women to re-weave your computer. Fortunately, they were quite good at it.

      • by MrKaos ( 858439 )

        But most of the code in the Apollo missions was in Core rope memory, [wikipedia.org] which doesn't have to worry about radiation causing bit flips. Bit of a pain to patch a bug, though, as you have to wait for the women to re-weave your computer. Fortunately, they were quite good at it.

        I don't understand why some people go insane over comments like this that demonstrate how complementary women and men are. I watched a documentary on the manufacture of Rolls Royce Jet engines and the women who had the skill and manual dexterity for the fine repetitive work required to create the wax models that the molten titanium would be poured into that core components of the turbine blade were formed by.

        They were *all* women and their manual dexterity came from activities like needle point that men

  • by caseih ( 160668 ) on Sunday June 14, 2020 @01:25PM (#60182322)

    Mike Stewart has been working on the AGC and its software for several years now along with a crew of other enthusiasts who are all extremely talented geniuses, including Marc Verdiell, Ken Sherrif, and several others.

    I watched with great interest the entire series of videos on CuriousMarc's youtube channel on restoring the Apollo Guidance Computer to full function [youtube.com], and actually using it to perform a simulated landing [youtube.com]. Pretty neat to see that old software running on the real computer hardware, still performing perfectly. A tribute to those engineers in the 1960s who designed and created it including the women who literally sewed the bits into the ROM banks.

  • by kmahan ( 80459 ) on Sunday June 14, 2020 @01:57PM (#60182446)

    There's something about fanfold printouts that made writing/debugging assembly code a lot more fun than it is today. There are times I miss those days.

  • by skoskav ( 1551805 ) on Sunday June 14, 2020 @02:51PM (#60182666)

    Uh oh. Those NASA engineers weren't very inclusive [github.com]. This shit won't fly in 2020, grandpa.

    /s

  • Work was done on some of the earlier missions

    https://hackaday.com/2016/09/0... [hackaday.com]

If you aren't rich you should always look useful. -- Louis-Ferdinand Celine

Working...