--- title: "Graphic" id: 59140 type: "computer_media" slug: "graphic" url: "http://localhost/computer_media/graphic/" markdown_url: "http://localhost/computer_media/graphic.md" published_at: "2025-02-27T13:23:07+00:00" modified_at: "2026-03-30T21:42:53+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2025/02/graphic-2.png" excerpt: "A hypnotic screen-filling geometric pattern built from overlapping diagonal lines, combined with AY sound chip initialization, loops endlessly to create a shifting interference display." category: - name: "Archived Media" slug: "archived-media" taxonomy: "category" url: "http://localhost/category/archived-media/" post_tag: - name: "Byte Power" slug: "byte-power" taxonomy: "post_tag" url: "http://localhost/tag/byte-power/" - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "TS 2068" slug: "ts2068" taxonomy: "post_tag" url: "http://localhost/tag/ts2068/" model: - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" indiv: - name: "Eric Boisvert" slug: "boisvert-eric" taxonomy: "indiv" url: "http://localhost/indiv/boisvert-eric/" - name: "Kristian Boisvert" slug: "boisvert-kristian" taxonomy: "indiv" url: "http://localhost/indiv/boisvert-kristian/" genre: - name: "Demo" slug: "demo" taxonomy: "genre" url: "http://localhost/type/demo/" - name: "Graphics" slug: "graphics" taxonomy: "genre" url: "http://localhost/type/graphics/" media_contents: - id: 50603 title: "Byte Power August 1986" type: "computer_media" url: "http://localhost/computer_media/byte-power-august-1986/" media_type: "Program" programmers: - name: "Eric Boisvert" slug: "boisvert-eric" taxonomy: "indiv" url: "http://localhost/indiv/boisvert-eric/" - name: "Kristian Boisvert" slug: "boisvert-kristian" taxonomy: "indiv" url: "http://localhost/indiv/boisvert-kristian/" download_url: "https://archive.org/download/timex-sinclair-software-archive/Graphic%20%281986%29%28Byte%20Power%20Aug%201986%29%28TS2068%29%28CA%29%28Program%29.zip" mediadate: "1986" producer_company: - id: 25181 title: "Byte Power" type: "company" url: "http://localhost/company/byte-power/" images: - url: "http://localhost/wp-content/uploads/2025/02/graphic-2.png" - url: "http://localhost/wp-content/uploads/2025/02/graphic-3.png" - url: "http://localhost/wp-content/uploads/2025/02/graphic-1.png" media_type_tags: "Demo, Graphics" --- This program draws a continuously animating geometric pattern on screen using overlapping diagonal line plots. It uses the SOUND command to initialize the AY sound chip with a specific register configuration before entering the drawing routines. Lines 14 through 19 repeatedly PLOT a starting point and issue pairs of DRAW commands with equal-and-opposite slopes (63,175 and 62,-175), creating a dense web of crossing diagonal lines across the screen. The FOR loop ranges vary across lines, causing the pattern to grow and shift with each iteration before looping back via GO TO 15. The OVER 1 attribute causes lines to XOR with existing pixels, producing a moire-like interference effect as lines are redrawn. *** ## Program Analysis ### Program Structure The program is divided into two functional phases: a one-time initialization block (lines 0–10) and a continuous drawing loop (lines 14–20). After setup, execution cycles between lines 15 and 20 indefinitely via `GO TO 15`, with line 14 only executing on the first pass. 1. **Line 0:** REM block containing copyright and author attribution. 2. **Line 10:** Screen clear, OVER 1 mode activation, and AY sound chip register setup. 3. **Lines 14–19:** Six FOR loops each drawing overlapping diagonal line pairs. 4. **Line 20:**`GO TO 15` — returns to line 15, skipping line 14 on all subsequent iterations. ### SOUND Chip Initialization Line 10 uses the `SOUND` command to configure the AY-3-8912 sound chip registers directly. The parameters set register pairs for tone periods, noise, mixer, and amplitude: | Register | Value | Function | | --- | --- | --- | | 0 | 254 | Channel A tone period (low byte) | | 1 | 5 | Channel A tone period (high byte) | | 2 | 255 | Channel B tone period (low byte) | | 3 | 5 | Channel B tone period (high byte) | | 4 | 253 | Channel C tone period (low byte) | | 5 | 5 | Channel C tone period (high byte) | | 7 | 56 | Mixer control (tones/noise enables) | | 8 | 15 | Channel A amplitude | | 9 | 15 | Channel B amplitude | | 10 | 15 | Channel C amplitude | Mixer register 7 = 56 (binary 00111000) enables noise on all three channels and disables tone output, with all amplitudes set to maximum fixed level (15). This produces a sustained noise burst on program start. ### Drawing Technique Each FOR loop in lines 14–19 iterates over a range of X coordinates at either `y=0` or `y=175`. From each plotted point, two `DRAW` commands are issued: `DRAW 63,175` followed by `DRAW 62,-175`. This traces a tall, narrow zigzag from the starting point, producing dense crossing diagonals across the 256×176 pixel screen area. The loop ranges differ between lines, creating varying densities of coverage: | Line | X range | Start Y | Iterations | | --- | --- | --- | --- | | 14 | 38–92 | 0 | 55 | | 15 | 38–92 | 175 | 55 | | 16 | 43–87 | 0 | 45 | | 17 | 28–102 | 175 | 75 | | 18 | 28–102 | 175 | 75 | | 19 | 28–62 | 175 | 35 | ### OVER 1 and XOR Effect `OVER 1`, set once in line 10, causes all subsequent PLOT and DRAW operations to XOR pixels with the existing screen content rather than overwriting them. As lines are redrawn across multiple loop iterations, pixels that are plotted an even number of times cancel out, creating a dynamic, shifting moire interference pattern characteristic of this technique. ### Loop Design and Line 14 Anomaly Because `GO TO 15` is used at line 20, line 14 executes only once — on initial program run. Lines 17 and 18 are identical in both X range and starting Y coordinate, meaning that pass effectively doubles the stroke density for that particular range on every cycle through the main loop. It is unclear whether this is intentional for visual effect or an authoring oversight. ### Notable Techniques - Using `OVER 1` globally to achieve XOR pixel toggling without per-line mode switching. - Deliberately excluding line 14 from the infinite loop to create an asymmetric first frame. - Drawing lines whose combined horizontal span (63+62=125 pixels) is close to half the screen width, producing a structured rather than random web. - AY chip configured for noise-only output at startup with no subsequent SOUND commands, leaving the noise running continuously under the animation. ## Source Code ``` 0 REM ©1986 BYTE POWER WRITTEN BY E & K BOISVERT 10 CLS : OVER 1: SOUND 0,254;1,5;2,255;3,5;4,253;5,5;7,56;8,15;9,15;10,15 14 FOR x=38 TO 92: PLOT x,0: DRAW 63,175: DRAW 62,-175: NEXT x 15 FOR x=38 TO 92: PLOT x,175: DRAW 63,-175: DRAW 62,175: NEXT x 16 FOR x=43 TO 87: PLOT x,0: DRAW 63,175: DRAW 62,-175: NEXT x 17 FOR x=28 TO 102: PLOT x,175: DRAW 63,-175: DRAW 62,175: NEXT x 18 FOR x=28 TO 102: PLOT x,175: DRAW 63,-175: DRAW 62,175: NEXT x 19 FOR x=28 TO 62: PLOT x,175: DRAW 63,-175: DRAW 62,175: NEXT x 20 GO TO 15 ```