News The code that took America to the moon was just published to GitHub

GodAtum

Member
Joined
Jun 1, 2014
Messages
82
Reaction score
5
Points
8
Website
godatum.blogspot.com
The AGC code has been available to the public for quite a while–it was first uploaded by tech researcher Ron Burkey in 2003, after he’d transcribed it from scanned images of the original hardcopies MIT had put online. That is, he manually typed out each line, one by one.
“It was scanned by a airplane pilot named Gary Neff in Colorado,” Burkey said in an email. “MIT got hold of the scans and put them online in the form of page images, which unfortunately had been mutilated in the process to the point of being unreadable in places.” Burkey reconstructed the unreadable parts, he said, using his engineering skills to fill in the blanks.
“Quite a bit later, I managed to get some replacement scans from Gary Neff for the unreadable parts and fortunately found out that the parts I filled in were 100% correct!” he said.

The effort made the code available to any researcher or hobbyist who wanted to explore it. Burkey himself even used the software to create a simulation of the AGC.

As enormous and successful as Burkey’s project has been, however, the code itself remained somewhat obscure to many of today’s software developers. That was until last Thursday (July 7), when former NASA intern Chris Garry uploaded the software in its entirety to GitHub, the code-sharing site where millions of programmers hang out these days.

https://github.com/chrislgarry/Apollo-11/

Do you think Orbiter devs could use this for addons?
 

indy91

Addon Developer
Addon Developer
Joined
Oct 26, 2011
Messages
1,226
Reaction score
592
Points
128
Someone should make an addon with this code. I call this project: Project Apollo - NASSP :rofl:
 

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
10,877
Reaction score
2,131
Points
203
Location
between the planets
Basically you'd have to write an emulator of the hardware used to run the code on... That would be quite a project, but there are people here that might be crazy enough to attempt it.
 

indy91

Addon Developer
Addon Developer
Joined
Oct 26, 2011
Messages
1,226
Reaction score
592
Points
128
Basically you'd have to write an emulator of the hardware used to run the code on... That would be quite a project, but there are people here that might be crazy enough to attempt it.

Yeah, that would be quite the feat. I imagine a very realistic simulation of the Apollo program implementing such an emulator. So realistic that it takes many, many years to complete and will look abandoned to most people. But eventually it will have a proper release. Maybe even within the next few months. At least if the probe is gracious :hailprobe: as well as the time schedules of the few contributors working on such a project.
 

Hlynkacg

Aspiring rocket scientist
Addon Developer
Tutorial Publisher
Donator
Joined
Dec 27, 2010
Messages
1,870
Reaction score
3
Points
0
Location
San Diego
I have the Neff copy on a USB drive along with several of the original manuals that I've been using as references for my own code but I'll be downloading this for sure.

I'm pretty sure one of the NASSP guys was working on a software emulator of the agc's operating system that (in theory) should be able to run the upper level programs in this code but I don't know what the status of it is.

---------- Post added at 13:07 ---------- Previous post was at 13:06 ----------

:ninja:'ed by Indy
 
Last edited:

indy91

Addon Developer
Addon Developer
Joined
Oct 26, 2011
Messages
1,226
Reaction score
592
Points
128
Just to explain something I thought was common knowledge around here. Or maybe you all are playing along and I don't get it? I'm German, that would be my excuse. :rofl:

NASSP (http://nassp.sourceforge.net/wiki/Main_Page and/or https://github.com/dseagrav/NASSP/ ) uses the Virtual AGC emulator (http://www.ibiblio.org/apollo/index.html), which runs exactly the code described in the OP. At this point it is fully implemented in our simulation of the CSM and essentially the LM too, but the LM doesn't properly work right now.

I don't use the word "fully" lightly, we have the AGC connected to all the necessary simulated systems (IMU, RCS, sextant, attitude indicators etc. etc.) so that all the capabilities of the AGC can be used.

And just to give a little status update about the state of development of NASSP, we have made a lot of progress in the last few months. At this point all major features that we want for the "infamous NASSP 7.0 release, many years after the last one" are implemented. A bunch of people are working on documentation right now and lots of tweaks and fixes will have to be done in the next few weeks/months/I hope not years, but it's heading in the right direction. NASSP can probably learn from SSU and slightly lower expectations for what a "release" has to be able to do.
 

Andy44

owner: Oil Creek Astronautix
Addon Developer
Joined
Nov 22, 2007
Messages
7,620
Reaction score
7
Points
113
Location
In the Mid-Atlantic states
Basically you'd have to write an emulator of the hardware used to run the code on... That would be quite a project, but there are people here that might be crazy enough to attempt it.

Or you could build an actual AGC clone out of mail-order electronic parts.

Somewhere around here I saw a video where some guys built a clone of an early processor chip out of discrete transistors on a hand-soldered circuit board. Because of its size the clock speed was slower but it works.

I've not seen a schematic for the AGC but if you're ambitious enough, anything's possible.

Of course, once you've built a working bench model of the AGC, you now have to build emulations of the subsystems it's supposed to interface with.

And then you install it all in your sim pit.

And then you simulate the sun, earth, and stars with moving lamps on the outside of the sim pit for your emulated sensors to interact with, and the lamps have to be controlled by the sim software...endless fun! :tiphat:
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,616
Reaction score
2,337
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Basically you'd have to write an emulator of the hardware used to run the code on... That would be quite a project, but there are people here that might be crazy enough to attempt it.

Or use LLVM to JIT it.
 

Matias Saibene

Development hell
Joined
Jul 7, 2012
Messages
1,055
Reaction score
642
Points
128
Location
Monte Hermoso - Argentina
Website
de-todo-un-poco-computacion-e-ideas.blogspot.com.ar
https://github.com/chrislgarry/Apollo-11/

Do you think Orbiter devs could use this for addons?

Burkey reconstructed the unreadable parts, he said, using his engineering skills to fill in the blanks...

“Quite a bit later, I managed to get some replacement scans from Gary Neff for the unreadable parts and fortunately found out that the parts I filled in were 100% correct!” he said.

100% seriously?

And there they go, ladies and gentlemen, 20 years of research and Internet crowfunding:cheers::
9vz4jN.gif
 

Ravenous

Donator
Donator
Joined
Jul 19, 2013
Messages
275
Reaction score
0
Points
0
Location
sitting at the pointy end
Apparently someone with no knowledge at all about aerospace has already been on there and tried correcting the obvious spelling mistake of "Attitude" to "Altitude".

Kids these days... :)

(Oh, and at last I've got around to looking through the now famous program "BURN_BABY_BURN--MASTER_IGNITION_ROUTINE.s")
 
Last edited:

Col_Klonk

Member
Joined
Aug 29, 2015
Messages
470
Reaction score
0
Points
16
Location
This here small Dot
Looks similar to PIC (Atmel.. small cpu) assembler code - that's if it was used that is.
Somebody will take the time to go through it and come up with a 'known revelation'
;)
 

Ravenous

Donator
Donator
Joined
Jul 19, 2013
Messages
275
Reaction score
0
Points
0
Location
sitting at the pointy end
Looks similar to PIC (Atmel.. small cpu) assembler code - that's if it was used that is.
Somebody will take the time to go through it and come up with a 'known revelation'
;)

Well straight away I looked and there's the 1201 and 1202 alarms in there. (though I can't tell what's actually happening at that point.)

A brief look through was interesting - we programmers have it easy these days!
 

Capt_hensley

Captain, USS Pabilli
Donator
Joined
Oct 20, 2010
Messages
841
Reaction score
0
Points
16
Location
Alamogordo
Website
www.h-10-k.com
If you're serious about simulating the parts of the craft, use load banks and servo's with micro-switches as sensors. This was done many times within the aerospace community when hardware was too expensive or inconvenient to build. For this stuff it's no longer rocket science, it's pseudoscience.

Many of the specifications can be found in the published engineering drawings, from o-scope readings, to simple feedback loops. It's all about flow and resistance. Even strain gauges, and accelerometers are cheap and easy to get.

But I'm no rocket scientist, nor engineer.
 

indy91

Addon Developer
Addon Developer
Joined
Oct 26, 2011
Messages
1,226
Reaction score
592
Points
128
There is a tutorial for building a Block 1 AGC: http://klabs.org/history/build_agc/ Good luck with that. :lol:

My personal (guess why) favourite Apollo hardware building project though is a DSKY, that directly connects with the Virtual AGC in NASSP:

Obviously it runs the emulator and not actual AGC hardware, but still pretty nice.
 

indy91

Addon Developer
Addon Developer
Joined
Oct 26, 2011
Messages
1,226
Reaction score
592
Points
128
Is the guy who made that a poster here? I'd be very interested in learning how he did that.

Not sure if he is here. It's Hitman57 on the French Orbiter forum (http://orbiter.dansteph.com/forum) and Hitman458 on the Meadville Space Center forum.

I know he had to change some things in NASSP, because this isn't natively supported. Mostly he had to revert some changes about the Virtual AGC implementation. Maybe the relevant thread is helpful to you: http://www.ibiblio.org/mscorbit/mscforum/index.php?topic=2889
 
Top