Presented in the 256-byte game compo at Lovebyte 2021
The program runs in the background and reads hex values from screen memory to control individual bits of the TED sound registers in a 128-frame (2.56s) loop.
Each character column encodes 4 frames, corresponding to the 4 bits in the hex digit. The bits are sequenced from most significant to least significant, so for instance C means on for 2 frames then off for 2 frames, A means alternately on, off, on, off etc.
Each row corresponds to a single bit in a register. When multiple rows are grouped to define one value, the order is from the most significant to the least significant bit. The rows are assigned this way: - Row 1 (light blue): Voice 2 noise enabled. - Row 2 (blue): Voice 2 square wave enabled. - Row 3: (green): Voice 1 square wave enabled. - Rows 4-7 (grey): Volume. Range is from 0 to 8 (8 or above is max volume). - Rows 8-15 (blue): Voice 2 pitch most significant 8 bits (of 10). - Rows 16-23 (green): Voice 1 pitch most significant 8 bits (of 10).
Have fun!
Instructions
Green values: control sound register one (square wave only). Top line: enable/disable. Bottom 8 lines: frequency.
Blue values: control sound register two (square wave or noise). Top lines: enable/disable square wave, enable/disable noise. Bottom 8 lines: frequency.
Gray values: control volume.
Each character represents one bit. The frequency rows correspond to $200, $100, $80, $40, $20, $10, $08, $04 (the lowest two bits of the frequency cannot be programmed).
(Another way of looking at it: First 7 rows: $FF11. 8 Blue rows: $FF0F/$FF10. 8 Green rows: $FF0E/$FF12.)