{"id":19297239,"url":"https://github.com/siravan/moonjs","last_synced_at":"2026-02-15T08:09:32.371Z","repository":{"id":11594417,"uuid":"14085782","full_name":"siravan/moonjs","owner":"siravan","description":"A port of the Apollo Guidance Computer (AGC) simulator to javascript using the Emscripten compiler","archived":false,"fork":false,"pushed_at":"2013-11-08T03:41:40.000Z","size":332,"stargazers_count":60,"open_issues_count":1,"forks_count":11,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-22T08:43:42.046Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://svtsim.com/moonjs/agc.html","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/siravan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-03T13:27:54.000Z","updated_at":"2025-03-09T13:47:43.000Z","dependencies_parsed_at":"2022-08-07T06:16:26.259Z","dependency_job_id":null,"html_url":"https://github.com/siravan/moonjs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/siravan/moonjs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siravan%2Fmoonjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siravan%2Fmoonjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siravan%2Fmoonjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siravan%2Fmoonjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/siravan","download_url":"https://codeload.github.com/siravan/moonjs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siravan%2Fmoonjs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29473462,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T06:58:05.414Z","status":"ssl_error","status_checked_at":"2026-02-15T06:58:05.085Z","response_time":118,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T23:01:49.013Z","updated_at":"2026-02-15T08:09:32.341Z","avatar_url":"https://github.com/siravan.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"Moonjs\n======\n\nMoonjs (http://svtsim.com/moonjs/agc.html) is an online Apollo Guidance\n Computer (AGC) simulator. It is a port of the Virtual AGC \n(http://www.ibiblio.org/apollo/) by Ronald Burkey from C to javascript \nasm.js using the Emscripten compiler \n(https://github.com/kripken/emscripten/wiki). \n\nAGC was the main computer system of the Apollo program that successfully\n landed 12 astronauts on Moon. There was one AGC on each of the Apollo \nCommand Modules and another one on each Lunar Module. There was also a \nsecond backup computer system called Abort Guidance System (AGS) on the \nLunar Modules, which is simulated by Virtual AGC, but not the current \nversion of Moonjs. \n\nAstronauts interacted with AGC by using DSKY, a combination of 7-segment \nnumerical displays, indicator lights and a simple keypad, which is \nsimulated on this page. The simulated DSKY communicates with a simulated \nAGC, which in turn runs a copy of Colossus 249, the flight software \nthat flew on the Apollo 9 Command Module. \n\nWhy Javascript?\n===============\n\nRecent advances in the javascript language - such as optimized engines, \nahead-of-time (AOT) compilation, and asm.js - make it possible to write \ncomputationally extensive applications in javascript. \n\nMy previous experience with online javascript-based simulation - \nsvtsim(svtsimcom/svtsim.html) and hemosim (svtsim.com/hemosim.html) - \nwas very positive and convinced me of the suitablity of the HTML5 and \njavascript combination in writing portable, easy-to-use simulators. \nMoonjs is the logical next step that uses Emscripten compiler \nto convert existing C code into asm.js, a highly-optimizable subset \nof javascript. \n\n\nCompiling\n=========\n\nTo build Moonjs, you need to have Emscripten and its requirements \n(including Clang C compiler, python 2.7 and node.js) installed on your \ncomputer. \n\nChange the including Makefile by setting EMCC to the directory of the \ninstalled Emscripten (default is /usr/local/emsripten). Compile the \nsource by \n\n    $ make\n\nDo not use '.configure'. If compilation succeeds, it will generate \n'agc.js' file which included the compiled asm.js and the required \nlibraries. It also generate 'agc.data', which is a copy of the corerope\n image (provided as Core.bin) packaged for loading using AJAX.\n\nRunning\n=======\n\nThe following files are needed to run Moonjs:\n\n    agc.html        the main html page and the javascript code simulating DSKY\n    agc.js          the compiled agc engine code\n    agc.data        a copy of the Core.bin which is loaded by agc.js \n                    during initialization\n    digital-7-mono-italic.ttf       font file for seven-segment displays\n    Apollo_DSKY_interface.svg.png   static graphic showing the DSKY interface \n                                    (public domain image from NASA)\n\n\nAlso if you are testing the software from local disk, Chrome security prevents \nloading agc.data using AJAX over the local file system. If you are using Chrome, \nyou need to run a static web server. For example, run the following command \nin the Moonjs directory:\n\n    $ python -m SimpleHTTPServer 8000\n\nand run Moonjs by pointing the browser to http://localhost:8000/agc.html.\n\n\n    \n    \n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiravan%2Fmoonjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsiravan%2Fmoonjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiravan%2Fmoonjs/lists"}