Helicopter 1 Sound Example

This file is part of Byte Power September 1986. Download the collection to get this file.
Developer(s): Kristian Boisvert
Date: 1986
Type: Program
Platform(s): TS 2068
Tags: Sound

This program produces a sound effect using the TS2068’s built-in SOUND command, intended to simulate a helicopter. The SOUND statement at line 10 configures multiple registers of the AY-3-8910 sound chip in a single statement, setting tone periods, noise periods, mixer, amplitude, and envelope parameters across registers 0–13. A short PAUSE 3 (approximately 0.18 seconds at 50 Hz) follows before the program loops indefinitely via GO TO 1, which uses VAL-less direct line referencing to a non-existent line, effectively halting or restarting. The REM at line 0 contains the program title, author attribution (K. Boisvert), and copyright notice for Byte Power (1986).


Program Structure

The program consists of just three executable lines plus a header REM:

  1. 0 REM — Title, author, and copyright banner stored in the REM payload.
  2. 10 SOUND — Configures the AY-3-8910 chip with a multi-register SOUND statement.
  3. 20 PAUSE 3 — Introduces a brief delay (~0.18 s at 50 Hz) between sound restarts.
  4. 30 GO TO 1 — Loops back; line 1 does not exist, so the interpreter finds line 10 as the next available line, restarting the sound effect continuously.

AY-3-8910 Register Usage

The SOUND keyword writes directly to named AY chip registers in register,value pairs separated by semicolons. The registers programmed are:

RegisterValueFunction
0254Channel A tone period (low byte) — very low frequency
17Channel A tone period (high byte)
2255Channel B tone period (low byte)
37Channel B tone period (high byte)
4255Channel C tone period (low byte)
57Channel C tone period (high byte)
916Channel B amplitude — envelope mode enabled (bit 4 set)
1016Channel C amplitude — envelope mode enabled
816Channel A amplitude — envelope mode enabled
756Mixer: %00111000 — all tone channels enabled, noise disabled
122Envelope period (low byte) — fast envelope cycle
130Envelope shape — single decay (sawtooth down)

All three tone channels are set to nearly identical, very low frequencies (period ≈ 0x07FE–0x07FF), producing a deep drone. Envelope mode on all amplitude registers (value 16, bit 4 set) ties each channel’s volume to the shared envelope generator. The short envelope period (register 12 = 2) and shape 0 create a rapid amplitude decay that repeats as the loop restarts, mimicking the periodic thwop of rotor blades.

Notable Techniques

  • Multi-register SOUND in one statement: All 12 register writes are chained in a single SOUND keyword call, which is more efficient than separate calls and ensures near-simultaneous register updates.
  • GO TO non-existent line: GO TO 1 targets line 1, which does not exist. The TS2068 BASIC interpreter responds by jumping to the next line numerically above 1, which is line 10. This is a common size-saving trick.
  • Envelope shape 0 behaviour: Writing to register 13 resets the envelope generator, meaning each pass through the loop re-triggers the envelope attack/decay from the beginning, reinforcing the rhythmic chopping sound.
  • PAUSE 3: At 50 Hz, PAUSE 3 waits approximately 60 ms, controlling the repetition rate of the envelope re-trigger and shaping the perceived rotor tempo.

Appears On

Tape-based magazine.

Related Articles

This month we will talk about the envelope generator. To enable the generator you must put the value 16 to...

Source Code

   0 REM                                                            HELICO                          WRITTEN BY K. BOISVERT          ©1986 BYTE POWER                     
   10 SOUND 0,254;1,7;2,255;3,7;4,255;5,7;9,16;10,16;8,16;7,56;12,2;13,0
   20 PAUSE 3
   30 GO TO 1

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.