<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ShimPossible &#187; Tech</title>
	<atom:link href="http://blog.shimpossible.com/category/tech/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.shimpossible.com</link>
	<description>It's not impossible, it's ShimPossible</description>
	<lastBuildDate>Sun, 16 Aug 2009 13:08:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Fun with timezones</title>
		<link>http://blog.shimpossible.com/2009/04/09/fun-with-timezones/</link>
		<comments>http://blog.shimpossible.com/2009/04/09/fun-with-timezones/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 23:50:47 +0000</pubDate>
		<dc:creator>shim</dc:creator>
				<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://blog.shimpossible.com/?p=30</guid>
		<description><![CDATA[Using dates and times in a program is not always as straight forward as you might think.Â  The issue is with timezones and daylight savings.Â  Most people forget to use a timezone when they store dates.Â  This might not seem like an issue if you think your program will never be used in another timezone, [...]]]></description>
			<content:encoded><![CDATA[<p>Using dates and times in a program is not always as straight forward as you might think.Â  The issue is with timezones and daylight savings.Â  Most people forget to use a timezone when they store dates.Â  This might not seem like an issue if you think your program will never be used in another timezone, but it still is.</p>
<p>Timezones tell you how to convert your datetime from one timezone to the other.Â  10am in NYC is not the same 10am in Tokyo.Â  What makes this all the more fun is the wonder idea of daylight savings time.Â  Time will go backwards and forwards or seeming random days.Â  Suddenly there are 2 different 11:59pm.</p>
<p>When you look at a file in windows explort, did you ever think about the missing timezone on the dates?Â  You probably didn&#8217;t give it a second thought.Â  But you should.Â  You probably assume that it is showing the times in your current time zone.Â Â  Sadly you are more correct then you think.Â  I found out about this after I<a href="http://markmail.org/message/ebdzdl4ev7axmmbr#query:os.stat%20st_atime%201%20hour+page:1+mid:rzvcbnfuwleifeww+state:results"> read this link</a>.Â  It seems windows uses your CURRENT timezone to display the datetime.Â  Whats the problem with this?Â  If a file was created at 3/1 10:00pm and you look at the file in April, windows shows the file date as 11:00pm, even though the correct time should be 10:00pm.</p>
<p>Windows is smart enough to store the date in UTC/GMT/ZULU time, but when converting it back to your local timezone, it just uses your CURRENT timezone offset, instead of figuring out what it was on that date with DST factored in.Â  I wonder if someone was trying to optimize out a few CPU cycles.</p>
<p>So next time you are looking at the access times on your files, remember that they could be up to an hour off from what the actual time was.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.shimpossible.com/2009/04/09/fun-with-timezones/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Swap with out the tmp</title>
		<link>http://blog.shimpossible.com/2009/01/27/swap-with-out-the-tmp/</link>
		<comments>http://blog.shimpossible.com/2009/01/27/swap-with-out-the-tmp/#comments</comments>
		<pubDate>Tue, 27 Jan 2009 05:36:07 +0000</pubDate>
		<dc:creator>shim</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://blog.shimpossible.com/?p=28</guid>
		<description><![CDATA[When swapping variables most people use tmp = a a = b b = tmp This requires using an extra variable tmp to store A while it is overwritten with b.Â  Wouldn&#8217;t it be great if you could swap the two without using an extra variable?Â  The XOR swap algorithm is just what you need [...]]]></description>
			<content:encoded><![CDATA[<p>When swapping variables most people use</p>
<p><code>tmp = a<br />
a = b<br />
b = tmp<br />
</code></p>
<p>This requires using an extra variable tmp to store A while it is overwritten with b.Â  Wouldn&#8217;t it be great if you could swap the two without using an extra variable?Â  The <a href="http://en.wikipedia.org/wiki/XOR_swap_algorithm">XOR swap algorithm</a> is just what you need</p>
<p><code>a^=b^=a^=b</code></p>
<p>This ends up with A and B swapped.Â  Still 3 assignments but with out the extra variable.Â  If you want a good explaination of how that works read the wikipedia article.</p>
<p>A word of warning though, the above code only works in C/C++.Â Â  It will not work in an VM language like Java or .NET.Â Â Â  This has to do with how the languages are implemented.Â  Java and .NET are stack based VMs where as C/C++ is register based (and not a VM).Â  This means that values are pushed onto the stack and then poped off to calculate values.</p>
<p>For example</p>
<p><code>int a = 1;<br />
int b = 1;<br />
int c1 = (a++) + a;<br />
int c2 = b + (b++);<br />
</code></p>
<p>c1 will be set to 3 and c2 will be set to 2.Â Â  Written in C/C++ both will give the answer of 2.Â  The operator a++ will increment a by 1 but return its original value.Â  With a stack base, the 1st part of the equation, (a++), is calculated and the answer ( 1 ) push onto the stack.Â Â  The next part of the equation (a) is calculated and the answer (2) and push onto the static.Â Â  Why is the 2nd part of the equation 2?Â  When the add operation is run, it retrieves the actual values of the variable one of which is the returned &#8216;original value&#8217; of a and the other is the current value of A.</p>
<p>An alternate way of writing the XOR swap that works on stack based (and non stack based) VMs is as follows.</p>
<p><code>a^=b<br />
b^=a<br />
a^=b</code></p>
<p>Note:Â  This does not work if A and B are the same object.Â  You shouldn&#8217;t be swapping in the case any ways.</p>
<p>The short moral of the story is dont use shortcut code to put a bunch of commands on the same line.Â  It may not do what you think it will.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.shimpossible.com/2009/01/27/swap-with-out-the-tmp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Launch Wrapper</title>
		<link>http://blog.shimpossible.com/2007/09/02/launch-wrapper/</link>
		<comments>http://blog.shimpossible.com/2007/09/02/launch-wrapper/#comments</comments>
		<pubDate>Mon, 03 Sep 2007 03:41:22 +0000</pubDate>
		<dc:creator>shim</dc:creator>
				<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://blog.shimpossible.com/2007/09/02/launch-wrapper/</guid>
		<description><![CDATA[Here&#8217;s a small utility i wrote after having to keep adding the same command lines arguments to a java. This program is a wrapper around the one you want to launch. You can specify a prefix and a postfix to the arguments. You can also alter them through a regular expression. This is all done [...]]]></description>
			<content:encoded><![CDATA[<p><a id="p23" href="http://blog.shimpossible.com/wp-content/uploads/2007/09/wrapper.zip"> </a>Here&#8217;s a small utility i wrote after having to keep adding the same command lines arguments to a java.   This program is a wrapper around the one you want to launch.   You can specify a prefix and a postfix to the arguments.  You can also alter them through a regular expression.  This is all done through the .config file.   The basic idea is to rename your executable, point the wrapper to the renamed file, and rename wrapper.exe to the original name of your executable.</p>
<p><a title="Program launch Wrapper" rel="attachment" id="p23" href="http://blog.shimpossible.com/2007/09/02/launch-wrapper/program-launch-wrapper/" /><a title="Program launch wrapper" id="p25" href="http://blog.shimpossible.com/wp-admin/wrapper.zip">wrapper.zip</a><br />
Edit:Â  Updated exe to C++.Â Â Â  C#/.NET doesn&#8217;t allow exec like processes</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.shimpossible.com/2007/09/02/launch-wrapper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Faster flash</title>
		<link>http://blog.shimpossible.com/2007/05/02/faster-flash/</link>
		<comments>http://blog.shimpossible.com/2007/05/02/faster-flash/#comments</comments>
		<pubDate>Wed, 02 May 2007 17:24:56 +0000</pubDate>
		<dc:creator>shim</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://blog.shimpossible.com/2007/05/02/faster-flash/</guid>
		<description><![CDATA[I have been working on a project in Adobe flash for the last few months. It basically does a ton of animation and math on every screen. So i put all the code in onEnterFrame, the standard way to run continuous code, so it ran on each frame. Over the months I have done by [...]]]></description>
			<content:encoded><![CDATA[<p>I have been working on a project in Adobe flash for the last few months.  It basically does a ton of animation and math on every screen.  So i put all the code in onEnterFrame, the standard way to run continuous code, so it ran on each frame.  Over the months I have done by best to optimize it for speed and efficiency but it had still  ran slow, and used a lot of CPU power.   How can I make it faster I thought?</p>
<p>The first most obvious thing to try was to up the FPS.  Flash defaults it to 12, which seems rather slow for animation doesn&#8217;t it?   So I updated it to 30, which didn&#8217;t seem the to change anything.  60fps offered a slight improvement.  So it logically concludes that 120fps (the max you can set in flash) would give the best performance, and it seemed like it did.  But the program was still using a ton of CPU power, and had a very low fps.</p>
<p>Was there a way i could squeeze a few more fps out of the program?  Well there happens to be a function called updateAfterEvent()  which basically tells the program to issue another screen refresh immediately.  The only problem is that you can only call it from certain functions., one of which is NOT onEnterFrame.   It would only work if called from an event, such as a mouse movement or key press.  It also would work for a periodically ran function called through setInterval().   This looked like the option to try.</p>
<p>The function has this basic format:</p>
<p>setInterval(function, ms, params)</p>
<p>It takes a pointer to a function, the number of milliseconds in between calls to the function, and any params you would like to send it.  That sounded wonderful, just set a really low ms, and pass in the function that does the same thing my current onEnterFrame does, and it should run as fast as I want.   Well, not really.   The one gotcha with this function is that it will only call the function at most, as often as onEnterFrame is called.  The resolution of this timer is only as fine as the FPS in the movie.  Even if i set the ms to 0, it would still only be called as often as onEnterFrame.  Back the square one again, or was I?  The new difference now was that I could call updateAfterEvent in the function, because it was called through setInterval.  Yea!   So i put the new code in, removed the old onEnterFrame, left out updateAfterEVents, set the ms to 10 and watched to see if there was any improvement.</p>
<p>Suddenly there was a 10x speed up.  The animation wasn&#8217;t as sluggish and it responded to the uses key presses immediately.  That didn&#8217;t make any sense.  The same amount of code was being ran on every frame, the program should run the same speed.  I tried changing the ms down to 1 and the animation only got faster.  I changed the FPS of the program down to 12, and the animation was still just as smooth.   I wondered if the function was being called more often the the screen updated, so I turned the FPS down to 1.   A FPS of 1 resulted in jerky animation just as expected.  So the function was still only being called as often as the screen updated.  Turning the fps back to 12 (the default).  I ran the program and watched the cpu usage, it was only around 10-20%, instead of the whopping 70% it was using before.   Changing the FPS had the most effect on the CPU usage.  A higher FPS resulted in more processor usage.   But changing the MS in setInterval had barely  any effect on CPU usage.   Hmmm&#8230;.  So i went around and changed all my onEnterFrame to setInterval code.   This resulted in a much more responsive program, that had lower CPU usage.   I still don&#8217;t know what the problem with putting code in onEnterFrame is, but I dont think I&#8217;ll be useing onEnterFrame much anymore.</p>
<p>The moral of the story:</p>
<p>DO NOT USE onEnterFrame in flash, its slow.  Only use it if you absolutely must, but I don&#8217;t know why you would.<br />
Changing the FPS does NOT result in faster code.  Only MORE CPU usage.<br />
USE setInterval(&#8230;)  instead with a lowish FPS (such as 12)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.shimpossible.com/2007/05/02/faster-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Non-repeat random playlist in constant time?</title>
		<link>http://blog.shimpossible.com/2007/01/13/non-repeat-random-playlist-in-constant-time/</link>
		<comments>http://blog.shimpossible.com/2007/01/13/non-repeat-random-playlist-in-constant-time/#comments</comments>
		<pubDate>Sat, 13 Jan 2007 06:55:14 +0000</pubDate>
		<dc:creator>shim</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://blog.shimpossible.com/2007/01/13/non-repeat-random-playlist-in-constant-time/</guid>
		<description><![CDATA[I&#8217;m sure you have all heard about the problems with certain mp3 players and their &#8216;random&#8217; play lists. Some people think they repeat some songs more than others. Well here a way to get a truly random shuffle of the list in constant time. That means it takes the same amount of time no matter [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m sure you have all heard about the problems with certain mp3 players and their &#8216;random&#8217; play lists.  Some people think they repeat some songs more than others.  Well here a way to get a truly random shuffle of the list in constant time.  That means it takes the same amount of time no matter how big the list is.</p>
<p>This class takes takes an Array of items (data) and divides it into two sections.  The first section is the already randomized items, the other is the items that haven&#8217;t been shuffled yet.  When you request the next item, it picks a random item from the remaining set and swaps it onto the end of the shuffled set.  When the non-shuffled set is empty, it starts from the beginning of the array again.  At this point the whole array would have been shuffled already so no more swapping will be needed.<br />
Here is the entire class in C#<br />
class Shuffle<br />
{<br />
Random r = new Random();<br />
Object[] data;</p>
<p>int split;  // where the split is in the array<br />
bool shuffled = false;  // has the entire array been shuffled<br />
public Shuffle(Object[] q)<br />
{<br />
split = 0;<br />
data = q;<br />
}</p>
<p>public Object Next()<br />
{<br />
if (split == data.Length)<br />
{<br />
split = 0;<br />
shuffled = true;<br />
}</p>
<p>if (!shuffled)<br />
{<br />
// find the next one<br />
int idx = r.Next(data.Length &#8211; split);<br />
// swap the positions<br />
Object tmp = data[split];<br />
data[split] = data[idx];<br />
data[idx] = tmp;<br />
}</p>
<p>return data[split++];<br />
}<br />
}This class shuffles the list in constant time.  It only shuffles when a new item is requested from the list, and only shuffles that one item.  This is many many times faster than shuffling all the items at once.</p>
<p>Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.shimpossible.com/2007/01/13/non-repeat-random-playlist-in-constant-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Combination Generation</title>
		<link>http://blog.shimpossible.com/2006/12/23/combination-generation/</link>
		<comments>http://blog.shimpossible.com/2006/12/23/combination-generation/#comments</comments>
		<pubDate>Sat, 23 Dec 2006 17:52:34 +0000</pubDate>
		<dc:creator>shim</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.shimpossible.com/2006/12/23/combination-generation/</guid>
		<description><![CDATA[I ran across a wonderful article a while ago about a Combination / Permutation class that generated them as a stream.Â  It&#8217;s a great idea.Â  It makes unit testing pretty easy, as you can have the class make sure you hit all your test cases.Â  Sadly I wasn&#8217;t able to find the article again, at [...]]]></description>
			<content:encoded><![CDATA[<p>I ran across a wonderful article a while ago about a Combination / Permutation class that generated them as a stream.Â  It&#8217;s a great idea.Â  It makes unit testing pretty easy, as you can have the class make sure you hit all your test cases.Â  Sadly I wasn&#8217;t able to find the article again, at least I don&#8217;t think i was able to find it.</p>
<p>Anyway, I went a made my own combination generator.Â  For those wondering what a Combination is, its arranging K items from a set of N items, order doesn&#8217;t matter.Â  So given 5 items, and only taking 3 at a time you would get</p>
<p>0,1,2<br />
0,1,3<br />
0,1,4<br />
0,2,3<br />
0,2,4<br />
0,3,4<br />
1,2,3<br />
1,2,4<br />
1,3,4<br />
2,3,4<br />
The way this works is quite simple.Â  Each column has a min and max value that it can hold.Â  The first column goes from 0-2 (or 0 to (N-K) ), the last column goes from N-K to N-1.Â  You can easily generalize this into column C can hold a value from C to N-K+C.Â  The value of N-K can be precomputed.Â  Armed with this knowledge you can now make all your combinations.Â  First start with the identity (0,1,2,&#8230;,n).Â  To get the next combination, start at the right most item, and move left until you hit the first item that can be incremented, in other words, the value is between C and N-K+C.Â  Increment this value, then move back right and set each of these columns equal to 1 more than the item at its left (ieÂ Â  c[i] = c[i-1]+1).</p>
<p>So given 0,3,4,Â  we start at the right (4).Â  4 is the max value for this column, so we move left.Â  3 is also the max value for this column, so we move left again.Â  0 is between 0 and 2, so we can still increment it.Â  We increment it to 1.Â  Now the array is 1,3,4.Â  Next we go back right and add set each column to one more than the column at its right, so we change the 3 into 1+1, which is 2.Â  We change the 4 into 2+1, which is 3.Â  This leaves us with the next combination of 1,2,3.</p>
<p>The last combination has the pattern of the first item equal to N-K (or 2 in our case).Â  When we reach this case we stop.</p>
<p>Ok, thats my little walk through on combinations. I&#8217;ll put something up about permutations next</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.shimpossible.com/2006/12/23/combination-generation/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>n-jugs</title>
		<link>http://blog.shimpossible.com/2006/11/09/n-jugs/</link>
		<comments>http://blog.shimpossible.com/2006/11/09/n-jugs/#comments</comments>
		<pubDate>Thu, 09 Nov 2006 19:35:49 +0000</pubDate>
		<dc:creator>shim</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://blog.shimpossible.com/2006/11/09/n-jugs/</guid>
		<description><![CDATA[Given a set of n jugs of different sizes, how would you dump water between them to get a specific amount? If you have ever watched Diehard III, you might have seen this with 2 jugs. In the movie they are given 4 and 5 gallon jugs and are asked to make 3 gallons. I [...]]]></description>
			<content:encoded><![CDATA[<p>Given a set of n jugs of different sizes, how would you dump water between them  to get a specific amount?   If you have ever watched  Diehard III, you might have seen this with 2 jugs.  In the movie they are given 4 and 5 gallon jugs and are asked to make 3 gallons.</p>
<p>I originally tried to write a program to solve this problem using a brute force method.  Needless to say, this was very slow and almost never ran to completion.  I thought about it for a while and finally figured it out.  It boils down to just solving a graph of connected nodes.  Since I wanted to learn ruby, I used this to learn the language.</p>
<p>The basic idea to solve this is:</p>
<p>Have we reach the end state (desired amount)?<br />
Loop through each from jug (i)<br />
Loop through each to jug (j)<br />
Calculate the new state of the jugs (water level in each)<br />
Have we seen this &#8220;state&#8221; before?  If not, store the new state.  If we have, then move on<br />
If this is a new state, go to step 1 with new state<br />
old state, continue looping</p>
<p>Obviously, this wont find the optimal solution, but it will find a solution.   If you want to find the optimal, you will have to store the steps to get to a state, and see if you have found a quicker path to a state.   If you want, I still have the ruby file to solve this.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.shimpossible.com/2006/11/09/n-jugs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>If it aint broke, don&#8217;t fix it.</title>
		<link>http://blog.shimpossible.com/2006/10/14/if-it-aint-broke-dont-fix-it/</link>
		<comments>http://blog.shimpossible.com/2006/10/14/if-it-aint-broke-dont-fix-it/#comments</comments>
		<pubDate>Sat, 14 Oct 2006 21:31:39 +0000</pubDate>
		<dc:creator>shim</dc:creator>
				<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://blog.shimpossible.com/?p=14</guid>
		<description><![CDATA[Ok, so a big woops on my part. I tried to update the server the other day. As you probably have guessed, I messed up. I miss typed a few things, left out a few things, and promptly rebooted the server. Whats wrong with rebooting you ask? Well, if the computer you are working on [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, so a big woops on my part.  I tried to update the server the other day.  As you probably have guessed, I messed up.  I miss typed a few things, left out a few things, and promptly rebooted the server.  Whats wrong with rebooting you ask?  Well, if the computer you are working on is located in a different state, behind locked doors, in a cabinet , then you might have a problem.  Apparently the computer couldn&#8217;t find the right file to boot from, because i miss typed it.  So it was just sitting there waiting for the &#8220;Any Key&#8221; to be pressed.  I had to wait a whole day before someone could drive down there and manually restart the server for me.</p>
<p>So the lesson for today is, if it aint broke, don&#8217;t fix it.  Maybe  in a few months when I have more time to make sure I do everything correctly, I&#8217;ll try for an update.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.shimpossible.com/2006/10/14/if-it-aint-broke-dont-fix-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>osx x86 install guide</title>
		<link>http://blog.shimpossible.com/2006/08/02/osx-x86-install-guide/</link>
		<comments>http://blog.shimpossible.com/2006/08/02/osx-x86-install-guide/#comments</comments>
		<pubDate>Wed, 02 Aug 2006 06:26:06 +0000</pubDate>
		<dc:creator>shim</dc:creator>
				<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://blog.shimpossible.com/?p=12</guid>
		<description><![CDATA[Looking around the net, its hard to find a good, complete guide for install osx86. I&#8217;ll try to make a complete one here. If there is anything missing, please feel free to comment. Things you might need: An Install DVD that works on intel hardware A computer that supports at least SSE2 A USB mouse [...]]]></description>
			<content:encoded><![CDATA[<p>Looking around the net, its hard to find a good, complete guide for install osx86. I&#8217;ll try to make a complete one here. If there is anything missing, please feel free to comment.</p>
<p>Things you might need:</p>
<ul>
<li>An Install DVD that works on intel hardware</li>
<li>A computer that supports at least SSE2</li>
<li>A USB mouse and keyboard (optional, but makes things easyer later)</li>
<li>A free 6.5GB (at least) partition or disk</li>
</ul>
<p>The 1st thing you should do is make sure you can boot the install DVD. If you can&#8217;t get to the installer screen, this guide will do you no luck. Some things you might want to try to get it booted are as follows.</p>
<p>Press <strong>F8 </strong>to get to the boot option screen. You do this right when it says <span style="font-weight: bold">Loading Darwin</span>&#8230;</p>
<p>at the boot: prompt add <span style="font-weight: bold">-v</span> to get a print out of what is going on. Some other options you can try are <span style="font-weight: bold">platform=ACPI </span>or <span style="font-weight: bold">platform=X86PC</span>. If you still can&#8217;t get it booted you should look around <a target="_blank" title="osx86project" href="http://wiki.osx86project.org/">http://wiki.osx86project.org/</a> for help.<br />
Now that you know you can boot into the installer you can contine.</p>
<p><span style="font-weight: bold">Setting up Hard drive space:</span></p>
<p>As stated earlyer, you will need at least 6.5GB of free space. You can try to get away with less, but you wont be left with much free room. I would recommend you go with 10GB. There are two ways to setup the harddrive space. The first is in an empty partition. The second would be on an entire disk.</p>
<p><span style="font-weight: bold">Setting up a Partition:</span></p>
<p>I recommend using Partition Magic to do this. There are a number of linux methods you can also use to resize partitions. Where the partition is on the drive doesn&#8217;t matter, as long as the partition is a primary partition. <span style="font-weight: bold">DO NOT</span> make the partition as an extended partition. Do not format the partition. The partition type needs to be set to <span style="font-weight: bold">0xAF</span> (HFS), otherwise the installer complains. You can set the partition type using the installer DVD if you have trouble.</p>
<p><span style="font-weight: bold">Using FDISK from DVD to set partition ID</span> (0xAF):</p>
<p>It F8 to get to the boot menu and type <span style="font-weight: bold">-x -s -v</span> (plus any addition options you might need to boot correctly). This will boot you into a command line. At the command line type</p>
<p><span style="font-weight: bold">fdisk -e /dev/rdisk0</span></p>
<p>Mind you the <span style="font-weight: bold">rdisk0</span> part might be different depending on how your system is setup. rdisk0 is the first SATA disk in my system. If you are using IDE drives you might want to try /dev/disk0. If you did it correctly you see<br />
<span style="font-weight: bold">fidsk: 1></span></p>
<p>Type <span style="font-weight: bold">p</span> to print out the partition table. You should see the partitions you setup. If not then you typed the wrong drive and need to quit (by typing q) and try another drive. If you see the partition you want to use for OSX type <span style="font-weight: bold">setpid</span> followed by the number of the partition you would like edit. For example you would type <span style="font-weight: bold">setpid 2, </span>if you want to set up OSX on your 2nd partition, and windows is on the first. Fdisk then ask you for a &#8220;Partion id&#8221;, type <span style="font-weight: bold">AF</span>, and press enter. Type <span style="font-weight: bold">w</span> to write your changes, then <span style="font-weight: bold">q</span> to quit. Type <span style="font-weight: bold">reboot</span> to restart the computer.</p>
<p><span style="font-weight: bold">Setting up a whole Disk</span>:</p>
<p>If you want to use a whole disk to install to there is nothing to setup. Just use the Disk Utility built into the installer to setup the drive.<br />
<span style="font-weight: bold">The Install (what you were waiting for)</span></p>
<p>At this point, you should be able to boot into the graphical install, and have a partition or disk ready to install into. Boot up the installer and wait for the menu bar to show acrows the top. On the menu bar go to <span style="font-weight: bold">Utilities</span> and select <span style="font-weight: bold">Disk Utility.</span> Select the partition you want to install onto from the menu on the left. At the bottom of the screen it should show you all the information about it. If the format (partition ID) is not <span style="font-weight: bold">0xAF</span> (HFS or Mac OS Extended), you&#8217;ll have problems. If you close the disk utility and open up the terminal from the utitlities menu, you can change the id using fdisk, as explained above (go back to the section about using fdisk for an explanation.) Click on the tab labled &#8216;erase&#8217; to format the disk. I recommend setting the volume format to &#8220;<span style="font-weight: bold">Mac OS Extended (Journaled)</span>. But you can use what you like. Click <span style="font-weight: bold">erase </span>to format the drive. Once the drive is format close Disk Utility and contine the install.</p>
<p><span style="font-weight: bold">Customize Install</span>:</p>
<p>At one point in the install there will be a Customize option on the bottom left corner. <span style="font-weight: bold">DONT MISS THIS</span>. If you miss this you will have an hour long install process. Customize the install by removing the languages and print drivers you do not need. If you DVD has patches on it, you might find them in here to. Install only the ones you need.</p>
<p><span style="font-weight: bold">Contine with the install</span></p>
<p>Don&#8217;t believe the time remaining, it lies. It will take some time to finish the install. Go find something to do. Like take a 10 mile walk. Watch a movie. When it is done installing the computer will automaticly reboot.<br />
<span style="font-weight: bold">The first boot</span>:</p>
<p>This is where alot of problems happen. Even though the install went well, you 1st boot might not go well. You could get stuck at the grey apple screen for ever, or OSX wont see your mouse and keyboard, or you might be stuck in an reboot cycle. If it can&#8217;t see your keyboard and mouse, this is where the USB keyboard and mouse come in. Plug them in and OSX should see they ok. If you don&#8217;t have the USB see the section at the bottom about <span style="font-weight: bold">PS2 kext</span>. If you have the other problems try the <span style="font-weight: bold">F8</span> trick and put in <span style="font-weight: bold">-v</span> to see what is going on.</p>
<p>You should be in OSX after the initial register screen. But a few things might not be working, such as ethernet and sound. There might be a way to fix these depending on what you have.</p>
<p><strong>Mouse not working, and other PS2 problems</strong>:</p>
<p>You need PS2 support for these to work. If you&#8217;re lucky these would have already been installed by the DVD, but probably not correctly if they aren&#8217;t working. If not, you have to find them. Look for <strong>ApplePS2Controller.kext</strong> on the internet. To fix them so they work, boot in safe mode by using <strong>F8</strong> then <strong>-x -s</strong>, to get into <strong>Safe Mode. </strong>Now you need to remount your drive in read/write mode. The quickest is to just type</p>
<p><strong>mount /<br />
</strong></p>
<p>Next you need to fix the permissions on the extention. You can do this as follows.<strong> </strong></p>
<p><strong>cd /System/Library/Extensions<br />
chmod -R 755 ApplePS2*</strong></p>
<p>If you installed other extentions do the same for them, such as:</p>
<p><strong>chmod -R 755 AppleAC97Audio.kext</strong></p>
<p>You then need to remove the Extentions cache files:</p>
<p><strong>rm /System/Library/Extentions/Extensions.kextcache<br />
rm /System/Library/Extentions/Extensions.mkext</strong></p>
<p>You can now reboot the system and your mouse, sound, or what ever should be working now.</p>
<p><strong>Fixing the Network:</strong></p>
<p>So you have what you think is a supported card, but it&#8217;s not working? Well it probably is supported, but OSX doesn&#8217;t know that. The following was derived from <a title="kext Patching" href="http://wiki.osx86project.org/wiki/index.php/Hardware_.kext_Patching_List">osx86project</a>. You need to find the PnP device ID for your card. To do that boot into windows and open up the <strong>Device Manager.</strong> Find your Network card, open up the <strong>properties </strong>on it. Click on the <strong>Details</strong> tab. You should have &#8220;Device Instance Id&#8221; selected in the drop down. What you will see is something like PCI\VEN_12AB&#038;DEV_12EF&#038;SUBSYS&#8230; Now what you need is the numbers/letters following VEN and DEV. These are your vender and device ID numbers. You need to join them with the Device ID first. So in this example you would get 0x12EF12AB. Write this number down, as you&#8217;ll need it.</p>
<p>Boot up OSX and open up a terminal window. Type</p>
<p><strong>sudo bash<br />
cd /System/Library/Exensions/IONetworkingFamily.kext/Contents/PlugIns/<br />
ls</strong></p>
<p>Here you should see a list of apple supported cards. If you are luckly one simular to your hardware will be listed in here. The AppleIntel9245XEthernet.kext is for Gigabit internet cards, the other works on Intel Pro 100/VE cards. cd into the <strong>kext </strong>that you will use then into the <strong>Context </strong>subfolder. Open up the Info.plist file with the following command.<br />
<strong>nano Info.plist</strong></p>
<p>Now this is where it will differ depending on what version of OSX you are installing. If you are using 10.4.5, scroll down untill you find <strong>IOPCIMatch</strong>. If you look right below it you will see with a list of number in the format of 0xABCD1234. Other versions of OSX will have these numbers after were it says <strong>Device Name</strong>. These are a list of PnP device id, as you probably guessed. If you can&#8217;t find the above sections, scroll through the file until you can find a list of 8 digit numbers. Remeber that number you wrote down a little bit ago? Add it to the list. Each ID should be seperated by a space. Next remove your Extentions cache files.</p>
<p><strong>rm /System/Library/Extentions/Extensions.kextcache<br />
rm /System/Library/Extentions/Extensions.mkext</strong><br />
Reboot and your card should work now. If it doesn&#8217;t then you added your PnP id to the wrong kext. Undo what you did and try it with a different kext.<strong>Sound you say:</strong></p>
<p>Getting sound to work is a little more involved then ethernet.  Depending on what sound  card you have there are many methods (to the madness) to get it to work.  I had a RealTek ALC861.  The thing about this card is that it uses an intel bus/hub.  So I have to enter the ID&#8217;s for the card and the hub.First off you&#8217;ll need the right kext for your audio card.  Mine happened to be the AppleAzaliaAudio.kext.   Different cards might work with the <span class="searchlite">AppleAC97Sound</span>.kext (or something simular).  What&#8217;s that you say?  You don&#8217;t have these kext?  You&#8217;ll have to google the internet for them then.  I have heard there are torrents out there with these kext files, but havent ever looked or seen them.<br />
Anyway, to get the RealTek card to work I followed the walk through found on here:</p>
<p><a title="http://forum.osx86project.org/index.php?showtopic=1474&#038;st=40 " href="http://forum.osx86project.org/index.php?showtopic=1474&#038;st=40">http://forum.osx86project.org/index.php?showtopic=1474&#038;st=40</a></p>
<p>I had to do a little more mucking around because I had an ICH-7 intel bus insead of a 6.  Where you have to edit this file:</p>
<p><strong>/System/Library/Extensions/AppleAzaliaAudio.kext/Contents/PlugIns/AppleAzaliaController.kext/Contents/Info.plist</strong></p>
<p>I put in a bunch of ID&#8217;s hopeing one would work. You find the section for the ICH-6 bus (yes i know its not ICH-7) and add your pnp ID in there right after <strong>IOPCIPrimaryMatch</strong>.</p>
<p>Now the bigest question I had when doing this was how to find my bus id. In windows I opened up device manager and wrote down ALL the id&#8217;s for the ICH-7 bus. Under &#8216;System devices&#8217; in device manager, you see a buch of IntelÂ® devices with a 4 digit number after then.. such as <strong>244E</strong> or something. Somewhere in the list of Intel devices you&#8217;ll see one like <strong>UAA Audio</strong> something. This would be one you are looking for. Get the Dev ID for it (either by reading the 4 digit number next to it, or properties -> Details). Mine was <strong>27DA</strong> for the UAA device. I also wrote down the ID for the PCI controller (27B9)..</p>
<p>I used these numbers to enter in for the IOPCIPrimaryMatch in the AppleAzaliaController.kext. ie i added <strong>0x27DA8086</strong> and <strong>0x27b98086</strong> onto the list. Removed my extentions cache files and rebooted.</p>
<p>My audio worked after this. I&#8217;m not sure which of the 2 above numbers i actauly needed but i figgured put both in and see if it worked. and it did.</p>
<p><strong>VMware stuff:</strong><br />
If you are going to try to install in VMware, you will need a Virtual CD driver, as the built in ISO support in VMWare will not correctly read mac ISO&#8217;s. You also need to add <strong>paevm=&#8221;true&#8221;</strong> onto the end of the vmware machine configureation file. This enables PAE support. Your host CPU has to have this too. I&#8217;m not sure what VMware does if the hose CPU does have support.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.shimpossible.com/2006/08/02/osx-x86-install-guide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tsk, Tsk for tizzle</title>
		<link>http://blog.shimpossible.com/2006/02/27/tsk-tsk-for-tizzle/</link>
		<comments>http://blog.shimpossible.com/2006/02/27/tsk-tsk-for-tizzle/#comments</comments>
		<pubDate>Mon, 27 Feb 2006 06:54:26 +0000</pubDate>
		<dc:creator>shim</dc:creator>
				<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://blog.shimpossible.com/?p=7</guid>
		<description><![CDATA[Last week I ran across what looked like an interesting program (Tizzle Talk). It translates your IM for you. So I tried it, yeah i know bad idea. I couldnt quiet figgure out how to get it to work, and I mostly use trillion, so I uninstalled it, or so I thought. I opened up [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I ran across what looked like an interesting program (<a target="_blank" href="http://www.tizzletalk.com/">Tizzle Talk</a>).  It translates your IM for you.  So I tried it,  yeah i know bad idea.  I couldnt quiet figgure out how to get it to work, and I mostly use trillion, so I uninstalled it, or so I thought.</p>
<p>I opened up my &#8216;My Documents&#8217; folder today and noticed there were 40+ folders in it.  Ones that I know I didnt put there.   AppPatch, Microsoft.NET, WinSxS, Oracle, System32, Fonts, etc&#8230;   If these wasn&#8217;t weird enough, some folders were listed multiple times.   I didn&#8217;t know NTFS would allow a folder to contain files of the same name.  A quick look at the dates on the folders showed they all were created the same date/time I installed Trizzle talked.  A quick scan of my HD for all files on that date showed them in a bunch of folders.   I had more of these &#8216;ghost&#8217; folders in Windows, Windows\System32, Program Files, Program Files\Common  Document Settings\\.     I&#8217;m not sure what this has to do with trizzle, and why it created all of them, but each folder was empty.  So point of warning to anyone who uses/used trizzle.   You might have a bunch of extra files laying around.</p>
<p>Did i mention it&#8217;s been raining here for the last week&#8230;   lots and lots of rain.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.shimpossible.com/2006/02/27/tsk-tsk-for-tizzle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
