Skip to navigation

Generating system names

Producing system names from twisted seeds and two-letter tokens

There are 256 systems in each of the eight galaxies in Elite, and each of those 2000 systems has a unique name, as shown in the system charts like this one from the start of the game:

The Short-range Chart in the BBC Micro cassette version of Elite

System names aren't stored as text, as there simply isn't enough memory in the BBC Micro. Instead they are generated from the three 16-bit seeds for that system. In the case of the selected system, those seeds live at QQ15. The process of printing the system name, which is done by the cpl routine, works as follows, where s0, s1, s2 are the seeds for the system in question:

  1. Check bit 6 of s0_lo. If it is set then we will generate four two-letter pairs for the name (8 characters in total), otherwise we will generate three pairs (6 characters).
  2. Generate the first two letters by taking bits 0-4 of s2_hi. If this is zero, jump to the next step, otherwise we have a number in the range 1-31. Add 128 to get a number in the range 129-159, and convert this to a two-letter token (see variable QQ16 for the list of two-letter tokens).
  3. Twist the seeds by calling TT54 and repeat the previous step, until we have processed three or four pairs, depending on step 1.

One final note. As the process above involves twisting the seeds three or four times, they will be changed, so we also need to back up the original seeds before starting the above process, and restore them afterwards.