<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[ChipMusic.org - Wallflower - Visual/audio demo in 23 bytes.]]></title>
		<link>https://chipmusic.org/forums/topic/4147/wallflower-visualaudio-demo-in-23-bytes/</link>
		<description><![CDATA[The most recent posts in Wallflower - Visual/audio demo in 23 bytes..]]></description>
		<lastBuildDate>Mon, 09 May 2011 16:43:42 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Wallflower - Visual/audio demo in 23 bytes.]]></title>
			<link>https://chipmusic.org/forums/post/66049/#p66049</link>
			<description><![CDATA[<b><i>Battle Lava says:</i></b><p>this is really cool</p>]]></description>
			<pubDate>Mon, 09 May 2011 16:43:42 +0000</pubDate>
			<guid>https://chipmusic.org/forums/post/66049/#p66049</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wallflower - Visual/audio demo in 23 bytes.]]></title>
			<link>https://chipmusic.org/forums/post/66043/#p66043</link>
			<description><![CDATA[<b><i>akira^8GB says:</i></b><p>I bet it gives interesting values after loading some software beforehand.</p>]]></description>
			<pubDate>Mon, 09 May 2011 15:46:18 +0000</pubDate>
			<guid>https://chipmusic.org/forums/post/66043/#p66043</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wallflower - Visual/audio demo in 23 bytes.]]></title>
			<link>https://chipmusic.org/forums/post/66031/#p66031</link>
			<description><![CDATA[<b><i>4mat says:</i></b><div class="quotebox"><cite>akira^8GB wrote:</cite><blockquote><div class="quotebox"><cite>4mat wrote:</cite><blockquote><p>or type this into your hex editor:</p><div class="codebox"><pre><code>7C 00 05 A2 29 3F A8 E5 A1 45 A2 05 A2 29 7F 99 00 D4 99 D7 CF 50 EB</code></pre></div></blockquote></div><p>Can I type this straight into memory with a monitor? At which address? (I&#039;m a noob). There&#039;s a specific address where executables can be put, right? Or I can SYS it. Hmm..</p></blockquote></div><p>Yes, if you skip the first two bytes (which are the file header) and put it into memory at $7c , then jump to $7c (or SYS 124) and it&#039;ll run.&nbsp; Just tried that in Vice.&nbsp; (I can&#039;t figure out how to type a bunch of hex bytes into Vice&#039;s monitor so used fill for each address <img src="https://chipmusic.org/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /> )</p><p>If you type the whole thing into a hex editor and save that as a binary it&#039;ll autorun with LOAD &quot;FILENAME&quot;,8,1</p><p>One thing to note is while the structure of the demo remains intact the audio &amp; visuals change slightly depending on how long the c64 has been powered up before it&#039;s run.&nbsp; In the video it&#039;s within the first &#039;second&#039; of a boot-up, unfortunately this is beyond my control as there&#039;s no room to reset the timer values before the demo activates.&nbsp; (putting code at $7c only gives you about 23 bytes to play with)</p>]]></description>
			<pubDate>Mon, 09 May 2011 15:15:36 +0000</pubDate>
			<guid>https://chipmusic.org/forums/post/66031/#p66031</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wallflower - Visual/audio demo in 23 bytes.]]></title>
			<link>https://chipmusic.org/forums/post/66023/#p66023</link>
			<description><![CDATA[<b><i>akira^8GB says:</i></b><div class="quotebox"><cite>4mat wrote:</cite><blockquote><p>or type this into your hex editor:</p><div class="codebox"><pre><code>7C 00 05 A2 29 3F A8 E5 A1 45 A2 05 A2 29 7F 99 00 D4 99 D7 CF 50 EB</code></pre></div></blockquote></div><p>Can I type this straight into memory with a monitor? At which address? (I&#039;m a noob). There&#039;s a specific address where executables can be put, right? Or I can SYS it. Hmm..</p>]]></description>
			<pubDate>Mon, 09 May 2011 14:46:58 +0000</pubDate>
			<guid>https://chipmusic.org/forums/post/66023/#p66023</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wallflower - Visual/audio demo in 23 bytes.]]></title>
			<link>https://chipmusic.org/forums/post/65999/#p65999</link>
			<description><![CDATA[<b><i>The Silph Scope says:</i></b><p>Brings a tear to my eye, beautiful.</p><p>My girlfriend: &quot;how can you enjoy that? It&#039;s annoying.&quot;</p>]]></description>
			<pubDate>Mon, 09 May 2011 12:43:28 +0000</pubDate>
			<guid>https://chipmusic.org/forums/post/65999/#p65999</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wallflower - Visual/audio demo in 23 bytes.]]></title>
			<link>https://chipmusic.org/forums/post/65970/#p65970</link>
			<description><![CDATA[<b><i>arfink says:</i></b><p>23 bytes. Astounding as usual 4mat. Just awesome.</p>]]></description>
			<pubDate>Mon, 09 May 2011 04:55:33 +0000</pubDate>
			<guid>https://chipmusic.org/forums/post/65970/#p65970</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wallflower - Visual/audio demo in 23 bytes.]]></title>
			<link>https://chipmusic.org/forums/post/65959/#p65959</link>
			<description><![CDATA[<b><i>Party Time! Hexcellent! says:</i></b><p>Like like!</p>]]></description>
			<pubDate>Mon, 09 May 2011 03:55:04 +0000</pubDate>
			<guid>https://chipmusic.org/forums/post/65959/#p65959</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wallflower - Visual/audio demo in 23 bytes.]]></title>
			<link>https://chipmusic.org/forums/post/65927/#p65927</link>
			<description><![CDATA[<b><i>chunter says:</i></b><p>That is indeed quite awesome</p>]]></description>
			<pubDate>Mon, 09 May 2011 01:39:59 +0000</pubDate>
			<guid>https://chipmusic.org/forums/post/65927/#p65927</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wallflower - Visual/audio demo in 23 bytes.]]></title>
			<link>https://chipmusic.org/forums/post/65923/#p65923</link>
			<description><![CDATA[<b><i>4mat says:</i></b><p>Thankyou.&nbsp; Going into a little more detail:&nbsp; With the kernal system running (the default on bootup) the c64 has a realtime clock<br />active.&nbsp; It uses the zeropage addresses $a0-$a2 for minutes, seconds, and... not quite milliseconds.&nbsp; They call it a &#039;jiffy clock&#039; which<br />translates to it being 50fps for PAL and 60fps for NTSC.&nbsp; &nbsp;Anyway, as the system is still enabled those addresses are counting up at a regular rate.&nbsp; My code then takes the values in $a1 and $a2, does some bit shifting and subtracting and then uses the results twice.&nbsp; Once for the Y index so I can offset to other parts of the VIC-II and SID chips, and then the second time for what value to put in the chips for that loop.&nbsp; &nbsp;There is no timing inside the demo itself so things are running as fast as the CPU can do them.&nbsp; (which is why the sound is quite &#039;bubbly&#039; sounding)</p><div class="codebox"><pre><code>; assembled to address $007c in the zeropage of memory.  This is a known trick to allow tiny programs to
; execute by loading them with LOAD&quot;FILENAME&quot;,device,1 

* = $7c

; OR accumulator with the millisecond register.
ora $a2
; AND it to be a value between 0 and 63, then tranfer to the Y index. 
; We don&#039;t want too much range for the SID/VIC addresses to write to.
and #$3f 
tay
; More messing with the accumulator value, limiting the range to 0-127.
; This will be the value that gets written to the other chips and gives us
; enough values to keep the display and audio interesting. (though no
; noise waveform as that would require $81)
sbc $a1
eor $a2
ora $a2
and #$7f
; Write to SID chip.
sta $d400,y
; Write to VIC chip.  By rights the address should be $d000 , however
; because some written values end up crashing the demo or freezing it
; I offset back to a reasonably &quot;safe&quot; area.  This overlaps from the end of the
; ram bank at $c000.
sta $cfd7,y 
; As the overflow flag is always clear I can use this to loop back.  The other
; branch types always resolve and a JMP command costs another byte.
bvc $7c</code></pre></div><p>I agree, the workflow for the demo was much more discovery than a direct creation.&nbsp; I <br />called the demo &#039;Wallflower&#039; because it&#039;s almost like a dance, the sprite blocks begin <br />clustered around the sides of the screen and then interact with each other as the<br />environment changes, with the ORA &amp; EOR sequences in the code forming and dissolving<br />relationships between the different blocks in turn.</p>]]></description>
			<pubDate>Mon, 09 May 2011 00:20:42 +0000</pubDate>
			<guid>https://chipmusic.org/forums/post/65923/#p65923</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wallflower - Visual/audio demo in 23 bytes.]]></title>
			<link>https://chipmusic.org/forums/post/65922/#p65922</link>
			<description><![CDATA[<b><i>Bit Shifter says:</i></b><p>Haha that is so cool. 23 BYTES. Awesome.</p>]]></description>
			<pubDate>Mon, 09 May 2011 00:20:36 +0000</pubDate>
			<guid>https://chipmusic.org/forums/post/65922/#p65922</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wallflower - Visual/audio demo in 23 bytes.]]></title>
			<link>https://chipmusic.org/forums/post/65903/#p65903</link>
			<description><![CDATA[<b><i>Trollcat says:</i></b><p>Wow... the way this evolves is fascinating!</p><p>With such a small source code it seems like this is as much a discovery as a creation? (I don&#039;t mean that disparagingly!)&nbsp; Can you explain a bit about what is actually happening to produce this result?</p>]]></description>
			<pubDate>Sun, 08 May 2011 20:50:54 +0000</pubDate>
			<guid>https://chipmusic.org/forums/post/65903/#p65903</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wallflower - Visual/audio demo in 23 bytes.]]></title>
			<link>https://chipmusic.org/forums/post/65890/#p65890</link>
			<description><![CDATA[<b><i>chunter says:</i></b><p>Bonus for posting the demo&#039;s code in its entirety.</p>]]></description>
			<pubDate>Sun, 08 May 2011 17:00:08 +0000</pubDate>
			<guid>https://chipmusic.org/forums/post/65890/#p65890</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wallflower - Visual/audio demo in 23 bytes.]]></title>
			<link>https://chipmusic.org/forums/post/65873/#p65873</link>
			<description><![CDATA[<b><i>little-scale says:</i></b><p>inspiring!</p>]]></description>
			<pubDate>Sun, 08 May 2011 13:33:19 +0000</pubDate>
			<guid>https://chipmusic.org/forums/post/65873/#p65873</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wallflower - Visual/audio demo in 23 bytes.]]></title>
			<link>https://chipmusic.org/forums/post/65870/#p65870</link>
			<description><![CDATA[<b><i>ant1 says:</i></b><p>Excellent!!!! Music sounds a bit skrju-ey. Would loading an image immediately before running this code be COOL or NOT COOL (broken)?</p>]]></description>
			<pubDate>Sun, 08 May 2011 13:19:19 +0000</pubDate>
			<guid>https://chipmusic.org/forums/post/65870/#p65870</guid>
		</item>
		<item>
			<title><![CDATA[Wallflower - Visual/audio demo in 23 bytes.]]></title>
			<link>https://chipmusic.org/forums/post/65833/#p65833</link>
			<description><![CDATA[<b><i>4mat says:</i></b><p><div class="embed_video"><iframe width="560" height="340" src="https://www.youtube.com/embed/7lcQ-HDepqk" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div></p><p>I&#039;d been trying some small music drivers that use the Commodore64&#039;s realtime clock to keep rhythm, rather than the<br />standard way of having an interrupt with a countdown for tempo.&nbsp; &nbsp;While the output isn&#039;t particularly pleasant here&#039;s<br />a little 23 byte demo that messes with those registers and then outputs the data to the VIC-II and SID to make a<br />little glitch fest.&nbsp; It ends after 9 minutes, I presume because the VIC-II eventually gets fed some bogus data.&nbsp; <br />(I had to keep moving the visuals offset around to stop it crashing much earlier in the run)</p><p><a href="http://atebit.org/downloads/atebit_wallflower.zip" target="_blank">Download the binary</a> or type this into your hex editor:</p><div class="codebox"><pre><code>7C 00 05 A2 29 3F A8 E5 A1 45 A2 05 A2 29 7F 99 00 D4 99 D7 CF 50 EB</code></pre></div>]]></description>
			<pubDate>Sat, 07 May 2011 22:12:03 +0000</pubDate>
			<guid>https://chipmusic.org/forums/post/65833/#p65833</guid>
		</item>
	</channel>
</rss>
