This repository contains the fully documented source code for Elite on the Nintendo Entertainment System (NES), including every single line of code with explanations. It is a companion to the bbcelite.com website. The source code allows you to build the fully functioning game from scratch, and two variants are supported: the NTSC version from Ian Bell’s personal website and the Imagineer PAL release. The repository is provided on an educational and non-profit basis in order to help people appreciate the iconic game of the 8-bit era. The code is copyright and any misunderstandings or mistakes in the documentation are the fault of the author, Mark Moxon.
https://github.com/markmoxon/nes-elite-beebasm