<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Skrasoft Dev Blog</title>
	<atom:link href="http://skrasoft.com/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://skrasoft.com/blog</link>
	<description>Interactive Hardware/Software Music Projects</description>
	<pubDate>Sun, 25 Jul 2010 07:26:32 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
	<language>en</language>
			<item>
		<title>A Magic Trick</title>
		<link>http://skrasoft.com/blog/?p=256</link>
		<comments>http://skrasoft.com/blog/?p=256#comments</comments>
		<pubDate>Sun, 25 Jul 2010 06:37:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Experimental]]></category>

		<category><![CDATA[Light Technical]]></category>

		<guid isPermaLink="false">http://skrasoft.com/blog/?p=256</guid>
		<description><![CDATA[This was news to me. It is well known that any periodic waveform can be represented by an infinite sum of harmonic sine waves. What about making a sine wave from an infinite sum of harmonic square waves?
Each step in the animation doubles the number of square wave &#8220;harmonics&#8221; included to approach a pure sine [...]]]></description>
			<content:encoded><![CDATA[<p>This was news to me. It is well known that any periodic waveform can be represented by an infinite sum of harmonic sine waves. What about making a sine wave from an infinite sum of harmonic square waves?</p>
<p><div class="wp-caption aligncenter" style="width: 410px"><a href="http://www.skrasoft.com/blog/blogfiles/squarewave.gif"><img src="http://www.skrasoft.com/blog/blogfiles/squarewave.gif" alt="Blasphemy" width="400" height="231" /></a><p class="wp-caption-text">Blasphemy</p></div></p>
<p>Each step in the animation doubles the number of square wave &#8220;harmonics&#8221; included to approach a pure sine wave. Ignore the numbers in the lower left hand corner despite the attention this sentence draws to them.</p>
<p>I take no credit for the math. I just wrote a GNU octave script to generate the plots based on an equation from <a href="http://www.dspdimension.com/">http://www.dspdimension.com/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://skrasoft.com/blog/?feed=rss2&amp;p=256</wfw:commentRss>
		</item>
		<item>
		<title>Pokey Panel</title>
		<link>http://skrasoft.com/blog/?p=254</link>
		<comments>http://skrasoft.com/blog/?p=254#comments</comments>
		<pubDate>Wed, 14 Jul 2010 04:54:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Modular Synths]]></category>

		<category><![CDATA[POKEY (Atari)]]></category>

		<guid isPermaLink="false">http://skrasoft.com/blog/?p=254</guid>
		<description><![CDATA[Just a quick post this time&#8230; The Pokey module panel graphics are finished and being sent off to get made. Here&#8217;s a rendering:

]]></description>
			<content:encoded><![CDATA[<p>Just a quick post this time&#8230; The Pokey module panel graphics are finished and being sent off to get made. Here&#8217;s a rendering:</p>
<p><img class="aligncenter" title="Pokey Panel" src="http://www.skrasoft.com/blog/blogfiles/pokey/AtariPanelGreen.PNG" alt="" width="436" height="672" /></p>
]]></content:encoded>
			<wfw:commentRss>http://skrasoft.com/blog/?feed=rss2&amp;p=254</wfw:commentRss>
		</item>
		<item>
		<title>Pokey Pitch Changes</title>
		<link>http://skrasoft.com/blog/?p=249</link>
		<comments>http://skrasoft.com/blog/?p=249#comments</comments>
		<pubDate>Sun, 13 Jun 2010 21:21:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Modular Synths]]></category>

		<category><![CDATA[POKEY (Atari)]]></category>

		<guid isPermaLink="false">http://skrasoft.com/blog/?p=249</guid>
		<description><![CDATA[I never really noticed this until I started getting into really low frequencies on the Pokey, but it only actually changes the output pitch on transitions of the current square wave signal. The chip itself can read hundreds of thousands of pitch settings per second, but they are only applied at the next transition of [...]]]></description>
			<content:encoded><![CDATA[<p>I never really noticed this until I started getting into really low frequencies on the Pokey, but it only actually changes the output pitch on transitions of the current square wave signal. The chip itself can read hundreds of thousands of pitch settings per second, but they are only applied at the next transition of the current square wave. For example, going from a low pitch square wave to a high pitch square wave looks something like this:</p>
<p><img src="http://www.skrasoft.com/blog/blogfiles/pokey/pitch_up1.PNG" alt="Pitch It Up" /></p>
<p>The first line is the current square wave output, and what it would do if it ran forever. The second line is an instant pitch change, and the third line is along the lines of what the Pokey actually does. Note that the new pitch data in that example was sent soon before a transition in the low frequency. The worst case is when the new data gets written right *after* a transition, and doesn&#8217;t kick in for half a cycle of the low frequency wave:</p>
<p><img src="http://www.skrasoft.com/blog/blogfiles/pokey/pitch_up2.PNG" alt="Pitch It Up... again" /></p>
<p>This implies that the clock dividers driving the logic only update their divide value when they output a pulse. Pokey square waves come from pulsing a T flip-flop, so there are two pulses per output cycle. That means if the current square wave is 1 Hz, the next pitch written won&#8217;t happen right away. It can take up to 500 milliseconds to change.</p>
<p>This all came up because of a new feature in the Pokey module design. A Pokey square wave in 16-bit mode with the usual pitch control ranges from about 13.5 Hz to hundreds of kHz. However, the Pokey itself has a bit that can be flipped to drop the range about 4.8 octaves and go down to 0.5 Hz! Initially I planned to have switches on the back of the module for this because I ran out of space on the front. More recently I&#8217;ve updated the pitch handling routines to automatically flip that bit as necessary to make the desired pitch. This initially created a slight problem, though, because flipping that bit takes effect almost instantly and drops the current pitch by 4.8 octaves. To go from 14 Hz to 13 Hz, that bit has to get flipped at some point. If the current pitch data is for 14 Hz and the bit gets flipped, the result ends up somewhere inside a 0.5 Hz square. Then, even if the pitch data for 13 Hz is written instantly, it may not take effect until a full second (half of a 0.5 Hz cycle) has passed! In other words, there may be a full second of silence inserted when going from 14 Hz to 13 Hz. </p>
<p>Eventually I came up with a workaround that reliably shortens the silence to about 43 milliseconds when flipping the aforementioned octave-dropping bit. This still creates some audible artifacts when switching between frequencies just above and just below 13.5 Hz, but it lets the pitch CV and knobs control a much greater range without adding any switches. </p>
<p>I made some recording of the worst case switching artifacts. Going from a high note (hundreds of Hz) to a note below 13.5 Hz is not really noticeable. It&#8217;s the low frequencies where it becomes clear because of missed/extra pulses when crossing the threshold.  </p>
<p>Here&#8217;s an example playing two pitches an octave apart that straddle the crossover point:</p>
<p><a href="http://www.skrasoft.com/blog/blogfiles/pokey/WorstCase.wav">Click here for audio clip one</a></p>
<p>This next example is some sweeps that go through the crossover point:</p>
<p><a href="http://www.skrasoft.com/blog/blogfiles/pokey/WorsterCase.wav">Click here for audio clip two</a></p>
<p>The more I use the module with this change, the more I like it. It only applies to a channel in 16-bit pitch mode, but there is already a switch on the front panel for that.</p>
]]></content:encoded>
			<wfw:commentRss>http://skrasoft.com/blog/?feed=rss2&amp;p=249</wfw:commentRss>
<enclosure url="http://www.skrasoft.com/blog/blogfiles/pokey/WorstCase.wav" length="1164396" type="audio/x-wav" />
<enclosure url="http://www.skrasoft.com/blog/blogfiles/pokey/WorsterCase.wav" length="2145180" type="audio/x-wav" />
		</item>
		<item>
		<title>More Pokey Module Audio</title>
		<link>http://skrasoft.com/blog/?p=246</link>
		<comments>http://skrasoft.com/blog/?p=246#comments</comments>
		<pubDate>Sun, 06 Jun 2010 19:06:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Modular Synths]]></category>

		<category><![CDATA[POKEY (Atari)]]></category>

		<guid isPermaLink="false">http://skrasoft.com/blog/?p=246</guid>
		<description><![CDATA[There is now one completely-built Pokey module prototype (though without panel artwork). The FPGA code is around 90% done. It still needs some minor usability tweaks and top secret configuration features.
More importantly, I made a few audio clips to show some of the current features. 
This first clip plays a major scale on the 6 [...]]]></description>
			<content:encoded><![CDATA[<p>There is now one completely-built Pokey module prototype (though without panel artwork). The FPGA code is around 90% done. It still needs some minor usability tweaks and top secret configuration features.</p>
<p>More importantly, I made a few audio clips to show some of the current features. </p>
<p>This first clip plays a major scale on the 6 different wave settings. I&#8217;m running a Kenton Pro Solo into the pitch CV input on channel 1. A Doepfer A-141 VCADSR is going into the channel 1 volume CV input. The different types of noise have different amounts of pitchability. The notes that sound like they&#8217;re missing in a couple spots are a side-effect of how the Atari chip generates noise. There&#8217;s a little more info about why it happens in <a href="http://skrasoft.com/blog/?p=231">this post.</a></p>
<p><a href="http://www.skrasoft.com/blog/blogfiles/pokey/MajorScale.wav">Click here for clip one</a></p>
<p>The second clip runs a Blacet Micro LFO into the CV wave input for channel 1. It&#8217;s set to a sawtooth wave to sweep through the different noise types. I&#8217;m tweaking two knobs: LFO rate and Atari channel 1 pitch. I also change the pitch resolution of the channel from 8-bit to 16-bit about halfway through, making the trip back down sound less steppy. Each channel has a switch on the front panel to jump between pitch resolutions. </p>
<p><a href="http://www.skrasoft.com/blog/blogfiles/pokey/CVWave.wav">Click here for clip two</a></p>
<p>The previous two clips have both been one voice by itself. This third clip starts as one voice, but then adds in the second voice slightly de-tuned. I flip the &#8220;highpass&#8221; switch that gives a nice octave effect, and then over-drive the channels via their volume knobs. The louder one channel is, the more it will modulate the other. The very end is back to one channel. </p>
<p><a href="http://www.skrasoft.com/blog/blogfiles/pokey/StackedVoice.wav">Click here for clip three</a></p>
<p>This last clip is more experimental. It combines the Aux input with low frequency noise. The signal path is a Blacet Micro LFO triangle wave into the Pokey synth AUX input. I&#8217;m also running one of the Atari channels set to noise at a sub-audio frequency. The low frequency noise creates rhythmic patterns that vary with pitch and modulate the volume of the AUX input. When the rhythm is changing it&#8217;s because I&#8217;m tweaking the sub-audio frequency and new patterns form automatically. The changes in pitch and timbre are because I&#8217;m also tweaking the Sample Rate knob for the aux input.  </p>
<p><a href="http://www.skrasoft.com/blog/blogfiles/pokey/ClickRhythm.wav">Click here for clip four</a></p>
<p>Keep in mind that even though the channels modulate each other to varying amounts, there are three independent channels on this thing mixed to a single output.<br />
Channel 1: Atari oscillator #1<br />
Channel 2: Atari oscillator #2<br />
Channel 3: Aux input</p>
<p>The two oscillator channels are identical in terms of features and controls. The Aux input has a gain/attenuation control and controllable sample rate. </p>
]]></content:encoded>
			<wfw:commentRss>http://skrasoft.com/blog/?feed=rss2&amp;p=246</wfw:commentRss>
<enclosure url="http://www.skrasoft.com/blog/blogfiles/pokey/MajorScale.wav" length="3387340" type="audio/x-wav" />
<enclosure url="http://www.skrasoft.com/blog/blogfiles/pokey/CVWave.wav" length="4798232" type="audio/x-wav" />
<enclosure url="http://www.skrasoft.com/blog/blogfiles/pokey/StackedVoice.wav" length="2288852" type="audio/x-wav" />
<enclosure url="http://www.skrasoft.com/blog/blogfiles/pokey/ClickRhythm.wav" length="7232776" type="audio/x-wav" />
		</item>
		<item>
		<title>Pokey Knobbed</title>
		<link>http://skrasoft.com/blog/?p=243</link>
		<comments>http://skrasoft.com/blog/?p=243#comments</comments>
		<pubDate>Sat, 29 May 2010 22:17:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Modular Synths]]></category>

		<category><![CDATA[POKEY (Atari)]]></category>

		<guid isPermaLink="false">http://skrasoft.com/blog/?p=243</guid>
		<description><![CDATA[Still chugging along on the Pokey synth module FPGA code. Last night I finished the first draft of the A/D sequencer. The result: knobs work! Based on the current scheme, the sample rates should be:
Pitch inputs: ~40kHz each
Volume inputs: ~40 kHz each
Wave inputs: > 40kHz each
Aux input: ~40 kHz
Sample rate input: ~20 kHz
The pots are [...]]]></description>
			<content:encoded><![CDATA[<p>Still chugging along on the Pokey synth module FPGA code. Last night I finished the first draft of the A/D sequencer. The result: knobs work! Based on the current scheme, the sample rates should be:</p>
<p>Pitch inputs: ~40kHz each<br />
Volume inputs: ~40 kHz each<br />
Wave inputs: > 40kHz each<br />
Aux input: ~40 kHz<br />
Sample rate input: ~20 kHz</p>
<p>The pots are sampled in the single-digit kHz range. </p>
<p>Here are a couple quick audio demos:</p>
<p><a href="http://www.skrasoft.com/blog/blogfiles/pokey/knobs1.wav">Audio 1</a></p>
<p><a href="http://www.skrasoft.com/blog/blogfiles/pokey/knobs2.wav">Audio 2</a></p>
<p>I made these to check how the channels modulate each other at different settings. I&#8217;m just turning knobs on the front panel; there isn&#8217;t anything connected to the inputs yet. </p>
]]></content:encoded>
			<wfw:commentRss>http://skrasoft.com/blog/?feed=rss2&amp;p=243</wfw:commentRss>
<enclosure url="http://www.skrasoft.com/blog/blogfiles/pokey/knobs1.wav" length="3612824" type="audio/x-wav" />
<enclosure url="http://www.skrasoft.com/blog/blogfiles/pokey/knobs2.wav" length="1845296" type="audio/x-wav" />
		</item>
		<item>
		<title>Pokey Module Status</title>
		<link>http://skrasoft.com/blog/?p=239</link>
		<comments>http://skrasoft.com/blog/?p=239#comments</comments>
		<pubDate>Sat, 22 May 2010 19:25:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Modular Synths]]></category>

		<category><![CDATA[POKEY (Atari)]]></category>

		<guid isPermaLink="false">http://skrasoft.com/blog/?p=239</guid>
		<description><![CDATA[Layout finished for the Pokey module main board prototype a month or so ago, and this past Monday two bare PCBs came in. My weeknights have been spent soldering parts and testing power supplies. There are five power rails for running the digital and analog stuff combined. When I was looking at Altera FPGAs, it [...]]]></description>
			<content:encoded><![CDATA[<p>Layout finished for the Pokey module main board prototype a month or so ago, and this past Monday two bare PCBs came in. My weeknights have been spent soldering parts and testing power supplies. There are five power rails for running the digital and analog stuff combined. When I was looking at Altera FPGAs, it looked like the design would need seven, but Xilinx parts are more forgiving. I wanted to use a Xilinx Spartan 6, but those are only available in BGA format (ie, impossible to solder by hand) until August. I settled on a Spartan 3A part.</p>
<p><div class="wp-caption aligncenter" style="width: 410px"><img title="Solder Station" src="http://www.skrasoft.com/blog/blogfiles/pokey/solder_zone.jpg" alt="Parts Parts Parts" width="400" height="300" /><p class="wp-caption-text">The Soldering Zone</p></div></p>
<p>Anyway, this is just a rambling status update. The power supplies are doing what they should and nothing is getting hot. The first audio spewed forth last night, and here&#8217;s a clip of what that sounded like:</p>
<p><a href="http://www.skrasoft.com/blog/blogfiles/pokey/first_run.wav">Click here for a .wav</a></p>
<p>It&#8217;s the same test code I used in <a href="http://skrasoft.com/blog/?p=220">this post</a>, just migrated to a Xilinx FPGA and self-contained. It&#8217;s good to see that it&#8217;s working on a standalone module now instead of just on a dev board. Progress!</p>
<p><div class="wp-caption aligncenter" style="width: 410px"><img title="Pokey Front" src="http://www.skrasoft.com/blog/blogfiles/pokey/pokey_action.jpg" alt="Knobs n Lights n Stuff" width="400" height="300" /><p class="wp-caption-text">Knobs &#39;n&#39; Lights &#39;n&#39; Stuff</p></div></p>
<p>The three LEDs show &#8220;pitch clipping&#8221; and whether or not the aux input is available. The pitch inputs take -5 to +5, giving a 10 octave CV span. Since the Atari chip is somewhat limited in its frequency response, there are LEDs to show when the requested pitch is either too high or too low for the chip to handle. There&#8217;s a switch on the PCB that lets you control if a clipping channel should either mute or just play its most extreme frequency. Muting is useful for keeping chords in tune.</p>
<p>My next step is to get the A/D converters talking. I&#8217;m shooting for at least a 30 kHz sample rate on each of the Pitch and Volume CV inputs. That means pitch input 1 will be updated at least 30k times a second, pitch input 2 will be updated at least 30k times a second, and so on. The finalized sample rates, along with other tech specs like input impedance, will be in the manual.</p>
<p>In terms of overall time frame, I ordered 1000 potentiometers in early May. They take 12-14 weeks to get, putting actual release of the Pokey module in the range of August/September. The FPGA code is currently about 25% complete. Bifurcating technobabble flux capacitor.</p>
]]></content:encoded>
			<wfw:commentRss>http://skrasoft.com/blog/?feed=rss2&amp;p=239</wfw:commentRss>
<enclosure url="http://www.skrasoft.com/blog/blogfiles/pokey/first_run.wav" length="1800312" type="audio/x-wav" />
		</item>
		<item>
		<title>Pokey Oscillator Aliasing</title>
		<link>http://skrasoft.com/blog/?p=231</link>
		<comments>http://skrasoft.com/blog/?p=231#comments</comments>
		<pubDate>Thu, 22 Apr 2010 06:48:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Light Technical]]></category>

		<category><![CDATA[POKEY (Atari)]]></category>

		<guid isPermaLink="false">http://skrasoft.com/blog/?p=231</guid>
		<description><![CDATA[While waiting to hear back from Xilinx on some FPGA questions, I started a legitimate FPGA emulation of a Pokey chip. The sound generation hardware is, from what I can tell, completely digital up to the D/A converters. The outputs from different channels on a real chip modulate each other in the analog world, but [...]]]></description>
			<content:encoded><![CDATA[<p>While waiting to hear back from Xilinx on some FPGA questions, I started a legitimate FPGA emulation of a Pokey chip. The sound generation hardware is, from what I can tell, completely digital up to the D/A converters. The outputs from different channels on a real chip modulate each other in the analog world, but it should be possible to get most of the way there in an FPGA.</p>
<p>My favorite &#8220;problem&#8221; with the Pokey is that the same frequency settings at two different times can create different sounds or even go from sound to silence. This happens because the noise generators run at very high speeds, but they are &#8220;sampled&#8221; by lower speed clocks to generate the output. The net result is 1-bit aliasing that creates predictably unpredictable results.</p>
<p>Obviously any true hardware emulation should have the same problems, so I put together some Verilog based on my current understanding of how the Pokey internals work. If my understanding is correct, I should be able to create patterns from one frequency value that give different timbres or even silence.</p>
<p>For the sake of brevity: it worked! I simulated the engine running with different frequency values until I found frequency values where a low speed clock synchronized with a pattern in the higher speed noise generators. By then jumping to a different frequency and back, the phase of this synchronization shifts and the output pattern changes timbre.</p>
<p>First is an extremely wide output shot from a logic simulation. &#8220;N&#8221; is the frequency register setting (AUDF in the Pokey datasheet). Several output configurations are shown as the bottom three lines. Notice that N is 3 most of the time, but the shape of T_4_OUT changes each time N jumps to 100 and back.</p>
<p><div class="wp-caption aligncenter" style="width: 410px"><a href="http://www.skrasoft.com/blog/blogfiles/pokey/sim1.png"><img title="Simulation One" src="http://www.skrasoft.com/blog/blogfiles/pokey/sim1.png" alt="Sync In, Sync Out" width="400" height="55" /></a><p class="wp-caption-text">Sync In, Sync Out</p></div></p>
<p>Click the image for a full-scale version.</p>
<p>Next is the money shot. There had to be a case where an output could &#8220;disappear&#8221; by grabbing a pattern of all zeros or all ones.</p>
<p><div class="wp-caption aligncenter" style="width: 410px"><a href="http://www.skrasoft.com/blog/blogfiles/pokey/sim2.png"><img title="Sim 2" src="http://www.skrasoft.com/blog/blogfiles/pokey/sim2.png" alt="Everything and the Kitchen" width="400" height="103" /></a><p class="wp-caption-text">Everything and the Kitchen</p></div></p>
<p>I&#8217;m not vouching that my Verilog code is 100% correct, especially given that it&#8217;s based on my understanding of some conflicting/incomplete data. It&#8217;s just nice to know that it has the right problems. It&#8217;s the good kind of bad, the Powerglove kind of bad.</p>
<p>As a side note, the Pokey datasheet and the De Re Atari chapter (7) on the Pokey contradict each other. De Re shows every distortion setting going through a divide-by-2, while the Pokey datasheet shows that some configurations, in fact, do not divide by 2. I believe the datasheet is correct in this case, though the block diagram in De Re Atari is useful for getting a general idea of the structure. The divide-by-2 settings just seem to mean &#8220;run through a T flip-flop.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://skrasoft.com/blog/?feed=rss2&amp;p=231</wfw:commentRss>
		</item>
		<item>
		<title>Pokey Panel PCB Pics</title>
		<link>http://skrasoft.com/blog/?p=228</link>
		<comments>http://skrasoft.com/blog/?p=228#comments</comments>
		<pubDate>Sat, 17 Apr 2010 17:00:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Modular Synths]]></category>

		<category><![CDATA[POKEY (Atari)]]></category>

		<guid isPermaLink="false">http://skrasoft.com/blog/?p=228</guid>
		<description><![CDATA[Prototype PCBs came in this week for the Pokey synth module front panel. Everything matches the drill test panel nicely. The next step is to get the main board prototype finished, ordered, and built.
]]></description>
			<content:encoded><![CDATA[<p>Prototype PCBs came in this week for the Pokey synth module front panel. Everything matches the drill test panel nicely. The next step is to get the main board prototype finished, ordered, and built.</p>
<p><div class="wp-caption aligncenter" style="width: 310px"><img title="Panel PCB" src="http://www.skrasoft.com/blog/blogfiles/pokey/frontpanelpcb.jpg" alt="Bare Board" width="300" height="225" /><p class="wp-caption-text">Bare Board</p></div></p>
<p><div class="wp-caption aligncenter" style="width: 310px"><img title="Stuffed" src="http://www.skrasoft.com/blog/blogfiles/pokey/frontpanelstuffed.jpg" alt="Placed Parts" width="300" height="225" /><p class="wp-caption-text">Placed Parts</p></div></p>
<p><div class="wp-caption aligncenter" style="width: 310px"><img title="Mounted" src="http://www.skrasoft.com/blog/blogfiles/pokey/frontpanelmounted.jpg" alt="Mechanically Meniacal" width="300" height="225" /><p class="wp-caption-text">Mechanically Maniacal</p></div></p>
]]></content:encoded>
			<wfw:commentRss>http://skrasoft.com/blog/?feed=rss2&amp;p=228</wfw:commentRss>
		</item>
		<item>
		<title>SID Oscillator Verilog Fun</title>
		<link>http://skrasoft.com/blog/?p=222</link>
		<comments>http://skrasoft.com/blog/?p=222#comments</comments>
		<pubDate>Tue, 13 Apr 2010 04:33:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[FPGA]]></category>

		<category><![CDATA[Light Technical]]></category>

		<category><![CDATA[SID 6582 (Commodore64)]]></category>

		<guid isPermaLink="false">http://skrasoft.com/blog/?p=222</guid>
		<description><![CDATA[The past few days I&#8217;ve been waiting for Pokey synth front panel circuit boards to come in, so I thought I&#8217;d play around with some &#8220;soundchip&#8221; Verilog. Kevtris has already done a SID emulation in an FPGA (and understands the internals of the SID far better than I do), but I haven&#8217;t seen any code [...]]]></description>
			<content:encoded><![CDATA[<p>The past few days I&#8217;ve been waiting for Pokey synth front panel circuit boards to come in, so I thought I&#8217;d play around with some &#8220;soundchip&#8221; Verilog. <a href="http://blog.kevtris.org/?p=32">Kevtris</a> has already done a SID emulation in an FPGA (and understands the internals of the SID far better than I do), but I haven&#8217;t seen any code posted. I saw <a href="http://ploguechipsounds.blogspot.com/2010/03/sid-waveform-captures.html">this blog post</a> and eventually ended up at <a href="http://sid.kubarth.com/articles/interview_bob_yannes.html">this interview</a> I bookmarked a year or so ago.</p>
<p>I wrote some Verilog strictly according to the interview, specifically making an oscillator with triangle, saw, pulse, and noise outputs. I added in the logic &#8220;AND&#8221; of the triangle and saw waves as an additional waveform, according to Bob Yannes&#8217; comments about multiple waveforms being selected at once. Here&#8217;s what the digital outputs looks like:</p>
<p><div class="wp-caption aligncenter" style="width: 410px"><img title="Sid Waves" src="http://www.skrasoft.com/blog/blogfiles/sidwaves.PNG" alt="Only the Waviest" width="400" height="236" /><p class="wp-caption-text">Only the Waviest</p></div></p>
<p>My source code is available <a href="http://www.skrasoft.com/blog/blogfiles/SID.v">here</a>. I included excerpts from the interview as comments because it just felt so right. Open it with Notepad++ for best results (if you want all the formatting to line up properly).</p>
<p>What I still need to figure out:</p>
<p>The interview mentions that the LFSR for noise generation is clocked by one of the accumulator bits. Which bit is it?</p>
<p>Another excerpt from the interview that I&#8217;m partially unclear about: &#8220;The combination was actually a logical ANDing of the bits of each waveform, which produced unpredictable results, so I didn&#8217;t encourage this, especially since it could lock up the pseudo-random sequence generator by filling it with zeroes.&#8221; A linear feedback shift register shouldn&#8217;t be able to get filled with all zeros on its own. This implies that the LFSR shift register does not take feedback taps from itself, but actually taps somewhere further down the line (after the logical AND). Is it actually feeding back from the Waveform D/A input bits? In that case, what happens to the LFSR while it isn&#8217;t selected as a waveform?</p>
<p>Are the inputs to the Waveform D/A registered synchronously to the master clock, or do glitches pop up from not having every bit change at exactly the same time?</p>
<p>At this point I really need to fire up an actual SID to start checking my assumptions, but I&#8217;m afraid that if I touch a SID now then I&#8217;ll end up too distracted when the Pokey synth prototype PCBs come in.</p>
]]></content:encoded>
			<wfw:commentRss>http://skrasoft.com/blog/?feed=rss2&amp;p=222</wfw:commentRss>
		</item>
		<item>
		<title>Pokey Module Status</title>
		<link>http://skrasoft.com/blog/?p=220</link>
		<comments>http://skrasoft.com/blog/?p=220#comments</comments>
		<pubDate>Sun, 21 Feb 2010 22:46:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Modular Synths]]></category>

		<category><![CDATA[POKEY (Atari)]]></category>

		<guid isPermaLink="false">http://skrasoft.com/blog/?p=220</guid>
		<description><![CDATA[I&#8217;ve been making hardware changes to the Pokey module so that it can actually be manufactured. Yesterday evening I took a break to write some more Verilog FPGA code for the Pokey controller. The previous test was to write to the Pokey as often as possible, which came out to 1.79 million times per second. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been making hardware changes to the Pokey module so that it can actually be manufactured. Yesterday evening I took a break to write some more Verilog FPGA code for the Pokey controller. The previous test was to write to the Pokey as often as possible, which came out to 1.79 million times per second. This test added a finished start-up routine and tweaks frequency/volume registers to check for glitches.</p>
<p><a href="http://www.skrasoft.com/blog/blogfiles/pokey/FPGAPoke8bit.wav">Listen Here</a></p>
<p>It is just a simple test. The volume is modulated by a digital triangle wave, and the pitch is modulated by a slower digital triangle wave. Everything works just as expected. There is a lot more stuff I need to port from the microprocessor into Verilog, but it&#8217;s going faster than I originally expected. I probably won&#8217;t be using dsPIC chips for audio projects anymore after finding out how much more can be done with an FPGA.</p>
<p>In other news, my company is now official. The new name has a better ring to it than &#8220;skrasoft,&#8221; but I&#8217;ll save it for when this module goes on sale. I&#8217;m working as fast as I can to start manufacturing without sacrificing any of the features. There are several as-of-yet-unmentioned new features in the FPGA version of the module.</p>
<p>For those who missed it, I posted a test video of the old microcontroller-based module on Vimeo here:</p>
<p><a href="http://www.vimeo.com/9258219">http://www.vimeo.com/9258219</a></p>
]]></content:encoded>
			<wfw:commentRss>http://skrasoft.com/blog/?feed=rss2&amp;p=220</wfw:commentRss>
<enclosure url="http://www.skrasoft.com/blog/blogfiles/pokey/FPGAPoke8bit.wav" length="1806852" type="audio/x-wav" />
		</item>
	</channel>
</rss>
