Tiny Sid Compo
An online competition for complete SID tunes — player and music — in 256 or 512 bytes, run by stefano-tognon (ice00) of sidin from 15 January to 8 May 2005, with the entries' sources printed and commented in SIDin #8 (512 bytes) and #9 (256 bytes); a second edition, Tiny Sid 2, added a 1 KB category and was running when #9 appeared on 2006-01-14 (sources: s-sidin08-tiny-sid-512b, s-sidin09-tiny-sid-256b). The entries are the wiki's best material on what a sid-player-routine can be reduced to.
Facts#
- Announcement: in the conclusion of SIDin #7's analysis of Ninja's 256-byte xxlarge (2005-01-09) — "from 15 January 2005 to 21 April 2005 instead of the 'SidWine compo'", categories 256 and 512 bytes, entries as runnable
.prgfiles (source: s-sidin07-xxlarge); the result page in #8 gives 8 May 2005 as the end (see below). - Rules and dates (2005): "Running from 15 January to 8 May 2005, the compo where only 256 and 512 bytes music were allowed"; results and a comment pack at
http://digilander.iol.it/ice00/tsid/tinysid(source: s-sidin08-tiny-sid-512b, quoting the issue's news page). Organiser: Tognon — the articles call 15BB and Random Ninja "my entry" (sources: s-sidin08-tiny-sid-512b, s-sidin09-tiny-sid-256b). - Tiny Sid 2 (2006): "You can now choose from a 256 bytes, 512 bytes and even 1KB" — announced in the #9 conclusion (source: s-sidin09-tiny-sid-256b); it concluded on 2006-04-21 — 256 bytes: Frantic BLOCK ACID DUB 96, Tognon XL5 94, Eric Odland Miniature Rhapsody 86, Jaymz Julian Back To Basics 55; 512 bytes: GRG Plaster 103, Tognon RM 92, Odland Resolution 64, Leif Bloomquist Mini Digi Drum 57 — and there was no third edition (#11: "I cannot grant to have all the time it could took me") (source: s-sidin-news-digest). Its entries are analysed in s-sidin10-tiny-sid-2-part-1, s-sidin11-tiny-sid-2-part-2 and s-sidin12-tiny-sid-2-part-3.
Results 2005#
| place | points | entry | author | bytes | summary |
|---|---|---|---|---|---|
| 1 | 206 | Empty | 4mat | 512 | s-sidin08-tiny-sid-512b |
| 2 | 171 | Twone Five | laxity | 512 | s-sidin08-tiny-sid-512b |
| 3 | 154 | 15BB | Stefano Tognon | 512 | s-sidin08-tiny-sid-512b |
| 4 | 118 | Crue Gurl | Jaymz Julian (A Life in Hell) | 512 | s-sidin08-tiny-sid-512b |
| 1= | 186 | My Block .. one block | Agemixer | 256 | s-sidin09-tiny-sid-256b |
| 1= | 186 | New Kid on the block | Frantic (Hack'n'Trade) | 256 | s-sidin09-tiny-sid-256b |
| 3 | 152 | Repeat me | laxity | 256 | s-sidin09-tiny-sid-256b |
| 4 | 151 | Electronic | aleksi-eeben | 256 | s-sidin09-tiny-sid-256b |
| 5 | 145 | Splatform256 | Steve Judd | 256 | s-sidin09-tiny-sid-256b |
| 6 | 118 | Imperial March | Tapio Viitanen | 256 | s-sidin09-tiny-sid-256b |
| 7 | 117 | Random Ninja | Stefano Tognon | 256 | s-sidin09-tiny-sid-256b |
| 8 | 105 | Crue Gurl Freestyle | Jaymz Julian (A Life in Hell) | 256 | s-sidin09-tiny-sid-256b |
| 9 | 91 | 128 Byte Blues | freakyDNA | 128 | s-sidin09-tiny-sid-256b |
| 10 | 75 | Repetitive Tune BASIC | Peter Weighill | 256 (BASIC) | s-sidin09-tiny-sid-256b |
(source: s-sidin08-tiny-sid-512b for the table, s-sidin09-tiny-sid-256b for the 256-byte details)
What the entries teach#
A cheat sheet of the size tricks, entry by entry — the code itself is in the summaries:
| trick | entries |
|---|---|
start on load by loading over the KERNAL vectors at $0326 (4 bytes instead of a BASIC stub; "starting smally", Steve Judd) | Crue Gurl, Crue Gurl Freestyle, New Kid On The Block, Splatform256 |
sei + busy-wait on a $D012 raster line instead of an interrupt | all except 15BB, 128 Byte Blues and the BASIC entry |
| copy the player or its data into the zero page, index by one byte | My Block, Electronic, Crue Gurl Freestyle, Splatform256 |
| one-byte pattern pointers as offsets from a base pattern | Crue Gurl, Empty |
| frequency table computed at run time from 12 or 24 top-octave bytes, or octaves shifted on the fly | Twone Five (82 bytes for the table), Empty (58 bytes), Repeat Me (12 stored pitches) |
| note byte carrying two things (note + duration, two voices, drum flag + note, raw frequency nibbles) | Imperial March, New Kid, Random Ninja, Crue Gurl |
| instrument = 2–3 bytes (waveform/AD/duration; SR only; a hard-coded single instrument) | New Kid, Empty, Repeat Me |
| the machine as sequencer: a counter's bits, screen RAM, the noise register, BASIC ROM as a filter sweep, the KERNAL delay as timer, envelope output as cutoff | My Block, 128 Byte Blues, Random Ninja / Crue Gurl Freestyle, New Kid, Random Ninja, Electronic |
| self-modifying code for indices and for changing the song's rules every N passes | My Block, Electronic, Random Ninja, Imperial March, Splatform256 |
| a full SID register image written in one loop each frame | Empty, Imperial March, Electronic |
hard restart in a few bytes: test bit $08/$09 before the note, or AD $0f / SR $00 two frames early | New Kid, Empty, Random Ninja, Twone Five, Crue Gurl |
(sources: s-sidin08-tiny-sid-512b, s-sidin09-tiny-sid-256b; see sid-player-routine, hard-restart, chord-arpeggio, adsr-envelope, wavetable-programming, randomization-and-probability)
Tognon's ordering rationale: 512-byte engines first, because they "could have a more linear structure over a 256 bytes one", the 256-byte ones being "more intricate" (source: s-sidin08-tiny-sid-512b).
The announcement and its model (SIDin #7, 2005-01-09)#
Tognon announced the competition at the end of his analysis of Ninja/theDream's xxlarge, a cover of Jeff's "X large" in under 256 bytes (CSDb release 14337): it would run "from 15 January 2005 to 21 April 2005 instead of the 'SidWine compo'" ("SidWine compo take me too many months to organize"), with 256-byte and 512-byte categories ("Maybe a size of 1K could be another chance if required"); entries had to be .prg files "runnable with run after loading", covers and remixes were allowed, and authors could let their (reverse-engineered or original) source be published in SIDin as xxlarge's was — no init routine, an IRQ installed by POKE 789,8, KERNAL zero page for variables, the cursor-blink counter as a pulse LFO, nibble-packed notes, and no attack/decay for lack of space. Site: digilander.iol.it/ice00/tsid/tinysid (source: s-sidin07-xxlarge; sid-player-routine).
Tiny Sid 2 (2006)#
- The second compo had eight entries in two categories, 256 and 512 bytes; sidin analysed them with full source in instalments — #10 (2006-07-16): XL5, Mini Digi Drum, RM, Miniature Rhapsody; #11 (2007-02-14): BLOCK ACID DUB, Resolution; the last two deferred again. The results were published as
tinysid2_res.zipon Tognon's site; placings are stated in neither part — they come from the #10 news, see the Facts above (sources: s-sidin10-tiny-sid-2-part-1, s-sidin11-tiny-sid-2-part-2). - 256 bytes: XL5 by Stefano Tognon (a cover of Jeff's X-Large 5, squeezed from 309 to 256 bytes in 13 logged steps); Miniature Rhapsody by Eric Odland (Stone Monkey Software, created 2006-03-22; one byte per bar = arpeggio type, bass, root); BLOCK ACID DUB by Frantic/Hack'n'Trade (254 bytes so that it fits one disk block; random recombination from a CIA timer, hard restart on the drum, assembled with DreamAss). 512 bytes: Mini Digi Drum by Leif Bloomquist (Schema/AIC; a sampled kick and hi-hat, nibble-packed); RM by Tognon (a cover of Whittaker's Red Max; runtime frequency table, transpose by
ADC); Resolution by Eric Odland (all voices on one note, filter cutoff from ENV3) (sources: s-sidin10-tiny-sid-2-part-1, s-sidin11-tiny-sid-2-part-2). - Frantic's header contrasts the two compos: "Last Tiny SID compo I aimed to make a long composition with harmonies and a 'real' melody … This time I aimed for fatter sounds instead" (source: s-sidin11-tiny-sid-2-part-2).
- laxity said in January 2007 that two of his ten C64 drivers were written "for the Tiny Sid Competition Challenge last year (2005)" — which of the two compos is meant is ambiguous (source: s-sidin11-laxity-interview).
- The entries' techniques are collected on sid-player-routine (Tiny Sid 2 table), chip-samples, hard-restart, chord-arpeggio, orderlist, instrument-tables and fake-echo.
The last two entries of Tiny Sid Compo II (SIDin #12)#
Tognon's series ends with the two entries he had not yet analysed (source: s-sidin12-tiny-sid-2-part-3):
- Plaster (GRG, 512 bytes) — "the tune that take more points over all the others": no interrupt (a
seiand a raster-synchronised loop), all state in zero page, two tracks (voice 1; voices 2 and 3 sharing one, told apart by an XORed transpose, an XORed instrument and a fixed detune), pattern bytes where values below 8 select an instrument, instruments as three 5-entry tables (control-sequence index, AD, SR) whose control sequences all begin$09,$81, a filter cut-off sweeping$3F–$FF, pulse low bytes stepped by$18per frame, and a0F01hard-restart write one tick before each note (hard-restart). - Back To Basics (Jaymz Julian, 256 bytes):
$46bytes of data copied to zero page, one counter serving as pulse-width and filter-cutoff high byte (offset per voice), voice 2 from tables of frequency high bytes and control values, voices 1 and 3 from patterns of raw frequency bytes, note lengths alternating between two values by an XOR (shuffle-funktempo). - Tognon's closing verdict: "writing tiny music is a sort of programming art: you have to customize your player according to the instruments to use, with the music effect you want to achieve and the melody of your tune".
Around the compo (from the SIDin editorials and news)#
- The idea is first floated in the #7 editorial (2005-01-09), which introduces that issue's analysis of Ninja's 256-byte xxlarge: "why not making a competition about writing very smal sid? A mix about programming and sid composition…" (source: s-sidin-news-digest).
- The 2005 entries went into hvsc update 42 (June 2005) among that update's compo tunes; Tognon's own placings were 7th (256 b) and 3rd (512 b) in 2005 and 2nd in both classes in 2006 (source: s-sidin-news-digest).
- Instead of a third edition Tognon proposed reviving the Big Sid Compo (announced in #10, 2006-07-16: "some big sid tune where more composers will work onto the same peaces using the same editor", submissions until 2006-12-02), "as having a more longer duration could be better managed" (#11, 2007-02-14) (source: s-sidin-news-digest).
- The compo's constraint is the opposite of an editor's: frantic, asked in 2020 why defmon's packed tunes are mostly player code, answered that its player is "optimized for speed, not size" — "When doing a stereo sid tune in 4x speed, having a speed optimized player is almost a requirement" — and pointed at his own 256-byte Tiny SID players, BLOCK ACID DUB among them, as the size-optimized opposite by the same hand (sid-player-routine; source: s-chipmusic-defmon-thread).
Related#
sidin · stefano-tognon · sid-player-routine · laxity · aleksi-eeben · hard-restart · adsr-envelope · chord-arpeggio · wavetable-programming · randomization-and-probability · compos
Sources#
s-sidin08-tiny-sid-512b · s-sidin09-tiny-sid-256b · s-sidin08-eeben-interview · s-sidin07-xxlarge · s-sidin-news-digest · s-sidin10-tiny-sid-2-part-1 · s-sidin11-tiny-sid-2-part-2 · s-sidin11-laxity-interview · s-sidin12-tiny-sid-2-part-3 · s-chipmusic-defmon-thread