Writing a lunar lander game for an actual lunar lander

  • Wow. Seriously impressive -- both to see the limitations that smart people worked within while taking mankind off this rock, but also hats off to some excellent nerdery.

    >"Division. Arrgh. The AGC does have hardware division (and multiplication), but itโ€™s strictly limited to only being able to compute x/y when |x|>|y|. Anything else, you get garbage, including in the y=x case. This hit me several times and trying to deal with all the sign issues, combined with the 1s-complement sign issues above, was really painful."

    Not being expert in slightly outdated processor architectures (1s compliment!), might someone more expert than I be able to tell me _why_ this is the case and was a good design decision? It seems like a potential way for unexpected sensor data to bite you in the arse...

  • Hello, author here.

    It's a surprisingly modern-ish system, in many ways, and surprisingly weird in lots of other ways. One thing which really surprised me was a complete lack of pointer support: I managed to bodge the look-up-table instruction (which evaluates its argument and adds the result to the next instruction to be executed) to do pointer dereferences instead (INDEX ptr; TC 0). And, luckily, I found a way to make the assembler emit an address as a literal value, which it really didn't want to do.

    It's a shame the address space is so small (only 12 bits!) or you could totally port real software to this...

  • Hm - I keep getting a 1202 program alert when hovering near the surface.

  • I think that's the longest non-loop Youtube video I've ever seen.

  • I thought about this myself and it's really cool to see someone follow through on such a whimsical project. One consideration is that the is already a great lunar lander game for this system!

  • Does anyone know of any FPGA implementation?