Files
ioccc/2006/grothe
Landon Curt Noll 11dfe51c6c move IOCCC Quick Start Guide
Created `quick-start.md` to hold the FAQ 0.0 content.

Used `sgit(1)` to change:

* faq.html#enter ==> quick-start.html#enter
* faq.html#enter_questions ==> quick-start.html#enter_questions
* faq.html#step_0 ==> quick-start.html#step_0
* faq.html#step_1 ==> quick-start.html#step_1
* faq.html#step_2 ==> quick-start.html#step_2
* faq.html#register ==> quick-start.html#register
* faq.html#step_3 ==> quick-start.html#step_3
* faq.html#step_4 ==> quick-start.html#step_4
* faq.html#step_5 ==> quick-start.html#step_5
* faq.html#step_6 ==> quick-start.html#step_6
* faq.html#step_7 ==> quick-start.html#step_7
* faq.html#step_submit ==> quick-start.html#step_submit

Via:

```sh
sgit -e 's/faq\.html#enter/quick-start.html#enter/g' '*.md' '*.hdr' 'inc/*.html'
sgit -e 's/faq\.html#enter_questions/quick-start.html#enter_questions/g' '*.md' '*.hdr' 'inc/*.html'
sgit -e 's/faq\.html#step_0/quick-start.html#step_0/g' '*.md' '*.hdr' 'inc/*.html'
sgit -e 's/faq\.html#step_1/quick-start.html#step_1/g' '*.md' '*.hdr' 'inc/*.html'
sgit -e 's/faq\.html#step_2/quick-start.html#step_2/g' '*.md' '*.hdr' 'inc/*.html'
sgit -e 's/faq\.html#register/quick-start.html#register/g' '*.md' '*.hdr' 'inc/*.html'
sgit -e 's/faq\.html#step_3/quick-start.html#step_3/g' '*.md' '*.hdr' 'inc/*.html'
sgit -e 's/faq\.html#step_4/quick-start.html#step_4/g' '*.md' '*.hdr' 'inc/*.html'
sgit -e 's/faq\.html#step_5/quick-start.html#step_5/g' '*.md' '*.hdr' 'inc/*.html'
sgit -e 's/faq\.html#step_6/quick-start.html#step_6/g' '*.md' '*.hdr' 'inc/*.html'
sgit -e 's/faq\.html#step_7/quick-start.html#step_7/g' '*.md' '*.hdr' 'inc/*.html'
sgit -e 's/faq\.html#step_submit/quick-start.html#step_submit/g' '*.md' '*.hdr' 'inc/*.html'
```

The former FAQ 0.0 section in `faq.html` now just refers to `quick-start.html`.

Modified menu and non-JS menu so that "Enter the IOCCC" refers to `quick-start.html`.

Changed `bin/gen-top-html.sh` VERSION from "1.4.10 2024-11-23"
to "1.4.11 2025-01-09".

Performed `make www` on macOS to complete the above.
2025-01-09 23:11:43 -08:00
..
2020-12-30 16:57:03 -08:00
2020-12-30 16:57:03 -08:00
2023-07-06 21:49:38 -07:00
2025-01-09 23:11:43 -08:00
2024-07-02 14:53:48 -07:00
2020-12-30 16:57:03 -08:00
2020-12-30 16:57:03 -08:00

To build:

    make

NOTE: this entry requires the X11/Xlib.h header file and the X11 library to compile. For more information see the FAQ on "X11".

To use:

    ./grothe carrier_freq pixelclock horizontal_total < some_input.txt

Try:

Put on your "electronic ears" and then try:

    ./try.sh

You may find using a tunable scanning electronic ear helps.

Judges' remarks:

Most of the time, interference is annoying. This entry is the exception that proves the rule. What is a bug to some is a feature to this entry. :-)

Author's remarks:

The program draws patterns on the screen that can be picked up by a shortwave radio. It emulates the frequencies for an old fashion touch tone phone, so old songs can be played by hitting 0-9,#, and *.

To be able to run the program you need to determine the following parameters:

  • carrier_freq

    • base frequency used to host music
  • pixelclock

    • refresh rate of the monitor
  • horizontal_total

    • total scan along the horizontal axis

If you have xvidtune installed you can get the pixelclock and horizontal_total with the following command

    xvidtune -show | head -n 1 | awk '{ print "pixelclock " $2 * 1000000 " horizontal_total = " $6 }'

Example from my laptops:

    ./grothe 65000000 10000000 1344 < twinkle.txt

Even if the user gets a setting off, the sound will usually be able to be heard on AM at a multiple of the original frequency.

The core idea of using a machine to play music on AM radio goes all the way back to the Altair computers and Timex Sinclair ZX-81s.

Several example songs

Olympics Fanfare - from antang@phakt.usc.edu - Tony:

    4-9-91231,2222-321123123-9-91231,2222-32112321

Twinkle Twinkle Little Star - from fsufunkyb@aol.com - Ben Schmidt:

    1199##9-6633221-9966332-9966332-1199#9-6633221-

Generic Arabian Tune - from rdippold@qualcomm.com - Ron "Asbestos" Dippold:

    453,54,4569564459,9#95458,8987453 54

Others can be found by doing a search for "touch tone phone songs".

Obfuscations

  • Some numbers expressed in Octal, some in hex and some in decimal:

"A foolish consistency is the hobgoblin of little minds." - Ralph Waldo Emerson.

  • Funky scoping, looking at the nanosleep section and XsetWindowAttributes declares local variables.
  • Algorithm is very weird, uses y dimension to draw carrier frequency and x dimension to draw audio frequency, based on Erik Thiele's Tempest for Eliza.
  • lack of #defines confuses many people :-)
  • figuring out your pixelclock and horizontal_total and which carrier_freq to use can be an exercise in obfuscation for the user.
  • use of commas in various places, confuses most C code beautifiers sometimes making the beautified code harder to read
  • use of static to ensure initialization is EVIL and done in several places
  • uses static declarations & void function returns we don't care about making the code harder to read.
  • does sound using only X11 libs, no other libs required.
  • demonstrates tempest emissions in a fun/easy way.
  • follows good programming practices of actually setting exit codes and giving usage when run with incorrect parameters.

References

Tempest for Eliza - Basis for Algorithms.

Tempest AM - Another early program in this field. See here for a bit more information on the program (search for Tempest-AM Radio Signal Transmitter).

The paper Soft Tempest: Hidden Data Transmission Using Electromagnetic Emanations by Markus G. Kuhn's and Ross J. Anderson's.