MAT64 - Dancing with the Basic

MAT64 - Dancing with the Basic
Dancing with the Basic

Beautiful strings live in ROM, I used some of them to feed the SID and the VIC and some crazy stuff comes out.

A Shot in the R.O.M.

0s=54272:fOi=.to196:pOs+pE(48486+i)-72,pE(58098+i):nE:gO

Adventures in 79 tokens
...and how much I laughed doing them.

Well, everything started with the needing of making a rhythm in 79 chars of basic code to participate to the "BASIC oneliner competition" at Transmission 64 party.
With unconscious enthusiasm I wrote something that sounds:

0s=54272:dA24,9,19,9,15,9,18,33,18,32:fOi=1to5:rEk,v:pOs+k,v:?i,k,v:nE:reS:gO
run
(Paste it on Vice with Alt+Ins)

There was no time to end the word "hardrestart" that the line ended...

So, I've realized that I can't write any data in a line of code but look for existing data I can found somewhere in the ROM. As bonus, i can add a fixed offset to the values I read, so I don't need exact values but exact deltas.

Some regexes later...

You can't understand my surprise when the word 'SING' cames out from the regex. It was a part of the Basic Error Message Table, the full word was "MISSING FILE NAME".

So this 3 values subtracted by 77 gives me:

  • 24 - for the volume register
  • 14 - for frequency of a voice 3
  • 19 - for attack/decay of the voice 3

After some attempts, timeconsuming tasks, kicks, shakes and opts I finally got the sound of a musical scale.

0s=54290:fOi=0to4:a=pE(41474+i)-77:pOs+a,9:nE:pOs,32:pOs,33:pOs-3,pE(162):gO
run

Good, it's worse than Fort Apocalypse intro of the '82...

A Basic Groove

0s=54294:fOi=.to32:pOs+pE(41713+i)-83,pE(59686+i)+3:pOs-3,15:nE:pOs,pE(162):gO

My submission to the C64 Basic Demo Competition at Transmission64 3rd Edition

download from CSDb

Allegretto con Fuoco alla Fermata

0s=54272:fOi=.to255:pOs+pE(41713+i)-61,(pE(64788+(iaN15))-1):pOs+22,i:nE:gO

Notturno Pizzicato sul Ponticello

0s=54272:pOs+22,pE(162):fOi=.to96:pOs+pE(59613+i)-135,pE(46895+i):nE:gO

???

0s=54272:fOi=.to255:a=pE(62205+i)+60aN255:pOs+pE(41713+i)-61,a:pOs+22,i:nE:gO

The rest of the story is me coding a program that generates regexes to find register sequences like this:

U[\\s\\S]{0,2}L[\\s\\S]{0,2}T[\\s\\S]{0,2}O[\\s\\S]{0,2}O[\\s\\S]{0,2}P[\\s\\S]{0,2}

And other regexes to fill to those registers like this:

0[\\s\\S][\\s\\S][\\s\\S]\xfd[\\s\\S]\x86[\\s\\S][\\s\\S][\\s\\S][\\s\\S]\x1f

But you can't understand my surprise when it starts writing BEFORE 54272 which is the VIC registers area :)

Dancing with the Basic (2022)

Download the entire compilation for Commodore 64 and find for the hidden parts in the code :D

download from CSDb

Cookie policy

This website does not set any cookie