Skip to navigation

Aviator on the BBC Micro

Building Aviator from the source

If you would like to build a fully working version of Aviator on a modern computer, from the exact same source code as on this site, then you will find everything you need in the accompanying GitHub repository, including full instructions. Here we take a look at how the source files are structured and how the build process works.

The Aviator build pipeline
--------------------------

The modern build process uses a multi-stage pipeline, using the BeebAsm assembler and Python.

There are five main folders in each repository, which reflect the progress of the build process (the links will take you to the relevant folders on GitHub):

  • 1-source-files contains all the different source files, such as the main assembler source files, image binaries, boot files and so on.
  • 2-build-files contains build-related scripts, such as the crc32 verification script.
  • 3-assembled-output contains the output from the assembly process, when the source files are assembled and the results processed by the build files.
  • 4-reference-binaries contains the correct binaries for the released game, so we can verify that our assembled output matches the reference.
  • 5-compiled-game-discs contains the final output of the build process: an SSD disc image that contains the compiled game and which can be run on real hardware or in an emulator.

These folders are used in the multi-stage build process in the following manner: the 1-source-files are assembled, then checksummed by the 2-build-files to create the 3-assembled-output, which is optionally verified against the 4-reference-binaries before being compiled into the final 5-compiled-game-discs.

This build process is configured via the project's Makefile. The specific build steps are as follows (the links will take you to the relevant source files on GitHub):

  1. Assemble the main game with aviator-source.asm
  2. Verify the assembled output with crc32.py
  3. Assemble a bootable disc image with aviator-disc.asm

Let's take a look at each of the pipeline stages in more detail.

1. Assemble the main game with aviator-source.asm
-------------------------------------------------

BeebAsm loads aviator-source.asm and creates the following file:

  • AVIA.bin

aviator-source.asm contains the main source code for Aviator.

2. Verify the assembled output with crc32.py
--------------------------------------------

By default the crc32.py script is run on the results, which compares the assembled output with the binaries from the original build process. This enables us to confirm that our output is correct.

The verification output for the bbcmicro.co.uk version is as follows:

  [--originals--]  [---output----]
  Checksum   Size  Checksum   Size  Match  Filename
  -----------------------------------------------------------
  f263f756  19785  f263f756  19785   Yes   AVIA.bin

In this case the assembled binary matches the original binary, so our build process has worked.

3. Assemble a bootable disc image with aviator-disc.asm
-------------------------------------------------------

Finally, BeebAsm loads aviator-disc.asm, which reads the following files:

  • boot-files/$.!BOOT.bin
  • basic-programs/$.AVIA.bin
  • basic-programs/$.AVIA1.bin
  • basic-programs/$.AVIATOR.bin
  • images/$.DASHBD.bin
  • AVIA.bin

and creates the following:

  • aviator-bbcmicro-co-uk.ssd

This script builds the final disc image, to match the released version of the game. Note that the name of the disc image depends on the release that's being built - the name shown above is the default build, which builds the version from the BBC Micro Games Archive at bbcmicro.co.uk.

The disc image can be loaded into an emulator, or into a real BBC Micro using a device like a Gotek.