<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.2.2" -->
<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/"
	>

<channel>
	<title>Boundedly Undefined Results</title>
	<link>http://www.jevinskie.com</link>
	<description>Tech oriented commentary and personal projects</description>
	<pubDate>Tue, 11 Mar 2008 22:04:56 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.2</generator>
	<language>en</language>
	<image>
  <link>http://www.jevinskie.com</link>
  <url>http://www.jevinskie.com/favicon.ico</url>
  <title>Boundedly Undefined Results</title>
</image>
		<item>
		<title>Shiny New MATLAB</title>
		<link>http://www.jevinskie.com/archives/14</link>
		<comments>http://www.jevinskie.com/archives/14#comments</comments>
		<pubDate>Tue, 11 Mar 2008 22:04:08 +0000</pubDate>
		<dc:creator>Jevin</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.jevinskie.com/archives/14</guid>
		<description><![CDATA[I finally broke down and bought the student version of MATLAB. Even though I feel that Mathematica is superior to MATLAB, especially when it comes to data visualization and symbolic math, the fact that my linear circuit analysis class requires that you use MATLAB was enough to push me to the dark side. I&#8217;ve made a special plot using MATLAB to [...]]]></description>
			<content:encoded><![CDATA[<p>I finally broke down and bought the student version of <a href="http://www.mathworks.com/" target="_blank">MATLAB</a>. Even though I feel that <a href="http://www.wolfram.com/products/mathematica/index.html" target="_blank">Mathematica</a> is superior to MATLAB, especially when it comes to data visualization and symbolic math, the fact that my linear circuit analysis class requires that you use MATLAB was enough to push me to the dark side. I&#8217;ve made a special plot using MATLAB to break it in. This is a plot of the output voltage of a <a href="http://en.wikipedia.org/wiki/Boost_converter" target="_blank">boost regulator</a> that I made using some spare parts. It takes 5V and outputs up to 30V. The output voltage is measured using a voltage divider and an ADC on an <a href="http://en.wikipedia.org/wiki/Atmel_AVR" target="_blank">ATMega168</a>. This reading is printed to the <a href="http://en.wikipedia.org/wiki/Universal_asynchronous_receiver/transmitter" target="_blank">UART</a> (for logging, this is how I produced the plot) and it also adjusts the duty cycle of a <a href="http://en.wikipedia.org/wiki/Pulse-width_modulation" target="_blank">PWM</a> on the AVR to regulate the output to the desired voltage. From the plot you can see that using a bigger capacitor helps minimize the voltage ripple but it also seems to let the duty cycle vary a lot. Perhaps some simple averaging or rate limiting could help lower the ripple even more. I was shooting for 20V output, but it keeps wanting to output a bit higher. Maybe I need more precise measurements of the ratio in my voltage divider. Regardless, the precision and accuracy of the output voltage isn&#8217;t too important, it gets regulated down to an accurate voltage up to 16.5V using an op-amp. Why go to all this trouble? I&#8217;ll explain in a later posting&#8230;<img src="http://www.jevinskie.com/wp-content/uploads/2008/03/regulator_matlab.png" alt="Regulator Output" /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.jevinskie.com/archives/14/feed</wfw:commentRss>
		</item>
		<item>
		<title>Working Time</title>
		<link>http://www.jevinskie.com/archives/13</link>
		<comments>http://www.jevinskie.com/archives/13#comments</comments>
		<pubDate>Mon, 21 Jan 2008 05:35:01 +0000</pubDate>
		<dc:creator>Jevin</dc:creator>
		
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://www.jevinskie.com/archives/13</guid>
		<description><![CDATA[I&#8217;ve rested on my laurels for long enough. OK, so I actually didn&#8217;t do much resting. Computer Engineering pretty much made sure I didn&#8217;t. I got my best grades yet last semester and that was reflected in the free time that I had to play around with other stuff. One example of the things that [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve rested on my laurels for long enough. OK, so I actually didn&#8217;t do much resting. Computer Engineering pretty much made sure I didn&#8217;t. I got my best grades yet last semester and that was reflected in the free time that I had to play around with other stuff. One example of the things that suffered because my grades didn&#8217;t was Project Perturbed Hedgerow. It is a secret. Yes Chris, I <em>will</em> finish it eventually. Another is Leopard. I bought it the day it came out and I <em>still</em> haven&#8217;t upgraded to it yet. Part of my hesitation was due to worries about compatibility with Fink/X11/all the other applications that I was critically relying on at the time. Now that I don&#8217;t have any critical school projects, I can afford to have some downtime. Also, X11 in Leopard has matured a lot since release, thanks in large part to Ben Byer, the person at Apple responsible for their X11 release. The reason that X11 has been rocky in Leopard is that they changed to from XFree86 to X.org, which will be better in the long run. I&#8217;m tired of the millions and millions of datasheet PDFs cluttering my desktop. Thus, tonight I have decided to backup, reformat (upgrading didn&#8217;t work on my sister&#8217;s Panther laptop), and install Leopard. A bit of an overreaction to a cluttered desktop, but I&#8217;ve obviously needed an excuse to get busy and install Leopard.</p>
<p>As <a href="http://www.austinpecora.com/">Austin</a> talked about recently, Austin and I are working on another high speed photography project (I&#8217;ve done it once before). This time, it will be bigger, faster, better than before! I will talk much more about it and its development in future writings.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jevinskie.com/archives/13/feed</wfw:commentRss>
		</item>
		<item>
		<title>x87 FPU State Dumper</title>
		<link>http://www.jevinskie.com/archives/11</link>
		<comments>http://www.jevinskie.com/archives/11#comments</comments>
		<pubDate>Thu, 13 Sep 2007 01:24:22 +0000</pubDate>
		<dc:creator>Jevin</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.jevinskie.com/archives/11</guid>
		<description><![CDATA[Ever have those demons inside your computer that you swear are messing with your bits and producing random errors? Me too. During one of these bug chasing marathons, I wrote a FPU  dumper that prints out the state of the x87 FPU whenever it is called. The program that I was working on was [...]]]></description>
			<content:encoded><![CDATA[<p>Ever have those demons inside your computer that you <em>swear</em> are messing with your bits and producing random errors? Me too. During one of these bug chasing marathons, I wrote a FPU  dumper that prints out the state of the <a href="http://en.wikipedia.org/wiki/X87">x87 FPU</a> whenever it is called. The program that I was working on was getting random numerical corruption on an older version of <a href="http://www.cygwin.com/">Cygwin&#8217;s</a> GCC. I traced the corruption to a single line that had a floating point divide. The value was fine before the line was run and clobbered to a NaN after the line was run. Great, demons. The FPU dumper helped me realize what was going on. Long story short, there was a bug in <a href="http://sourceware.org/newlib/">newlib</a> (Cygwin&#8217;s standard C library) which caused it to not conform to C99. The bug didn&#8217;t show up in my newer version of GCC because GCC provided a builtin for the missing C99 math function. I sent off a description to the bug to the newlib mailing list and Jeff Johnston had a patch within an hour. Thanks Jeff!</p>
<p>Regarding the FPU dumper, it is a header file that you include in whatever code you want to check the FPU from. If you uncomment the <code>#define FPU_DUMP_VERBOSE</code> line in the header or define it in the compile line (<code>-DFPU_DUMP_VERBOSE</code>), it prints off a bit more info on the status registers. To do the actual dumping, simply call <code>FPUDUMP</code> from anywhere in your code. The FPU state is saved into a struct, parsed, printed, and the FPU state is restored from the struct lest something like <code>printf</code> messes with the FPU in some way.</p>
<p>The code is licensed under the <a href="http://www.opensource.org/licenses/zlib-license.php">zlib license</a>. The output format is borrowed from the excellent <a href="http://www.ollydbg.de/">OllyDbg</a>, my favorite Windows debugger. Feel free to comment/criticize my code!<br />
<a href="http://www.jevinskie.com/wp-content/uploads/2007/09/fpu_dump.h" title="x87 FPU State Dumper">Here is the code!</a></p>
<p>Example code calling the dumper:</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="co2">#include &quot;fpu_dump.h&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw4">double</span> x = <span class="nu0">243</span>;</div>
</li>
<li class="li1">
<div class="de1">FPUDUMP;</div>
</li>
<li class="li2">
<div class="de2">x = x / <span class="nu0">3.14</span>;</div>
</li>
<li class="li1">
<div class="de1">FPUDUMP;</div>
</li>
</ol>
</div>
<p>An example of the verbose output:</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">================== MAGICAL FPU INSPECTOR ==================</div>
</li>
<li class="li1">
<div class="de1">From fpu_dump.c line 20:</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">Status: 0&#215;0020</div>
</li>
<li class="li2">
<div class="de2">Invalid: 0, Denorm: 0, Zero Div: 0</div>
</li>
<li class="li1">
<div class="de1">Overflow: 0, Underflow: 0, Precision: 1</div>
</li>
<li class="li1">
<div class="de1">Stack fault: 0, Error summary: 0, TOP: 0</div>
</li>
<li class="li1">
<div class="de1">C3: 0, C2: 0, C1: 0, C0: 0</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2">Control: 0&#215;037F</div>
</li>
<li class="li1">
<div class="de1">Invalid Mask: 1, Denorm Mask: 1, Zero Div Mask: 1</div>
</li>
<li class="li1">
<div class="de1">Overflow Mask: 1, Underflow Mask: 1, Precision Mask: 1</div>
</li>
<li class="li1">
<div class="de1">Rounding: NEAR, Precision: 64, Infinity: 0</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2">3 2 1 0 &nbsp; &nbsp; &nbsp;E S P U O Z D I</div>
</li>
<li class="li1">
<div class="de1">FST 0020 &nbsp;Cond 0 0 0 0 &nbsp;Err 0 0 1 0 0 0 0 0 &nbsp;(GT)</div>
</li>
<li class="li1">
<div class="de1">FCW 037F &nbsp;Prec NEAR,64 &nbsp;Mask &nbsp; &nbsp;1 1 1 1 1 1</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">ST0 &nbsp;EMPTY &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NAN &nbsp; REG0</div>
</li>
<li class="li2">
<div class="de2">FFFF 00000000 00000000</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">ST1 &nbsp;EMPTY &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; REG1</div>
</li>
<li class="li1">
<div class="de1">0000 00000000 00000000</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2">ST2 &nbsp;EMPTY &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; REG2</div>
</li>
<li class="li1">
<div class="de1">0000 00000000 00000000</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">ST3 &nbsp;EMPTY &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; REG3</div>
</li>
<li class="li1">
<div class="de1">0000 00000000 00000000</div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">ST4 &nbsp;EMPTY &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; REG4</div>
</li>
<li class="li1">
<div class="de1">0000 00000000 00000000</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">ST5 &nbsp;EMPTY &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; REG5</div>
</li>
<li class="li2">
<div class="de2">0000 00000000 00000000</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">ST6 &nbsp;EMPTY &nbsp; &nbsp; &nbsp; 16045690984229361664 &nbsp; REG6</div>
</li>
<li class="li1">
<div class="de1">403E DEADBEEF BAADD800</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2">ST7 &nbsp;EMPTY &nbsp; &nbsp; &nbsp; 16045690984229355520 &nbsp; REG7</div>
</li>
<li class="li1">
<div class="de1">403E DEADBEEF BAADC0DF</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">========================= GOODBYE =========================</div>
</li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.jevinskie.com/archives/11/feed</wfw:commentRss>
		</item>
		<item>
		<title>Speak of the Devil&#8230;</title>
		<link>http://www.jevinskie.com/archives/8</link>
		<comments>http://www.jevinskie.com/archives/8#comments</comments>
		<pubDate>Wed, 15 Aug 2007 20:31:05 +0000</pubDate>
		<dc:creator>Jevin</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.jevinskie.com/archives/8</guid>
		<description><![CDATA[About half an hour after my last post, I realized that I was exporting the triangles as vertex1, vertex2, vertex2 instead of vertex1, vertex2, vertex3. Amazing what a one character typo can do&#8230; I feel awesome.

Edit: Looks like the I got the texture coordinates right - I was able to add the texture without any [...]]]></description>
			<content:encoded><![CDATA[<p>About half an hour after my last post, I realized that I was exporting the triangles as <code>vertex1, vertex2, vertex2</code> instead of <code>vertex1, vertex2, vertex3</code>. Amazing what a one character typo can do&#8230; I feel <em>awesome</em>.</p>
<p><a href="http://www.jevinskie.com/wp-content/uploads/2007/08/clive_winston_w00t.png" title="Clive’s Face - Pretty Version"><img src="http://www.jevinskie.com/wp-content/uploads/2007/08/clive_winston_w00t.thumbnail.png" alt="Clive’s Face - Pretty Version" /></a></p>
<p><strong>Edit</strong>: Looks like the I got the texture coordinates right - I was able to add the texture without any trouble!<br />
<a href="http://www.jevinskie.com/wp-content/uploads/2007/08/clive_winston_textured.png" title="Clive’s Face - Textured Version"><img src="http://www.jevinskie.com/wp-content/uploads/2007/08/clive_winston_textured.thumbnail.png" alt="Clive’s Face - Textured Version" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jevinskie.com/archives/8/feed</wfw:commentRss>
		</item>
		<item>
		<title>Success!</title>
		<link>http://www.jevinskie.com/archives/6</link>
		<comments>http://www.jevinskie.com/archives/6#comments</comments>
		<pubDate>Wed, 15 Aug 2007 19:41:26 +0000</pubDate>
		<dc:creator>Jevin</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.jevinskie.com/archives/6</guid>
		<description><![CDATA[Last night I took a big step in my reversing of the Guitar Hero mesh format. For a while now I have been trying to decode the meshes so that I can import them into StepMania for a Guitar Hero-ized version. I have all the vertices, their normals, their colors and their texture locations decoded. [...]]]></description>
			<content:encoded><![CDATA[<p>Last night I took a big step in my reversing of the Guitar Hero mesh format. For a while now I have been trying to decode the meshes so that I can import them into <a href="http://www.stepmania.com/">StepMania</a> for a Guitar Hero-ized version. I have all the vertices, their normals, their colors and their texture locations decoded. The triangles look decoded correctly for the most part but it looks like it is missing a few. The only left is the correct interpretation of the normals - right now MilkShape doesn&#8217;t want to display a solid of the mesh, just the wireframe. I&#8217;ll post more on the development as I continue. Once I get the decoder in working order, I&#8217;ll release the source code.</p>
<p><a href="http://www.jevinskie.com/wp-content/uploads/2007/08/clive_winston_face.png" title="Clive’s Face"><img src="http://www.jevinskie.com/wp-content/uploads/2007/08/clive_winston_face.thumbnail.png" alt="Clive’s Face" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jevinskie.com/archives/6/feed</wfw:commentRss>
		</item>
		<item>
		<title>Sufjan Stevens Doesn&#8217;t Think Things Through, or, How Long Song Titles Really Piss Me Off, or, Come On Now, This Is Really Ridiculous</title>
		<link>http://www.jevinskie.com/archives/4</link>
		<comments>http://www.jevinskie.com/archives/4#comments</comments>
		<pubDate>Tue, 14 Aug 2007 01:56:10 +0000</pubDate>
		<dc:creator>Jevin</dc:creator>
		
		<category><![CDATA[Entertainment]]></category>

		<guid isPermaLink="false">http://www.jevinskie.com/archives/4</guid>
		<description><![CDATA[Sufjan Stevens, I like his music but I&#8217;m not so peachy about the titles that he picks for his songs. Come on, is &#8220;The Black Hawk War, or, How to Demolish an Entire Civilization and Still Feel Good About Yourself in the Morning, or, We Apologize for the Inconvenience but You&#8217;re Going to Have to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Sufjan_Stevens">Sufjan Stevens</a>, I like his music but I&#8217;m not so peachy about the titles that he picks for his songs. Come on, is &#8220;The Black Hawk War, or, How to Demolish an Entire Civilization and Still Feel Good About Yourself in the Morning, or, We Apologize for the Inconvenience but You&#8217;re Going to Have to Leave Now, or&#8230;&#8221; really necessary? That title is 197 characters long, for those counting! When you combine that title with my naming scheme of <strong>Artist (Album) - Title</strong>, you run into problems. It wreaks havoc on my computer; I couldn&#8217;t move the file without getting an error! If I started a band, I would respect the reserved characters of various file systems (<strong>\/:*?&#8221;&lt;&gt;|</strong> for <a href="http://en.wikipedia.org/wiki/NTFS">NTFS</a>) and their file name length limits (255 characters). That will never happen though, so don&#8217;t worry.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jevinskie.com/archives/4/feed</wfw:commentRss>
		</item>
		<item>
		<title>Ágætis Byrjun</title>
		<link>http://www.jevinskie.com/archives/1</link>
		<comments>http://www.jevinskie.com/archives/1#comments</comments>
		<pubDate>Sun, 05 Aug 2007 21:25:08 +0000</pubDate>
		<dc:creator>Jevin</dc:creator>
		
		<category><![CDATA[Entertainment]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Ágætis byrjun is Icelandic for &#8220;an alright start&#8221;. It is also an album by Sigur Rós, an Icelandic band and one of my favorite bands. I&#8217;d call this posting an alright start, if I say so myself. This blog will be place for my random ramblings, usually about ideas and projects that are on my [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/%C3%81g%C3%A6tis_byrjun" target="_blank" title="Wikipedia entry on Ágætis Byrjun">Ágætis byrjun</a> is Icelandic for &#8220;an alright start&#8221;. It is also an album by <a href="http://en.wikipedia.org/wiki/Sigur_R%C3%B3s" title="Wikipedia entry on Sigur Rós">Sigur Rós</a>, an Icelandic band and one of my favorite bands. I&#8217;d call this posting an alright start, if I say so myself. This blog will be place for my random ramblings, usually about ideas and projects that are on my mind at the time. I vow to not let this blog die a slow death due to stagnation, as so many other blogs do. Of course, I won&#8217;t be at a lack of material to write about, with school starting in less than two weeks. Lets hope for the best this year.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jevinskie.com/archives/1/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
