SkillAgentSearch skills...

Virtualagc

Virtual Apollo Guidance Computer (AGC) software

Install / Use

/learn @virtualagc/Virtualagc
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Virtual Apollo Guidance Computer

<!--- Apparently, Travis CI no longer has a build tier that's free for open source, so I'm removing the build-status display for it. ### Build status | Travis CI (Linux) | |--------------------------| | [![travis-image][]][travis-site] | [travis-image]: https://travis-ci.org/virtualagc/virtualagc.svg?branch=master [travis-site]: https://travis-ci.org/virtualagc/virtualagc/branches -->

The Apollo spacecraft used for lunar missions in the late 1960's and early 1970's was really two different spacecraft, the Command Module (CM) and the Lunar Module (LM). The CM was used to get the three astronauts to the moon, and back again. The LM was used to land two of the astronauts on the moon while the third astronaut remained in the CM, in orbit around the moon.

Each of the spacecraft needed to be able to navigate through space, with or without the assistance of the astronauts, and therefore needed to have a "guidance system". The guidance system was developed by MIT's Instrumentation Lab, now an independent company known as the Charles Stark Draper Laboratory.

An important part of the guidance system was the Apollo Guidance Computer—or just "AGC" for short. On any given Apollo mission, there were two AGCs, one for the Command Module, and one for the Lunar Module. The two AGCs were identical and interchangeable, but they ran different software because the tasks the spacecraft had to perform were different. Moreover, the software run by the AGC evolved over time, so that the AGC software used in later missions like Apollo 17 differed somewhat from that of earlier missions like Apollo 8.

Considered just as a computer, the AGC was severely underpowered by modern standards.

Other Repository Branches

Since you are looking at this README file, you are in the "master" branch of the repository, which contains source-code transcriptions of the original Project Apollo software for the Apollo Guidance Computer (AGC) and Abort Guidance System (AGS), as well as our software for emulating the AGC, AGS, and some of their peripheral devices (such as the display-keyboard unit, or DSKY).

Other branches of the repository often contain very different files. Here are some of the more-significant branches which differ in that way from the master branch:

  • gh-pages: HTML files and imagery for the main Virtual AGC Project website. Contains the complete website, exclusive of the large library of scanned supplementary documentation and drawings.
  • mechanical: 2D CAD files and 3D models in DXF and STEP formats, intended to replicate the original AGC/DSKY mechanical design.
  • scenarios: Pad loads or other setup for mission scenarios.
  • schematics: CAD transcriptions in KiCad format of the original AGC/DSKY electrical design.
  • wiki: Wiki files associated with the repository.

AGC Specifications

  • 2048 words of RAM. A "word" was 15 bits of data—therefore just under 2 bytes (16 bits) of data—and so the total RAM was just 3840 bytes.
  • 36,864 words of read-only memory, equivalent to 69,120 bytes.
  • Maximum of about 85,000 CPU instructions executed per second.
  • Dimensions: 24.250"×12.433"×5.974" (61.595cm×31.580cm×15.174cm).
  • Weight: 70.1 pounds (31.8kg).
  • Power supply: 2.5A of current at 28V DC
  • Real DSKY.

It is occasionally quipped—with perhaps greater wit than insight—that the AGC was more like a calculator than a computer. But to say this is to grossly underestimate the AGC's sophistication. For example, the AGC was multi-tasking, so that it could seemingly run multiple programs simultaneously.

Another important part of the guidance system was the Display/Keyboard unit—or just "DSKY" for short. The AGC by itself was simply a box with electrical connections, without any built-in way for the astronaut to access it. The DSKY provided the astronaut with an interface by which to access the AGC.

The Lunar Module had a single DSKY, positioned between the two astronauts where it could be operated by either of them. The Command Module actually had two DSKYs. One of the CM's DSKYs was only the main control panel, while the other was positioned near the optical equipment used to mark the positions of stars or other landmarks.

DSKY Specifications

  • Dimensions: 8.124"×8.000×6.91" (21.635cm×20.320cm×17.551cm)
  • Weight: 17.8 pounds (8.1kg)

Perhaps the most important part of the guidance system was the Inertial Measurement Unit—or just "IMU" for short. The IMU continuously kept track of the acceleration and rotation of the spacecraft, and reported this information back to the AGC. By mathematically processing this data, the AGC could know on a moment-by-moment basis the orientation and position of the spacecraft.

What this project is for

This repository is associated with the website of the Virtual AGC project, which provides a virtual machine which simulates the AGC, the DSKY, and some other portions of the guidance system. In other words, if the virtual machine—which we call yaAGC—is given the same software which was originally run by the real AGCs, and is fed the same input signals encountered by the real AGCs during Apollo missions, then it will respond in the same way as the real AGCs did.

The Virtual AGC software is open source code so that it can be studied or modified. The repository contains the actual assembly-language source code for the AGC, for as many missions as we've been able to acquire, along with software for processing that AGC code. Principal tools are an assembler (to create executable code from the source code) and a CPU simulator (to run the executable code), as well as simulated peripherals (such as the DSKY). Similar source code and tools are provided for the very-different abort computer that resided in the Lunar Module. Finally, any supplemental software material we have been able to find or create for the Saturn rocket's Launch Vehicle Digital Computer or for the Gemini on-board computer (OBC) are provided, though these materials are minimal at present.

Virtual AGC is a computer model of the AGC. It does not try to mimic the superficial behavioral characteristics of the AGC, but rather to model the AGC's inner workings. The result is a computer model of the AGC which is itself capable of executing the original Apollo software on (for example) a desktop PC. In computer terms, Virtual AGC is an emulator. Virtual AGC also provides an emulated Abort Guidance System (AGS) and (in the planning stages) an emulated LVDC. Virtual AGC is a catch-all term that comprises all of these.

The current version of the Virtual AGC software has been designed to work in Linux, in Windows XP/Vista/7, and in Mac OS X 10.3 or later (but 10.5 or later is best). It also works in at least some versions of FreeBSD. However, since I personally work in Linux, I have the most confidence in the Linux version.

You can read about this project in more detail here: http://www.ibiblio.org/apollo/index.html

What this project is not for

Virtual AGC is not a flight simulator, nor a lunar-lander simulator, nor even a behavioral simulation of the Apollo Lunar Module (LM) or Command-Module (CM) control panels. (In other words, if you expect a realistic LM control panel to suddenly appear on your computer screen, you'll be disappointed.) Virtual AGC could be used, however, as a component of such a simulation, and developers of such software are encouraged to do so. Indeed, some developers already have! See the FAQ for more information: http://www.ibiblio.org/apollo/faq.html

Requirements

Caution: The requirements in this README may not be fully up-to-date vs the official ones listed on the Virtual AGC website. You are advised to consult the website.

  • Tcl/Tk is required for all platforms.

Linux

  • Requires Fedora Core 4 or later.
  • Requires Ubuntu 7.04 or later.
  • Requires SuSE 10.1 or later.
  • Known to work on Raspbian (Raspberry Pi) 2016-05-27.
  • et, presumably, cetera.
  • 32 and 64-bit systems have been tested successfully.
  • The X-Window system, xterm, and gtk+ libraries must be installed.
  • You will need the normal gcc C/C++ compiler toolchain, as well as developer packages ("dev" or "devel") for wxWidgets, ncurses and SDL.

On Fedora 22 or later you may encounter that the wxWidgets doesn't have the wx-config but the wx-config-3.0 utility as well as the wxrc-3.0 versus wxrc. Just create a symbolic link for wx-config and wxrc respectively

Windows

  • Requires XP or later. 32-bit systems have been tested successfully.
  • Vista and Windows 7 may need workarounds. For example, on the Windows platform it is expected that the Tcl/Tk installation program will create a file called wish.exe but on Windows Vista the installation program creates a file called wish85.exe. This prevents certain features of Virtual AGC from working. The workaround is to duplicate the file c:\tcl\bin\wish85.exe and call the duplicate c:\tcl\bin\wish.exe.
  • Windows 98 or prior are known not to work. Windows 2000 has not been tested.
  • You will need the MinGW compiler with the options selected - if offered - of including g++
View on GitHub
GitHub Stars2.9k
CategoryDevelopment
Updated1h ago
Forks363

Languages

Assembly

Security Score

80/100

Audited on Apr 1, 2026

No findings