<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7494164</id><updated>2012-01-13T10:38:36.890-07:00</updated><category term='FAQ'/><category term='technical'/><category term='iphone accessories'/><category term='debugging'/><category term='windows-x64'/><category term='apple'/><category term='example'/><category term='graphics'/><category term='sdl'/><category term='ARM'/><category term='xna'/><category term='osx'/><category term='monoxna'/><category term='c64'/><category term='c'/><category term='c#'/><category term='gpl'/><category term='audio'/><category term='iphone'/><category term='xcode'/><category term='tips'/><category term='licensing'/><category term='SID'/><category term='windows'/><category term='asp.net'/><category term='.net'/><category term='sandcastle'/><category term='performance'/><category term='iOS'/><category term='mono'/><category term='o/r mapping'/><category term='utility'/><category term='safari'/><title type='text'>aussie bloke</title><subtitle type='html'>Development on OS X and iOS</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>69</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7494164.post-2878253459317564092</id><published>2011-12-09T23:23:00.001-07:00</published><updated>2011-12-09T23:23:16.903-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xcode'/><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><title type='text'>Xcode 4.1 and 100% CPU usage</title><content type='html'>&lt;p&gt;Still needing to use Xcode 4.1 and find that it slowly consumes 100% CPU over time?  Turns out there is a nasty bug in Xcode when you have WiFi sync enabled on iOS 5.x devices; Xcode continually tries to connect to these devices running the newer iOS and fails.  Abysmally.&lt;/p&gt;&lt;p&gt;All is not lost, and if you install &lt;a href="http://www.culater.net/software/SIMBL/SIMBL.php"&gt;SIMBL&lt;/a&gt;, you can use a &lt;a href="https://github.com/evands/xcodeRemoteDeviceFixer"&gt;nifty plugin&lt;/a&gt; by evands on GitHub.  It only loads itself in Xcode versions ≤ 4.1, and works around the issue.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-2878253459317564092?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/2878253459317564092/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=2878253459317564092' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/2878253459317564092'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/2878253459317564092'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2011/12/xcode-41-and-100-cpu-usage.html' title='Xcode 4.1 and 100% CPU usage'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-8007746842509936291</id><published>2011-12-03T01:33:00.001-07:00</published><updated>2011-12-04T16:23:06.038-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='technical'/><category scheme='http://www.blogger.com/atom/ns#' term='c'/><title type='text'>Constant Confusion</title><content type='html'>&lt;p&gt;The &lt;em&gt;const&lt;/em&gt; keyword in C can be confusing, so I wanted to put down my thoughts for my own benefit and for those looking for some clarity.  In summary, I'm going to advocate you place &lt;em&gt;const&lt;/em&gt; to the right, and read the declaration from right to left.&lt;/p&gt;&lt;h2&gt;What is &lt;em&gt;const&lt;/em&gt;?&lt;/h2&gt;&lt;p&gt;&lt;em&gt;const&lt;/em&gt; is a hint to the C compiler and programmer that a specific declaration or element of a declaration is immutable.  It is more complicated in C++, which is outside the scope of this post.  Lets start with a simple example, and the most common form where &lt;em&gt;const&lt;/em&gt; is written first:&lt;/p&gt;&lt;pre class="brush:c"&gt;const int i = 5;&lt;/pre&gt;&lt;p&gt;The previous statement simply instructs the compiler that &lt;em&gt;i&lt;/em&gt; cannot be changed after its initial declaration, such that the following assignment would result in an error:&lt;/p&gt;&lt;pre class="brush:c"&gt;const int i = 5;
i = 6; // error: read-only variable is not assignable
&lt;/pre&gt;&lt;p&gt;If spoken from right to left, the declaration of &lt;em&gt;i&lt;/em&gt; would read “&lt;em&gt;i &lt;/em&gt;is an integer constant”, which is reasonable enough.  This syntax is still supported for historical reasons.  The alternative and &lt;em&gt;correct&lt;/em&gt; format is to write &lt;em&gt;const&lt;/em&gt; after the type reference, as follows&lt;/p&gt;&lt;pre class="brush:c"&gt;int const i = 5;
i = 6; // error: read-only variable is not assignable
&lt;/pre&gt;&lt;p&gt;which means the same thing; the value of &lt;em&gt;i&lt;/em&gt; must remain constant within its declared scope.  If you read this declaration from right to left, it is spoken as “&lt;em&gt;i&lt;/em&gt; is a constant integer”; much better.&lt;/p&gt;&lt;p&gt;Yet another common definition is an array of constant characters or also known in some circles as an immutable string&lt;/p&gt;&lt;pre class="brush:c"&gt;const char * myString = "hello World";
myString[0] = 'H';        // error: read-only variable is not assignable
myString = "Hello World"; // ok
&lt;/pre&gt;&lt;p&gt;Spoken from right to left, “&lt;em&gt;myString&lt;/em&gt; is a pointer to character constant”, which doesn't read so well.  Switching the &lt;em&gt;const&lt;/em&gt; keyword, we get the following&lt;/p&gt;&lt;pre class="brush:c"&gt;char const * myString = "hello World";
myString[0] = 'H';        // error: read-only variable is not assignable
myString = "Hello World"; // ok&lt;/pre&gt;&lt;p&gt;read aloud, it is “&lt;em&gt;myString&lt;/em&gt; is a pointer to constant characters“; sounds better than the former.&lt;/p&gt;&lt;p&gt;So far &lt;em&gt;const&lt;/em&gt; seems pretty straight forward, and perhaps at this point you're thinking where is the confusion?.  Lets complicate things…  As we've demonstrated, the &lt;em&gt;const&lt;/em&gt; keyword can be placed before or after the type reference in a declaration, which for the previous scenarios is fine.  Let's show a few more examples with pointers:&lt;/p&gt;&lt;pre class="brush:c"&gt;int * const i;&lt;/pre&gt;&lt;p&gt;Declares &lt;em&gt;i&lt;/em&gt; as constant pointer to an integer.  Again, reading from right to left makes it pretty clear what we're dealing with.  The following shows both legal and illegal usages of &lt;em&gt;i&lt;/em&gt;:&lt;/p&gt;&lt;pre class="brush:c"&gt;int j = 5, k = 6;
int * const i = &amp;amp;j; // points to the memory referred to by j
i = &amp;amp;k;             // error: read-only variable is not assignable
*i = 6;             // ok, modifies the value of j
&lt;/pre&gt;&lt;p&gt;Now, because the &lt;em&gt;const&lt;/em&gt; keyword can be placed before or after the type reference, as shown earlier, the following declarations of &lt;em&gt;h&lt;/em&gt; and &lt;em&gt;i&lt;/em&gt;:&lt;/p&gt;&lt;pre class="brush:c"&gt;int j = 5, k = 6;
const int * const h = &amp;amp;j;
int const * const i = &amp;amp;j;
&lt;/pre&gt;&lt;p&gt;result in a variable that is a constant pointer to a constant integer.  Given that, the following lines will result in compiler errors:&lt;/p&gt;&lt;pre class="brush:c"&gt;*h = 5; // error: read-only variable is not assignable
h = &amp;amp;k; // error: read-only variable is not assignable
&lt;/pre&gt;&lt;p&gt;Want to see something confusing?  The following 3 lines are identical, and will compile with current versions of clang and gcc:&lt;/p&gt;&lt;pre class="brush:c"&gt;const int const g = 5;
const int h = 6;
int const i = 7;&lt;/pre&gt;&lt;p&gt;It's not horrible, but lets reintroduce pointers&lt;/p&gt;&lt;pre class="brush:c"&gt;const int const * i;&lt;/pre&gt;&lt;p&gt;What is this? If you had not just read all the above, one would be forgiven for thinking &lt;em&gt;i&lt;/em&gt; is a constant pointer to a constant integer, but in fact both instances of &lt;em&gt;const&lt;/em&gt; refer to the int type; this is a pointer to a constant integer.  The correct definition, as we saw earlier is&lt;/p&gt;&lt;pre class="brush:c"&gt;const int * const i; // or preferably
int const * const i;
&lt;/pre&gt;&lt;p&gt;Worse still is multiple levels of indirection, such as&lt;/p&gt;&lt;pre class="brush:c"&gt;int * * i;&lt;/pre&gt;&lt;p&gt;which when read from right to left declares “&lt;em&gt;i&lt;/em&gt; is a pointer to a pointer of integers”. &lt;em&gt;&lt;/em&gt;A more complicated example using the &lt;em&gt;const&lt;/em&gt; keyword&lt;/p&gt;&lt;pre class="brush:c"&gt;int const * const * const i;&lt;/pre&gt;&lt;p&gt;or “&lt;em&gt;i&lt;/em&gt; is a constant pointer to a constant pointer of constant integers.  &lt;em&gt;Wow&lt;/em&gt;.  All levels of indirection are immutable, so it can only be assigned at its declaration.&lt;/p&gt;&lt;pre class="brush:c"&gt;int j[2][3] = { {1, 2, 3}, {4, 5, 6} };
int const * const * const i = &amp;amp;j; // ok
i = NULL;     // error
i[0] = &amp;amp;j[0]; // error
i[0][0] = 5;  // error&lt;/pre&gt;&lt;p&gt;It's an extreme case, but becomes evident why writing &lt;em&gt;const&lt;/em&gt; to the right is a good habit.  The following declaration of &lt;em&gt;i&lt;/em&gt; may look the same to the untrained eye:&lt;/p&gt;&lt;pre class="brush:c"&gt;int j[2][3] = { {1, 2, 3}, {4, 5, 6} };
const int const * const * i = &amp;amp;j; // ok
i = NULL;     // ok!!
i[0] = &amp;amp;j[0]; // error
i[0][0] = 5;  // error&lt;/pre&gt;&lt;p&gt;however, armed with this knowledge, you (and the compiler) say otherwise.&lt;/p&gt;&lt;p&gt;After all this, you may be asking when might I use the declaration &lt;em&gt;type const * const&lt;/em&gt;?  When possible, I prefer to be explicit, and strings used as constants across compilation units are often declared as&lt;/p&gt;&lt;pre class="brush:c"&gt;char const * kMyConstant = "Hello World";&lt;/pre&gt;&lt;p&gt;and then referred to in a separate object file as&lt;/p&gt;&lt;pre class="brush:c"&gt;extern char const * kMyConstant;&lt;/pre&gt;&lt;p&gt;Whilst modifying the contents of &lt;em&gt;kMyConstant&lt;/em&gt; is prohibited, assigning the pointer &lt;em&gt;kMyConstant&lt;/em&gt; to a new location is possible, as follows&lt;/p&gt;&lt;pre class="brush:c"&gt;extern char const * kMyConstant;
void fn() {
    kMyConstant[0] = 'h'; // error
    kMyConstant = "Hi!";  // now says "Hi!" instead of "Hello World"
}&lt;/pre&gt;&lt;p&gt;Clearly for the majority of situations, this is not what the developer intended.  Changing the declaration to&lt;/p&gt;&lt;pre class="brush:c"&gt;char const * const kMyConstant = "Hello World";&lt;/pre&gt;&lt;p&gt;would also prevent the pointer &lt;em&gt;kMyConstant&lt;/em&gt; from being overwritten.&lt;/p&gt;&lt;h2&gt;In summary&lt;/h2&gt;&lt;p&gt;Always write &lt;em&gt;const&lt;/em&gt; to the right and read the declaration from right to left.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-8007746842509936291?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/8007746842509936291/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=8007746842509936291' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/8007746842509936291'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/8007746842509936291'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2011/12/constant-confusion.html' title='Constant Confusion'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-4294450940309920481</id><published>2011-10-13T15:28:00.001-07:00</published><updated>2011-10-13T15:32:20.432-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='safari'/><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><title type='text'>Google Maps WebGL with Safari 5.1</title><content type='html'>&lt;p&gt;It's possible to use the WebGL version of Google Maps with Safari, if you are willing to roll up your sleeves a little.  Follow these steps to try it out:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Enable the Develop menu by opening Preferences and selecting the Advanced tab; check the &lt;em&gt;Show Develop menu in menu bar&lt;/em&gt; option&lt;br /&gt;&lt;br /&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto;" title="EnableDevelop.png" src="http://lh4.ggpht.com/-Li2z07Nm74E/TpdmBIoAUdI/AAAAAAAAAug/8pfFWzwLrUA/EnableDevelop.png?imgmax=800" border="0" alt="Enable Develop Menu Bar" width="378" height="325" /&gt;&lt;/li&gt;
&lt;li&gt;In the newly enabled Develop menu, enable WebGL:&lt;br /&gt;&lt;br /&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto;" title="EnableWebGL.png" src="http://lh6.ggpht.com/-3JEuYHq7Qsk/TpdmBtm8eJI/AAAAAAAAAuo/EhpegF5m-9Y/EnableWebGL.png?imgmax=800" border="0" alt="Enable WebGL" width="334" height="401" /&gt;&lt;/li&gt;
&lt;li&gt;Set your UserAgent to Other, which is available in the Develop menu and paste in the following user agent string (which will fool Google maps into thinking your browser is Chrome): 
&lt;ul&gt;
&lt;li&gt;
&lt;pre&gt;Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.92 Safari/535.2&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt; Navigate to &lt;a href="http://maps.google.com/gl"&gt;http://maps.google.com/gl&lt;/a&gt; 
&lt;ul&gt;
&lt;li&gt;Down the bottom left you will see an option to try Google Maps with WebGL&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-4294450940309920481?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/4294450940309920481/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=4294450940309920481' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/4294450940309920481'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/4294450940309920481'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2011/10/google-maps-webgl-with-safari-51.html' title='Google Maps WebGL with Safari 5.1'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/-Li2z07Nm74E/TpdmBIoAUdI/AAAAAAAAAug/8pfFWzwLrUA/s72-c/EnableDevelop.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-6872191477461262458</id><published>2011-09-09T22:17:00.001-07:00</published><updated>2011-09-11T15:08:59.100-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='iOS'/><title type='text'>Using your iOS 5 device with Xcode 4.1</title><content type='html'>&lt;p&gt;To enable iOS 5 support in Xcode 4.1, read on.&lt;/p&gt;
&lt;p&gt;You've upgraded one or more devices to iOS 5.0 and try to use Xcode 4.1, only to be told it doesn't recognize the version of the OS.  Why would you care?  Apple has been advising for some time that gcc is going away, and that date may be fast approaching.  Unfortunately, Clang / llvm lack some features available in gcc, such as register assigned local or global variables.  We've only just gained access to a version of Clang that supports C++, and so you may still need some time to migrate your code.&lt;/p&gt;
&lt;p&gt;Assuming Xcode 4.1 is in /Developer and Xcode 4.2 is in /Xcode42, run the following, substituting the appropriate iOS 5 build numbers:&lt;/p&gt;
&lt;pre class="brush:bash"&gt;cd /Developer/Platforms/iPhoneOS.platform/DeviceSupport
ln -s /Xcode42/Platforms/iPhoneOS.platform/DeviceSupport/5.0\ \(9A5313e\)/ 5.0\ \(9A5213e\)&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-6872191477461262458?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/6872191477461262458/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=6872191477461262458' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/6872191477461262458'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/6872191477461262458'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2011/09/using-your-ios-5-device-with-xcode-41.html' title='Using your iOS 5 device with Xcode 4.1'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-1210831909586867039</id><published>2011-08-19T23:26:00.001-07:00</published><updated>2011-08-21T22:28:22.326-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iOS'/><category scheme='http://www.blogger.com/atom/ns#' term='apple'/><title type='text'>iCloud Key-Value is better than a UDID</title><content type='html'>&lt;p&gt;There is a lot of chatter about &lt;a href="http://www.tuaw.com/2011/08/19/ios-5-deprecates-udid-as-identifier-for-developers-but-its-not/"&gt;Apple depreciating the UDID API&lt;/a&gt; and apparently providing no alternative to &lt;em&gt;track a user&lt;/em&gt;.  Firstly, lets clear up how insecure and unreliable using the UDID is for identifying a user, which is tied to the &lt;em&gt;device&lt;/em&gt;.  The user's device could be&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;lost,&lt;/li&gt;
&lt;li&gt;stolen,&lt;/li&gt;
&lt;li&gt;replaced / exchanged,&lt;/li&gt;
&lt;li&gt;sold or &lt;/li&gt;
&lt;li&gt;given away.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That UDID is now potentially in the hands of another individual, even if you remote wipe your device.&lt;/p&gt;
&lt;p&gt;Beginning with iOS 5, Apple is providing a secure service called &lt;a href="http://www.kinlane.com/2011/06/key-value-data-store-in-icloud/"&gt;iCloud Key-Value storage&lt;/a&gt; that will serve as a superior alternative.  iCloud K-V storage offers a limited amount of space in the cloud for a single application &lt;em&gt;or&lt;/em&gt; shared between a suite of applications; either scenario is at the app developer's discretion.  If your application requires access to it's own servers for user-specific information, you can store a unique token in their iCloud K-V store to reunite your application with their data, without them&lt;em&gt; ever having to log in again*&lt;/em&gt; after the initial handshake.  This applies even when the user replaces their device, as the token is stored in the cloud.&lt;/p&gt;
&lt;p&gt;Apparently, Pandora uses the UDID to remember your profile and potentially &lt;a href="http://forums.macrumors.com/showpost.php?p=13211404&amp;amp;postcount=30"&gt;exposes your playlists&lt;/a&gt; if your device falls victim to one of the more dubious fates mentioned above.  Easily solved if you follow a pattern similar to the following sequence diagram:&lt;/p&gt;
&lt;p&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto;" title="cdraw" src="http://www.websequencediagrams.com/cgi-bin/cdraw?lz=cGFydGljaXBhbnQgQXBwIGFzIGEKAAkMaUNsb3VkIGFzIGkACw0iWW91ciBTZXJ2ZXIiIGFzIHMKCmEtPmk6IEdldCDigJxBcHBVc2VyS2V54oCdCmFsdCBGb3VuZAogICAgaS0-YTogUmV0dXJuABsRIHZhbHVlCmVsc2UgTm8AHhlubwAiByAgICBub3RlIHJpZ2h0IG9mIGE6IHBlcmhhcHMgaW5pdGlhdGUgbmV3IHVzZXIgcHJvY2VzcwCBAwVhLT5zOiBHZW5lcgAcCACBKREgICAgcwBsDQATEwCBAAsAgX8GU3RvcmUgIgCBewoiAIFPCG5kAIIkBQBzBXQgcwCCPAUgZGF0YSBmb3IAgicSAHUGU2VuZAAgDAoK&amp;amp;s=modern-blue" border="0" alt="cdraw" /&gt;&lt;/p&gt;
&lt;p&gt;Naturally, you should take the appropriate measures to secure the conversation between your app and your server.&lt;/p&gt;
&lt;p&gt;If you do need to track a specific device, there are ways to &lt;a href="http://stackoverflow.com/questions/677530/how-can-i-programmatically-get-the-mac-address-of-an-iphone"&gt;programmatically obtain&lt;/a&gt; the &lt;a href="http://en.wikipedia.org/wiki/MAC_address"&gt;MAC address&lt;/a&gt;.  Not something I would recommend.&lt;/p&gt;
&lt;p&gt;* Apple is yet to address a significant caveat regarding the lack of multiple Apple IDs under a single iTunes account.  Your iCloud account is your Apple ID, and that implies all your family members must log in to the same account, providing no way to separate users.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-1210831909586867039?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/1210831909586867039/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=1210831909586867039' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/1210831909586867039'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/1210831909586867039'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2011/08/icloud-key-value-is-better-than-udid.html' title='iCloud Key-Value is better than a UDID'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-8061697232774181842</id><published>2011-08-05T17:06:00.001-07:00</published><updated>2011-08-05T17:18:38.902-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><title type='text'>Local (file system) development with Google Chrome</title><content type='html'>&lt;p&gt;If you use Google Chrome for an advanced local file system development on Mac OS X, no doubt you've been frustrated with issues such as security (same origin).  All is not lost, as I've created an application bundle that allows you to launch Chrome from Finder with the following additional command-line switches:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://peter.sh/experiments/chromium-command-line-switches/#disable-web-security"&gt;disable-web-security&lt;/a&gt; 
&lt;ul&gt;
&lt;li&gt;Don't enforce the same-origin policy. (Used by people testing their sites.)&lt;/li&gt;
&lt;li&gt;Example: &lt;a href="http://learnwebgl.com"&gt;http://learnwebgl.com&lt;/a&gt; lessons; much better than having to set up apache&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;&lt;br/&gt;
&lt;li&gt;&lt;a href="http://peter.sh/experiments/chromium-command-line-switches/#allow-file-access-from-files"&gt;allow-file-access-from-files&lt;/a&gt; 
&lt;ul&gt;
&lt;li&gt;By default, file:// URIs cannot read other file:// URIs. This is an override for developers who need the old behavior for testing.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can download the archive from &lt;a href="https://github.com/downloads/scarnie/sgc_general/Google%20Chrome%20Dev.zip"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;div&gt;&lt;/div&gt;
&lt;p&gt;If there are other switches you wish to add, many of which are conveniently documented &lt;a href="http://peter.sh/experiments/chromium-command-line-switches"&gt;here&lt;/a&gt;,&lt;/p&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;RMB and select Show Package Contents and&lt;/li&gt;
&lt;li&gt;edit the shell script in Google Chrome Dev.app/Contents/MacOS&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; &lt;/p&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-8061697232774181842?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/8061697232774181842/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=8061697232774181842' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/8061697232774181842'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/8061697232774181842'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2011/08/local-file-system-development-with.html' title='Local (file system) development with Google Chrome'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-6356494882658943250</id><published>2011-08-03T22:45:00.001-07:00</published><updated>2011-09-21T10:56:57.663-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><title type='text'>Transferring Preview app signatures in Lion</title><content type='html'>&lt;p&gt;Lion introduced a great &lt;a href="http://www.apple.com/macosx/whats-new/features.html#preview"&gt;new feature&lt;/a&gt; that allows you to &lt;a href="http://www.cultofmac.com/you-can-now-sign-pdfs-using-lions-preview-app-screenshots-how-to/100237"&gt;capture your signature&lt;/a&gt; via an attached camera and store it in an encrypted form for later use.  Therein lies the problem; you must have an attached camera.&lt;/p&gt;
&lt;p&gt;I have a Mac Pro, and wanted to use the signatures I captured on my Macbook Pro.  Following these steps, you can transfer the encrypted signatures over.&lt;/p&gt;
&lt;p&gt;On your machine endowed with the power of sight:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Go ahead and capture the signatures in Preview.&lt;/li&gt;
&lt;li&gt;Quit Preview&lt;/li&gt;
&lt;li&gt;Browse to ~/Library/Containers/com.apple.Preview/Data/Library/Preferences 
&lt;ul&gt;
&lt;li&gt;In Finder, click the &lt;em&gt;Go&lt;/em&gt; menu and hold the option (⌥) key to show the Library folder, alternatively&lt;/li&gt;
&lt;li&gt;press ⌘+⇧+G whilst Finder is active and enter the path above to directly navigate&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Copy the&lt;em&gt; &lt;/em&gt;com.apple.Preview.signatures.plist&lt;/li&gt;
&lt;li&gt;Launch Keychain&lt;em&gt; &lt;/em&gt;Access&lt;/li&gt;
&lt;li&gt;Ensure the &lt;em&gt;login&lt;/em&gt; keychain is selected and the &lt;em&gt;Passwords&lt;/em&gt; category&lt;br /&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto;" title="Keychain-Preview-Password.png" src="http://lh3.ggpht.com/-z8tRB-j6kdo/Tjov5yUdYZI/AAAAAAAAAqE/OKZt52E80_Q/Keychain-Preview-Password.png?imgmax=800" border="0" alt="Copying Preview signatures password from keychain" width="600" height="517" /&gt; &lt;/li&gt;
&lt;li&gt;Right-click the &lt;em&gt;Preview Signature Privacy&lt;/em&gt; password and select Copy Password to Clipboard.  This is the password used to encrypt the signature images.&lt;/li&gt;
&lt;li&gt;Paste it into a text editor and save the file.  You'll need to transfer this to your other computer(s)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;On your machine you wish to transfer the signatures to:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;If you haven't already, launch Preview, open preferences, and select the Signatures tab to ensure the default configuration files and folders have been created.  Exit Preview.&lt;/li&gt;
&lt;li&gt;Browse to ~/Library/Containers/com.apple.Preview/Data/Library/Preferences&lt;/li&gt;
&lt;li&gt;Copy the&lt;em&gt; &lt;/em&gt;com.apple.Preview.signatures.plist to the folder, overwriting any existing file&lt;/li&gt;
&lt;li&gt;Launch Keychain&lt;em&gt; &lt;/em&gt;Access&lt;/li&gt;
&lt;li&gt;Locate the &lt;em&gt;Preview Signature Privacy&lt;/em&gt; password in the &lt;em&gt;login&lt;/em&gt; keychain and double click to edit&lt;br /&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto;" title="Replace Preview Signature Privacy password dialog.png" src="http://lh3.ggpht.com/-BB6bmWMvymU/TjoxoHRQJeI/AAAAAAAAAqM/pdQcMbIt4o8/Replace%252520Preview%252520Signature%252520Privacy%252520password%252520dialog.png?imgmax=800" border="0" alt="Replace the Preview Signature Password" width="600" height="426" /&gt;&lt;/li&gt;
&lt;li&gt;Click the &lt;em&gt;Show password&lt;/em&gt; checkbox and paste the password you copied from your original machine.&lt;/li&gt;
&lt;li&gt;Click &lt;em&gt;Save Changes&lt;/em&gt; and you're done&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-6356494882658943250?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/6356494882658943250/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=6356494882658943250' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/6356494882658943250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/6356494882658943250'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2011/08/transferring-preview-app-signatures-in.html' title='Transferring Preview app signatures in Lion'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/-z8tRB-j6kdo/Tjov5yUdYZI/AAAAAAAAAqE/OKZt52E80_Q/s72-c/Keychain-Preview-Password.png?imgmax=800' height='72' width='72'/><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-1540545441750014967</id><published>2011-04-09T21:44:00.001-07:00</published><updated>2011-04-10T01:31:03.125-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><category scheme='http://www.blogger.com/atom/ns#' term='utility'/><title type='text'>Eval Expression service for OS X</title><content type='html'>&lt;p&gt;&lt;strong&gt;Eval Expression&lt;/strong&gt; is a Mac OS X service to evaluate the selected text of any text field as a Ruby expression.  My instinct was to choose Perl, however Ruby offers binary in addition to decimal, hex and octal numerical literals.  The service becomes infinitely more useful if you assign it a global shortcut in Keyboard preferences.  In my case I assigned a combination that seemed obvious, ⌘=&lt;/p&gt;&lt;p&gt;&lt;img style="display: block; margin-left: auto; margin-right: auto;" src="http://lh5.ggpht.com/_WTgxY9AxbJk/TaE1i0ngklI/AAAAAAAAAnU/yDUu3uOqs9Y/Keyboard%20preferences.png?imgmax=800" border="0" alt="Keyboard preferences" width="600" height="543" /&gt;&lt;/p&gt;&lt;p&gt;It came about as I was working on some layout in Xcode 4 / Interface Builder, and needed to adjust the Y position of a view by a specific number of units.  I'm lazy, and figured the computer should do the work, so I typed 768-35 and tabbed out.  Unlike Acorn and Opacity, which evaluates the expression in numerical entries automatically, Xcode simply complained.  Not happy, I created this service and it works like a charm.  Some examples:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;768-35 ⌘= 733 
&lt;ul&gt;&lt;li&gt;calculator&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;0b11010 ⌘= 26 
&lt;ul&gt;&lt;li&gt;conversion to decimal&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;0x1f.to_s(2) ⌘= 11111 
&lt;ul&gt;&lt;li&gt;hex to binary&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;2**3 ⌘= 8 
&lt;ul&gt;&lt;li&gt;exponent&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;(0x8000 | 0xf1).to_s(16) ⌘= 80f1&lt;/li&gt;&lt;li&gt;"-+" * 5 ⌘= -+-+-+-+-+ 
&lt;ul&gt;&lt;li&gt;expansion&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Array(1..15).join ',' ⌘= 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 
&lt;ul&gt;&lt;li&gt;lists&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;Download the Automator zip file from &lt;a href="https://github.com/downloads/scarnie/sgc_general/Eval%20Expression.zip"&gt;github&lt;/a&gt;, unzip and install to your ~/Library/Services folder.&lt;/p&gt;&lt;p&gt;A quick video of the service in action (note that I'm using my ⌘= shortcut to evaluate within Mars Edit):&lt;/p&gt;&lt;p&gt;&lt;object type="application/futuresplash" width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/K-gP9ToAPTU?hl=en&amp;amp;fs=1" /&gt;&lt;param name="allowFullScreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;embed type="application/futuresplash" width="425" height="344" src="http://www.youtube.com/v/K-gP9ToAPTU?hl=en&amp;amp;fs=1" allowscriptaccess="always" allowfullscreen="true"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-1540545441750014967?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/1540545441750014967/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=1540545441750014967' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/1540545441750014967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/1540545441750014967'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2011/04/eval-expression-service-for-os-x.html' title='Eval Expression service for OS X'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_WTgxY9AxbJk/TaE1i0ngklI/AAAAAAAAAnU/yDUu3uOqs9Y/s72-c/Keyboard%20preferences.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-4770806082389548795</id><published>2011-03-17T15:12:00.001-07:00</published><updated>2011-03-17T16:24:45.191-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iOS'/><title type='text'>Mobile Safari performance and executable pages in iOS 4.3</title><content type='html'>&lt;p&gt;DaringFireball recently posted &lt;a href="http://daringfireball.net/2011/03/nitro_ios_43"&gt;his thoughts&lt;/a&gt; as to why the Javascript performance of Mobile Safari is faster than those launched from SpringBoard or within existing applications which use a UIWebView.  I don't think it's quite that complicated.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: tahoma, sans-serif;"&gt;My thoughts are it is one of two things:&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: tahoma, sans-serif;"&gt;Apple is concerned about security (which would support John's theory)&lt;/span&gt; 
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: tahoma, sans-serif;"&gt;Mobile Safari is binding to a newer and/or private version of Webkit, and Springboard was an oversight&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: tahoma, sans-serif;"&gt;Apple is concerned about breaking existing applications&lt;/span&gt; 
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: tahoma, sans-serif;"&gt;I would argue this makes the most sense, and was probably a very deliberate action by Apple, given enabling Nitro is a significant enough change to a core framework that could break existing applications.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: tahoma, sans-serif;"&gt; &lt;/span&gt;&lt;span style="font-family: tahoma, sans-serif;"&gt;Perhaps a future update will allow developers to &lt;em&gt;opt-in&lt;/em&gt; to the faster Javascript engine either via a plist setting or more likely, a new API on the UIWebView class.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: tahoma, sans-serif;"&gt;Would also explain the oversight in Springboard, if it was not opted in.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There are other implications for allowing 3rd parties to use Nitro, most importantly &lt;em&gt;battery life. &lt;/em&gt; If Javascript executes up to 3x faster, the CPU is running 3x less to to execute equivalent Javascript, allowing the CPU to go to low power mode faster.&lt;/p&gt;
&lt;p&gt;Gruber also makes the following statement:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Apple, as of iOS 4.3, trusts Mobile Safari enough to allow this. The upside is that Mobile Safari is now significantly faster. The downside is that any security exploits against Mobile Safari now potentially allow worse things to happen than before.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I would disagree, as many of the previous Jailbreak exploits in iOS such as &lt;a href="http://daringfireball.net/linked/2010/08/02/jailbreakme"&gt;this example&lt;/a&gt; were via Mobile Safari, without a JIT engine, simply exploiting the stack and other typical attacks to &lt;em&gt;elevate privileges&lt;/em&gt;.  As Apple continues to get a handle on these &lt;em&gt;security &lt;/em&gt;issues, running dynamic code shouldn't be a problem.&lt;/p&gt;
&lt;ul&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2&gt;&lt;span style="font-family: tahoma, sans-serif;"&gt;What is my basis for this assumption?&lt;/span&gt;&lt;/h2&gt;
&lt;div&gt;&lt;span style="font-family: tahoma, sans-serif;"&gt;A few weeks ago, when I heard Apple's announcement that Nitro was coming to 4.3, I immediately had to retest some scenarios that were not previously supported on iOS.  Prior to iOS 4.3, calling the mprotect function and attempting to set the PROT_EXEC flag, marking the page as executable would &lt;/span&gt;&lt;span style="font-family: tahoma, sans-serif;"&gt;&lt;em&gt;fail &lt;/em&gt;&lt;/span&gt;&lt;span style="font-family: tahoma, sans-serif;"&gt;when run on the device&lt;/span&gt;&lt;span style="font-family: tahoma, sans-serif;"&gt;&lt;em&gt;. &lt;/em&gt;&lt;/span&gt;&lt;span style="font-family: tahoma, sans-serif;"&gt;Quite simply, the API would return an error code.  This suggested that likely something in the kernel was locked down or this API had specific code to disallow pages to be marked as executable.  Knowing that the Nitro engine must execute in user space or it would be a serious hack in iOS, Apple had to enable support for executable pages.  I went ahead and &lt;/span&gt;&lt;span style="font-family: tahoma, sans-serif;"&gt;&lt;a href="https://gist.github.com/855607"&gt;created an example&lt;/a&gt;&lt;/span&gt;&lt;span style="font-family: tahoma, sans-serif;"&gt;, ran it on my iPhone 4 and viola!  Essentially this example creates an 'increment' function in 32-bit ARM on the fly that adds one to the parameter and returns the result.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: tahoma, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: tahoma, sans-serif;"&gt;I &lt;a href="https://twitter.com/stuartcarnie/status/43762981863034880"&gt;responded&lt;/a&gt; to Miguel de Icaza's &lt;a href="https://twitter.com/migueldeicaza/status/43127184440836096"&gt;tweet&lt;/a&gt;, who also wondered it might now be possible.  Further discussions with &lt;/span&gt;&lt;span style="font-family: tahoma, sans-serif;"&gt;Miguel also &lt;a href="https://twitter.com/migueldeicaza/status/48517553395466240"&gt;identified&lt;/a&gt; that Apple has only partially opened up executable page support, whereby pages can either be read/write or read/execute.  Unfortunately the majority of existing JIT engines expect RWX in order to patch executable pages without the need to change the state from rx » rw, patch code and then rw » rx.  Critical in multi-threaded scenarios, as code could conceivably jump to a page that was being patched and fault due to the absence of the execute flag.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: tahoma, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-4770806082389548795?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/4770806082389548795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=4770806082389548795' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/4770806082389548795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/4770806082389548795'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2011/03/executable-pages-in-ios-43.html' title='Mobile Safari performance and executable pages in iOS 4.3'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-3212926942043678591</id><published>2011-02-02T16:30:00.001-07:00</published><updated>2011-02-02T19:12:14.773-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iOS'/><category scheme='http://www.blogger.com/atom/ns#' term='apple'/><title type='text'>Renew Apple developer certificates with OpenSSL</title><content type='html'>&lt;p&gt;I like to reuse the same private keys when generating a signing request to renew my Apple developer certificates.  Unfortunately you can't do this with Keychain Access, as it won't save the signing request file after you step through the wizard.  OpenSSL is your friend.&lt;/p&gt;
&lt;p&gt;Open Keychain Access, RMB on the key your wish to use and click &lt;em&gt;Export "[Key Name]"&lt;/em&gt;.  Save it as a .p12 file with a strong password.  In my case it was StuartCarnie.p12.&lt;/p&gt;
&lt;p&gt;Open a terminal session and convert the .p12 to a PEM with the following command&lt;/p&gt;
&lt;pre class="brush: bash"&gt;openssl pkcs12 -in StuartCarnie.p12 -out StuartCarnie.pem&lt;/pre&gt;
&lt;p&gt;You will be prompted  for your .p12 password, and also a password to encrypt your .pem.&lt;/p&gt;
&lt;p&gt;Now generate the signing request with the following command.&lt;/p&gt;
&lt;pre class="brush: bash"&gt;openssl req -new -key StuartCarnie.pem -out StuartCarnie.csr&lt;/pre&gt;
&lt;p&gt;You'll be prompted for a few questions to place in the signing request, such as the country, etc.  At the very least, enter the Common Name (your name) and Email Address.  One you've completed this step, the .csr file can be submitted to Apple.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-3212926942043678591?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/3212926942043678591/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=3212926942043678591' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/3212926942043678591'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/3212926942043678591'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2011/02/renew-apple-developer-certificates-with.html' title='Renew Apple developer certificates with OpenSSL'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-4509904836163591318</id><published>2010-04-12T21:25:00.001-07:00</published><updated>2010-04-12T21:25:14.611-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>iPhone Templates in Google Docs</title><content type='html'>&lt;p&gt;I have created a set of iPhone UI templates using Google Docs Drawings for sharing / collaborating layout ideas. &amp;nbsp;You can access the template &lt;a href="http://bit.ly/aVaKqA"&gt;here&lt;/a&gt;. &amp;nbsp;If you are logged in to your Google account, create a copy by selecting the File menu.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-4509904836163591318?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/4509904836163591318/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=4509904836163591318' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/4509904836163591318'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/4509904836163591318'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2010/04/iphone-templates-in-google-docs.html' title='iPhone Templates in Google Docs'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-4916118108614568746</id><published>2010-01-24T22:58:00.002-07:00</published><updated>2010-07-07T02:17:48.484-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='ARM'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>Micro-benchmarking 2nd / 3rd gen iPhones and iPad</title><content type='html'>&lt;strong&gt;Update:&lt;/strong&gt; Added iPhone 4, iPad 1&lt;sup&gt;st&lt;/sup&gt; gen.&lt;br /&gt;
I follow the excellent &lt;a href="http://www.mikeash.com/?page=pyblog/"&gt;weekly posts&lt;/a&gt; by Mike Ash, and &lt;a href="http://www.mikeash.com/?page=pyblog/friday-qa-2010-01-22-toll-free-bridging-internals.html#comment-fe3facc8db943d179b5c670f0da3be68"&gt;entered a brief discussion&lt;/a&gt; in comments about toll free bridging. &amp;nbsp;In particular, the difference between calling a method via Objective-C (objc_msgSend) and it's equivalent CoreFoundation C call. &amp;nbsp;Mike suggested adding it to &lt;a href="http://mikeash.com/?page=pyblog/performance-comparisons-of-common-operations-iphone-edition.html"&gt;his original&lt;/a&gt; suite of tests, which lead to the following results.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;iPhone 4 (-fthumb)&lt;/h2&gt;&lt;h3&gt;Apple A4 ARM Cortex A8 ~800MHz&lt;/h3&gt;&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Name&lt;/td&gt;&lt;td&gt;Iterations&lt;/td&gt;&lt;td&gt;Total time (sec)&lt;/td&gt;&lt;td&gt;Time per (ns)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;IMP-cached message send&lt;/td&gt;&lt;td&gt;100000000&lt;/td&gt;&lt;td&gt;0.9&lt;/td&gt;&lt;td&gt;9.0&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;C++ virtual method call&lt;/td&gt;&lt;td&gt;100000000&lt;/td&gt;&lt;td&gt;1.0&lt;/td&gt;&lt;td&gt;10.2&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;16 byte memcpy&lt;/td&gt;&lt;td&gt;10000000&lt;/td&gt;&lt;td&gt;0.4&lt;/td&gt;&lt;td&gt;36.2&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Integer division&lt;/td&gt;&lt;td&gt;100000000&lt;/td&gt;&lt;td&gt;4.1&lt;/td&gt;&lt;td&gt;40.6&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Objective-C message send&lt;/td&gt;&lt;td&gt;100000000&lt;/td&gt;&lt;td&gt;4.1&lt;/td&gt;&lt;td&gt;40.8&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Floating-point division&lt;/td&gt;&lt;td&gt;10000000&lt;/td&gt;&lt;td&gt;0.9&lt;/td&gt;&lt;td&gt;89.4&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Objective-C objectAtIndex:&lt;/td&gt;&lt;td&gt;10000000&lt;/td&gt;&lt;td&gt;1.1&lt;/td&gt;&lt;td&gt;105.8&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Float division with int conversion&lt;/td&gt;&lt;td&gt;10000000&lt;/td&gt;&lt;td&gt;1.1&lt;/td&gt;&lt;td&gt;105.8&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;CF CFArrayGetValueAtIndex&lt;/td&gt;&lt;td&gt;10000000&lt;/td&gt;&lt;td&gt;1.7&lt;/td&gt;&lt;td&gt;168.1&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;NSInvocation message send&lt;/td&gt;&lt;td&gt;100000&lt;/td&gt;&lt;td&gt;0.1&lt;/td&gt;&lt;td&gt;550.8&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;16 byte malloc/free&lt;/td&gt;&lt;td&gt;10000000&lt;/td&gt;&lt;td&gt;6.6&lt;/td&gt;&lt;td&gt;656.3&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;NSAutoreleasePool alloc/init/release&lt;/td&gt;&lt;td&gt;100000&lt;/td&gt;&lt;td&gt;0.1&lt;/td&gt;&lt;td&gt;979.5&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;NSObject alloc/init/release&lt;/td&gt;&lt;td&gt;100000&lt;/td&gt;&lt;td&gt;0.4&lt;/td&gt;&lt;td&gt;4277.9&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;16MB malloc/free&lt;/td&gt;&lt;td&gt;1000&lt;/td&gt;&lt;td&gt;0.0&lt;/td&gt;&lt;td&gt;20406.7&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;pthread create/join&lt;/td&gt;&lt;td&gt;100&lt;/td&gt;&lt;td&gt;0.0&lt;/td&gt;&lt;td&gt;139971.2&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Zero-second delayed perform&lt;/td&gt;&lt;td&gt;1000&lt;/td&gt;&lt;td&gt;0.2&lt;/td&gt;&lt;td&gt;243883.3&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;1MB memcpy&lt;/td&gt;&lt;td&gt;100&lt;/td&gt;&lt;td&gt;0.1&lt;/td&gt;&lt;td&gt;1150657.9&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;h2&gt;iPhone 3GS (-fthumb)&lt;/h2&gt;&lt;h3&gt;ARM Cortex A8 ~600MHz / 1.66 ns per cycle&lt;/h3&gt;&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Name&lt;/td&gt;&lt;td&gt;Iterations&lt;/td&gt;&lt;td&gt;Total time (sec)&lt;/td&gt;&lt;td&gt;Time per (ns)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;IMP-cached message send&lt;/td&gt;&lt;td&gt;100000000&lt;/td&gt;&lt;td&gt;1.2&lt;/td&gt;&lt;td&gt;11.7&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;C++ virtual method call&lt;/td&gt;&lt;td&gt;100000000&lt;/td&gt;&lt;td&gt;1.3&lt;/td&gt;&lt;td&gt;13.5&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;16 byte memcpy&lt;/td&gt;&lt;td&gt;10000000&lt;/td&gt;&lt;td&gt;0.5&lt;/td&gt;&lt;td&gt;46.0&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Objective-C message send&lt;/td&gt;&lt;td&gt;100000000&lt;/td&gt;&lt;td&gt;5.4&lt;/td&gt;&lt;td&gt;53.9&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Integer division&lt;/td&gt;&lt;td&gt;100000000&lt;/td&gt;&lt;td&gt;6.3&lt;/td&gt;&lt;td&gt;62.9&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Floating-point division&lt;/td&gt;&lt;td&gt;10000000&lt;/td&gt;&lt;td&gt;1.2&lt;/td&gt;&lt;td&gt;117.4&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Float division with int conversion&lt;/td&gt;&lt;td&gt;10000000&lt;/td&gt;&lt;td&gt;1.4&lt;/td&gt;&lt;td&gt;138.2&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Objective-C objectAtIndex:&lt;/td&gt;&lt;td&gt;10000000&lt;/td&gt;&lt;td&gt;1.4&lt;/td&gt;&lt;td&gt;140.1&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;CF CFArrayGetValueAtIndex&lt;/td&gt;&lt;td&gt;10000000&lt;/td&gt;&lt;td&gt;2.2&lt;/td&gt;&lt;td&gt;220.0&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;16 byte malloc/free&lt;/td&gt;&lt;td&gt;10000000&lt;/td&gt;&lt;td&gt;6.4&lt;/td&gt;&lt;td&gt;642.6&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;NSInvocation message send&lt;/td&gt;&lt;td&gt;100000&lt;/td&gt;&lt;td&gt;0.1&lt;/td&gt;&lt;td&gt;723.0&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;NSAutoreleasePool alloc/init/release&lt;/td&gt;&lt;td&gt;100000&lt;/td&gt;&lt;td&gt;0.1&lt;/td&gt;&lt;td&gt;1305.9&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;NSObject alloc/init/release&lt;/td&gt;&lt;td&gt;100000&lt;/td&gt;&lt;td&gt;0.6&lt;/td&gt;&lt;td&gt;5743.7&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;16MB malloc/free&lt;/td&gt;&lt;td&gt;1000&lt;/td&gt;&lt;td&gt;0.0&lt;/td&gt;&lt;td&gt;16104.0&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;pthread create/join&lt;/td&gt;&lt;td&gt;100&lt;/td&gt;&lt;td&gt;0.0&lt;/td&gt;&lt;td&gt;185759.2&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Zero-second delayed perform&lt;/td&gt;&lt;td&gt;1000&lt;/td&gt;&lt;td&gt;0.4&lt;/td&gt;&lt;td&gt;353519.4&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;1MB memcpy&lt;/td&gt;&lt;td&gt;100&lt;/td&gt;&lt;td&gt;0.2&lt;/td&gt;&lt;td&gt;2170179.2&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;h2&gt;iPhone 3GS (no thumb)&lt;/h2&gt;&lt;h3&gt;ARM Cortex A8 ~600MHz / 1.66 ns per cycle&lt;/h3&gt;&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Name&lt;/td&gt;&lt;td&gt;Iterations&lt;/td&gt;&lt;td&gt;Total time (sec)&lt;/td&gt;&lt;td&gt;Time per (ns)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;IMP-cached message send&lt;/td&gt;&lt;td&gt;100000000&lt;/td&gt;&lt;td&gt;1.2&lt;/td&gt;&lt;td&gt;11.8&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;C++ virtual method call&lt;/td&gt;&lt;td&gt;100000000&lt;/td&gt;&lt;td&gt;4.3&lt;/td&gt;&lt;td&gt;42.9&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Objective-C message send&lt;/td&gt;&lt;td&gt;100000000&lt;/td&gt;&lt;td&gt;5.9&lt;/td&gt;&lt;td&gt;59.2&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;CF CFArrayGetValueAtIndex&lt;/td&gt;&lt;td&gt;10000000&lt;/td&gt;&lt;td&gt;1.0&lt;/td&gt;&lt;td&gt;97.9&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Integer division&lt;/td&gt;&lt;td&gt;100000000&lt;/td&gt;&lt;td&gt;9.8&lt;/td&gt;&lt;td&gt;98.4&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;16 byte memcpy&lt;/td&gt;&lt;td&gt;10000000&lt;/td&gt;&lt;td&gt;1.1&lt;/td&gt;&lt;td&gt;109.3&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Floating-point division&lt;/td&gt;&lt;td&gt;10000000&lt;/td&gt;&lt;td&gt;1.2&lt;/td&gt;&lt;td&gt;118.5&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Objective-C objectAtIndex:&lt;/td&gt;&lt;td&gt;10000000&lt;/td&gt;&lt;td&gt;1.3&lt;/td&gt;&lt;td&gt;129.0&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Float division with int conversion&lt;/td&gt;&lt;td&gt;10000000&lt;/td&gt;&lt;td&gt;1.4&lt;/td&gt;&lt;td&gt;142.6&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;16 byte malloc/free&lt;/td&gt;&lt;td&gt;10000000&lt;/td&gt;&lt;td&gt;7.5&lt;/td&gt;&lt;td&gt;748.6&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;NSInvocation message send&lt;/td&gt;&lt;td&gt;100000&lt;/td&gt;&lt;td&gt;0.1&lt;/td&gt;&lt;td&gt;806.0&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;NSObject alloc/init/release&lt;/td&gt;&lt;td&gt;100000&lt;/td&gt;&lt;td&gt;0.5&lt;/td&gt;&lt;td&gt;4793.1&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;NSAutoreleasePool alloc/init/release&lt;/td&gt;&lt;td&gt;100000&lt;/td&gt;&lt;td&gt;0.5&lt;/td&gt;&lt;td&gt;4953.1&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;16MB malloc/free&lt;/td&gt;&lt;td&gt;1000&lt;/td&gt;&lt;td&gt;0.0&lt;/td&gt;&lt;td&gt;17969.2&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Zero-second delayed perform&lt;/td&gt;&lt;td&gt;1000&lt;/td&gt;&lt;td&gt;0.2&lt;/td&gt;&lt;td&gt;211840.4&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;pthread create/join&lt;/td&gt;&lt;td&gt;100&lt;/td&gt;&lt;td&gt;0.0&lt;/td&gt;&lt;td&gt;214742.5&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;1MB memcpy&lt;/td&gt;&lt;td&gt;100&lt;/td&gt;&lt;td&gt;0.3&lt;/td&gt;&lt;td&gt;3162774.6&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;h2&gt;iPhone 3G&lt;/h2&gt;&lt;h3&gt;ARM1176 ~412MHz / 2.4ns per cycle&lt;/h3&gt;&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Name&lt;/td&gt;&lt;td&gt;Iterations&lt;/td&gt;&lt;td&gt;Total time (sec)&lt;/td&gt;&lt;td&gt;Time per (ns)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;IMP-cached message send&lt;/td&gt;&lt;td&gt;100000000&lt;/td&gt;&lt;td&gt;3.9&lt;/td&gt;&lt;td&gt;38.6&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;C++ virtual method call&lt;/td&gt;&lt;td&gt;100000000&lt;/td&gt;&lt;td&gt;5.0&lt;/td&gt;&lt;td&gt;49.9&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Floating-point division&lt;/td&gt;&lt;td&gt;10000000&lt;/td&gt;&lt;td&gt;0.8&lt;/td&gt;&lt;td&gt;81.3&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Float division with int conversion&lt;/td&gt;&lt;td&gt;10000000&lt;/td&gt;&lt;td&gt;0.8&lt;/td&gt;&lt;td&gt;81.4&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;16 byte memcpy&lt;/td&gt;&lt;td&gt;10000000&lt;/td&gt;&lt;td&gt;1.4&lt;/td&gt;&lt;td&gt;136.0&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Objective-C message send&lt;/td&gt;&lt;td&gt;100000000&lt;/td&gt;&lt;td&gt;14.9&lt;/td&gt;&lt;td&gt;148.6&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Integer division&lt;/td&gt;&lt;td&gt;100000000&lt;/td&gt;&lt;td&gt;16.2&lt;/td&gt;&lt;td&gt;162.2&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;CF CFArrayGetValueAtIndex&lt;/td&gt;&lt;td&gt;10000000&lt;/td&gt;&lt;td&gt;2.0&lt;/td&gt;&lt;td&gt;201.7&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Objective-C objectAtIndex:&lt;/td&gt;&lt;td&gt;10000000&lt;/td&gt;&lt;td&gt;4.2&lt;/td&gt;&lt;td&gt;418.3&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;NSInvocation message send&lt;/td&gt;&lt;td&gt;100000&lt;/td&gt;&lt;td&gt;0.2&lt;/td&gt;&lt;td&gt;1833.2&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;16 byte malloc/free&lt;/td&gt;&lt;td&gt;10000000&lt;/td&gt;&lt;td&gt;27.3&lt;/td&gt;&lt;td&gt;2729.8&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;NSObject alloc/init/release&lt;/td&gt;&lt;td&gt;100000&lt;/td&gt;&lt;td&gt;1.4&lt;/td&gt;&lt;td&gt;14179.1&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;NSAutoreleasePool alloc/init/release&lt;/td&gt;&lt;td&gt;100000&lt;/td&gt;&lt;td&gt;1.9&lt;/td&gt;&lt;td&gt;18956.7&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;16MB malloc/free&lt;/td&gt;&lt;td&gt;1000&lt;/td&gt;&lt;td&gt;0.0&lt;/td&gt;&lt;td&gt;47811.3&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Zero-second delayed perform&lt;/td&gt;&lt;td&gt;1000&lt;/td&gt;&lt;td&gt;0.8&lt;/td&gt;&lt;td&gt;803419.3&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;pthread create/join&lt;/td&gt;&lt;td&gt;100&lt;/td&gt;&lt;td&gt;0.1&lt;/td&gt;&lt;td&gt;1085830.0&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;1MB memcpy&lt;/td&gt;&lt;td&gt;100&lt;/td&gt;&lt;td&gt;1.0&lt;/td&gt;&lt;td&gt;9902796.7&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;h2&gt;iPad (-fthumb)&lt;/h2&gt;&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Name&lt;/td&gt;&lt;td&gt;Iterations&lt;/td&gt;&lt;td&gt;Total time (sec)&lt;/td&gt;&lt;td&gt;Time per (ns)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;IMP-cached message send&lt;/td&gt;&lt;td&gt;100000000&lt;/td&gt;&lt;td&gt;0.7&lt;/td&gt;&lt;td&gt;7.1&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;C++ virtual method call&lt;/td&gt;&lt;td&gt;100000000&lt;/td&gt;&lt;td&gt;0.8&lt;/td&gt;&lt;td&gt;8.1&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;16 byte memcpy&lt;/td&gt;&lt;td&gt;10000000&lt;/td&gt;&lt;td&gt;0.3&lt;/td&gt;&lt;td&gt;27.7&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Objective-C message send&lt;/td&gt;&lt;td&gt;100000000&lt;/td&gt;&lt;td&gt;3.2&lt;/td&gt;&lt;td&gt;32.3&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Integer division&lt;/td&gt;&lt;td&gt;100000000&lt;/td&gt;&lt;td&gt;3.4&lt;/td&gt;&lt;td&gt;33.7&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;CF CFArrayGetValueAtIndex&lt;/td&gt;&lt;td&gt;10000000&lt;/td&gt;&lt;td&gt;0.6&lt;/td&gt;&lt;td&gt;58.8&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Floating-point division&lt;/td&gt;&lt;td&gt;10000000&lt;/td&gt;&lt;td&gt;0.7&lt;/td&gt;&lt;td&gt;70.5&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Objective-C objectAtIndex:&lt;/td&gt;&lt;td&gt;10000000&lt;/td&gt;&lt;td&gt;0.8&lt;/td&gt;&lt;td&gt;81.6&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Float division with int conversion&lt;/td&gt;&lt;td&gt;10000000&lt;/td&gt;&lt;td&gt;0.8&lt;/td&gt;&lt;td&gt;83.1&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;16 byte malloc/free&lt;/td&gt;&lt;td&gt;10000000&lt;/td&gt;&lt;td&gt;3.6&lt;/td&gt;&lt;td&gt;357.8&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;NSInvocation message send&lt;/td&gt;&lt;td&gt;100000&lt;/td&gt;&lt;td&gt;0.0&lt;/td&gt;&lt;td&gt;470.8&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;NSAutoreleasePool alloc/init/release&lt;/td&gt;&lt;td&gt;100000&lt;/td&gt;&lt;td&gt;0.3&lt;/td&gt;&lt;td&gt;2957.0&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;NSObject alloc/init/release&lt;/td&gt;&lt;td&gt;100000&lt;/td&gt;&lt;td&gt;0.3&lt;/td&gt;&lt;td&gt;3080.2&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;16MB malloc/free&lt;/td&gt;&lt;td&gt;1000&lt;/td&gt;&lt;td&gt;0.0&lt;/td&gt;&lt;td&gt;14824.2&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;pthread create/join&lt;/td&gt;&lt;td&gt;100&lt;/td&gt;&lt;td&gt;0.0&lt;/td&gt;&lt;td&gt;127386.2&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Zero-second delayed perform&lt;/td&gt;&lt;td&gt;1000&lt;/td&gt;&lt;td&gt;0.2&lt;/td&gt;&lt;td&gt;225271.3&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;1MB memcpy&lt;/td&gt;&lt;td&gt;100&lt;/td&gt;&lt;td&gt;0.1&lt;/td&gt;&lt;td&gt;1064566.2&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;h2&gt;iPad (-fno-thumb)&lt;/h2&gt;&lt;h3&gt;Apple A4 ARM Cortex A8 ~1GHz / 1 ns per cycle&lt;/h3&gt;&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Name&lt;/td&gt;&lt;td&gt;Iterations&lt;/td&gt;&lt;td&gt;Total time (sec)&lt;/td&gt;&lt;td&gt;Time per (ns)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;IMP-cached message send&lt;/td&gt;&lt;td&gt;100000000&lt;/td&gt;&lt;td&gt;0.8&lt;/td&gt;&lt;td&gt;8.1&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;C++ virtual method call&lt;/td&gt;&lt;td&gt;100000000&lt;/td&gt;&lt;td&gt;2.2&lt;/td&gt;&lt;td&gt;21.8&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;16 byte memcpy&lt;/td&gt;&lt;td&gt;10000000&lt;/td&gt;&lt;td&gt;0.3&lt;/td&gt;&lt;td&gt;28.2&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Objective-C message send&lt;/td&gt;&lt;td&gt;100000000&lt;/td&gt;&lt;td&gt;3.2&lt;/td&gt;&lt;td&gt;32.5&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Integer division&lt;/td&gt;&lt;td&gt;100000000&lt;/td&gt;&lt;td&gt;3.4&lt;/td&gt;&lt;td&gt;33.9&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;CF CFArrayGetValueAtIndex&lt;/td&gt;&lt;td&gt;10000000&lt;/td&gt;&lt;td&gt;0.6&lt;/td&gt;&lt;td&gt;55.8&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Floating-point division&lt;/td&gt;&lt;td&gt;10000000&lt;/td&gt;&lt;td&gt;0.7&lt;/td&gt;&lt;td&gt;70.9&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Objective-C objectAtIndex:&lt;/td&gt;&lt;td&gt;10000000&lt;/td&gt;&lt;td&gt;0.8&lt;/td&gt;&lt;td&gt;81.6&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Float division with int conversion&lt;/td&gt;&lt;td&gt;10000000&lt;/td&gt;&lt;td&gt;0.8&lt;/td&gt;&lt;td&gt;82.8&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;16 byte malloc/free&lt;/td&gt;&lt;td&gt;10000000&lt;/td&gt;&lt;td&gt;3.6&lt;/td&gt;&lt;td&gt;358.3&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;NSInvocation message send&lt;/td&gt;&lt;td&gt;100000&lt;/td&gt;&lt;td&gt;0.0&lt;/td&gt;&lt;td&gt;473.4&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;NSAutoreleasePool alloc/init/release&lt;/td&gt;&lt;td&gt;100000&lt;/td&gt;&lt;td&gt;0.3&lt;/td&gt;&lt;td&gt;3017.6&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;NSObject alloc/init/release&lt;/td&gt;&lt;td&gt;100000&lt;/td&gt;&lt;td&gt;0.3&lt;/td&gt;&lt;td&gt;3071.8&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;16MB malloc/free&lt;/td&gt;&lt;td&gt;1000&lt;/td&gt;&lt;td&gt;0.0&lt;/td&gt;&lt;td&gt;14623.6&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;pthread create/join&lt;/td&gt;&lt;td&gt;100&lt;/td&gt;&lt;td&gt;0.0&lt;/td&gt;&lt;td&gt;128674.6&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Zero-second delayed perform&lt;/td&gt;&lt;td&gt;1000&lt;/td&gt;&lt;td&gt;0.3&lt;/td&gt;&lt;td&gt;255627.5&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;1MB memcpy&lt;/td&gt;&lt;td&gt;100&lt;/td&gt;&lt;td&gt;0.1&lt;/td&gt;&lt;td&gt;1063407.5&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;Note that I did reduce the iterations from the original tests, so whilst the total times are significantly less, the iteration times are still a reflection of overall performance. &amp;nbsp;Compared to Mike's results, these show that the IMP method is indeed faster as expected, but this was only after I changed to a release build. &amp;nbsp;I also compiled these with Thumb disabled unless otherwise specified.&lt;br /&gt;
I've recently watched some iTunes U videos released by Apple on optimizing OpenGL ES 2.0 and a key takeaway was that the Cortext A8 architecture should always be compiled with thumb enabled.  The Cortex CPU uses the newer Thumb-2 instruction set, which has native instructions for floating point.  The benefit of Thumb is reduced code size and potentially better performance by utilising the I-cache.&lt;br /&gt;
&lt;h2&gt;Observations&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;I've estimated the iPhone 4 CPU to be running at 800MHz. &amp;nbsp;Looking at the increased speed over the 3GS for a number of benchmarks, the average is 1.333x increase. &amp;nbsp;Multiplying 600MHz x 1.333 yields roughly 800MHz as the clock speed.&lt;/li&gt;
&lt;li&gt;The IMP-cached message send is significantly faster on the newer Cortex CPU. &amp;nbsp;I have read of improvements in the branch prediction logic, which is particularly important due to the greater penalty of a misprediction in the longer A8 pipeline. &amp;nbsp;The code for executing the call is&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&lt;code&gt;blx r8&lt;/code&gt;&lt;br /&gt;
r8 contains the target address of the function, and remains so for the duration of the test.  &lt;/li&gt;
&lt;li&gt;For the 3GS, the Objective-C message send is very close to the C++ virtual method call. &amp;nbsp;I ran this test several times, and the behaviour didn't change. &amp;nbsp;The virtual method call is an indirect load of the pc register&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&lt;code&gt;ldr pc, [r3]&lt;/code&gt;&lt;br /&gt;
Without being able to access the&lt;a href="http://infocentre.arm.com/help/topic/com.arm.doc.ddi0344j/Bgbighbf.html"&gt; PMC registers&lt;/a&gt;, I can't be sure of mispredictions; however, I know that 9 instructions are executed every iteration in the C++ test. &amp;nbsp;That suggests around 15ns / iteration; but, we're at 42.9. &amp;nbsp;Adding an additional 13 cycles every iteration (21.58ns) for a mispredition would get us to 37ns / iteration - much closer. &amp;nbsp;Stepping in to the objc_msgSend function finds the cached method on the first pass, totaling 28 instructions per iteration. &amp;nbsp;Given there are significantly more instructions for the Objective-C call, we're probably seeing the benefits of the dual—issue architecture.  &lt;/li&gt;
&lt;li&gt;Memory performance of the 3GS is significantly higher. &amp;nbsp;I've done some other micro-benchmarks, showing 2&lt;sup&gt;nd&lt;/sup&gt; gen around 200 MB/s and 3&lt;sup&gt;rd&lt;/sup&gt; gen around 800MB/s. &amp;nbsp;With some very well placed cache-preloads, I've actually pushed the ARM1176 to almost 300MB/s.&lt;/li&gt;
&lt;li&gt;Calling the objectAtIndex: using CoreFoundation API is 2x faster on older devices; however, the gap is less significant with the newer hardware. &amp;nbsp;We've seen significant improvements to the objc_msgSend performance on the 3GS, which undoubtedly is making up much of the gap.&lt;/li&gt;
&lt;li&gt;Floating point performance for scalar operations is slightly slower on the newer device.&lt;/li&gt;
&lt;/ul&gt;Source code for this test is available &lt;a href="http://gist.github.com/285663"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-4916118108614568746?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/4916118108614568746/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=4916118108614568746' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/4916118108614568746'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/4916118108614568746'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2010/01/micro-benchmarking-2nd-3rd-gen-iphones.html' title='Micro-benchmarking 2nd / 3rd gen iPhones and iPad'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-4292324341356855840</id><published>2009-06-20T02:50:00.000-07:00</published><updated>2009-06-20T02:50:11.372-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c64'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><category scheme='http://www.blogger.com/atom/ns#' term='apple'/><title type='text'>C64 for iPhone: Rejected.</title><content type='html'>After a deafening silence, I can finally talk about &lt;a href="http://tr.im/p8O3"&gt;my little side project&lt;/a&gt;. &amp;nbsp;I posted my initial efforts about a year ago and after the excitement of &lt;a href="http://tr.im/p8XR"&gt;TUAW&lt;/a&gt;&amp;nbsp;publishing a story, I spent some more time adding a keyboard and improving the performance with dreams of an App Store release. &amp;nbsp;That is, until reality sunk in. &amp;nbsp;There is an incredible amount of&amp;nbsp;work to turn a concept like this into a polished, user friendly and &lt;b&gt;legal&lt;/b&gt; product, ready for sale.&amp;nbsp;&amp;nbsp;I attempted to find who owned the Commodore 64 brand, but constantly hit dead ends. &amp;nbsp;I finally took a break from C64 and played around with new projects, like the SID player. &amp;nbsp;It has made progress, but I'll leave that for another post.&lt;br /&gt;
&lt;br /&gt;
Not much happened with the emulator for some time; however, everything changed when I received an email from Brian Lyscarz, a Danish entrepreneur who is now a resident of Sweden. &amp;nbsp;It turns out he is just as passionate as I when it comes to retro, and had personally funded some initial development of a C64 emulator for the iPhone. &amp;nbsp;Fortunately (for me) this didn't go too far and Brian found me because of the initial press.&amp;nbsp;&amp;nbsp;Aside from an initial phone call, we have communicated entirely via email, post and Google chat, to achieve what follows.&lt;br /&gt;
&lt;br /&gt;
We concluded (having never met) that the next obvious step was to form a company dedicated to retro gaming, and &lt;a href="http://manomio.com/"&gt;Manomio LLC&lt;/a&gt; was born. &lt;br /&gt;
&lt;br /&gt;
As the months have gone by, we've really settled into what has become a great partnership. &amp;nbsp;Essentially, I got it working and Brian had the aesthetic eye and the skill with Photoshop to make it pretty:&lt;br /&gt;
&lt;br /&gt;
&lt;img src="http://c64.manomio.com/images/c64_preview.png" width="420" /&gt;&lt;br /&gt;
&lt;br /&gt;
The next hurdle was licensing. &amp;nbsp;Fortunately,&amp;nbsp;Brian knew the right people, which lead to Manomio securing an official license for the brand from Commodore Gaming and Kiloo Apc.&lt;br /&gt;
&lt;br /&gt;
The final hurdle was Apple and the SDK agreement, section 3.2.2. &amp;nbsp;We contacted Apple Developer Relations in the United Kingdom and explained our approach. &amp;nbsp;In principal, we don't allow you to download arbitrary content - we'll secure the licenses and release game packs officially via the App Store. &amp;nbsp;We agree it's not ideal, but we had to start somewhere. &amp;nbsp;If Apple loosens the reins, so will we! &amp;nbsp;They were very excited by what we had built and assured us we'd be okay given we weren't directly competing with the App Store and had locked down the emulator to only installing official titles. &amp;nbsp;They also mentioned there were already other 'emulators' available, like the SID player and SC68, which actually can download content freely via the net. &amp;nbsp;This leads us to today - we've been rejected on those very grounds. &amp;nbsp;We're going to resubmit with no access to BASIC, so it simply plays games in the hope it will be perceived as just a pack of games. &lt;br /&gt;
&lt;br /&gt;
Hopefully we can be noisy across the digital communication channels and perhaps Apple will change their mind. &amp;nbsp;We have our &lt;a href="http://tr.im/p970"&gt;first review&lt;/a&gt; in too, so go check it out!&lt;br /&gt;
&lt;br /&gt;
Enough talk, here it is in action on a 3G (not my new 3Gs):&lt;br /&gt;
&lt;br /&gt;
&lt;object height="344" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/gUQH24c63g8&amp;hl=en&amp;fs=1&amp;"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/gUQH24c63g8&amp;hl=en&amp;fs=1&amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-4292324341356855840?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/4292324341356855840/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=4292324341356855840' title='39 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/4292324341356855840'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/4292324341356855840'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2009/06/c64-for-iphone-rejected.html' title='C64 for iPhone: Rejected.'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>39</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-3214092356935134715</id><published>2009-04-18T16:16:00.001-07:00</published><updated>2009-04-18T17:53:35.353-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xcode'/><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>Enable -Wformat for better compile time help</title><content type='html'>&lt;p&gt;Let the compiler do all the hard work, and be sure to enable the following warning:&lt;/p&gt;
&lt;div style="text-align:center;"&gt;&lt;img src="http://lh6.ggpht.com/_WTgxY9AxbJk/SepdBUhSs7I/AAAAAAAAAh8/oO-mV51nQew/Picture%201.png?imgmax=800" alt="Picture 1.png" border="0" width="354" height="61" /&gt;&lt;/div&gt;
&lt;p&gt;It does more than just validate printf/scanf formatting calls, which is helpful in itself.  It also validates that a sentinel is present in variadic functions.  A sentinel is typically NULL or nil for the last parameter.  A common place you would benefit from this is using the arrayWithObjects method of NSArray, that requires a nil for the last value.
&lt;/p&gt;&lt;pre class="brush: cpp"&gt;
NSArray *items = [NSArray arrayWithObjects:@"one", @"two", nil];
&lt;/pre&gt;
&lt;p&gt;If the nil is absent, you're receive the following:
&lt;/p&gt;
&lt;div style="text-align:center;"&gt;&lt;img src="http://lh4.ggpht.com/_WTgxY9AxbJk/Sep1_lFLQ3I/AAAAAAAAAiA/RpVKEbbVEaM/Picture%203.png?imgmax=800" alt="Picture 3.png" border="0" width="422" height="91" /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-3214092356935134715?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/3214092356935134715/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=3214092356935134715' title='19 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/3214092356935134715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/3214092356935134715'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2009/04/enable-wformat-for-better-compile-time.html' title='Enable -Wformat for better compile time help'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_WTgxY9AxbJk/SepdBUhSs7I/AAAAAAAAAh8/oO-mV51nQew/s72-c/Picture%201.png?imgmax=800' height='72' width='72'/><thr:total>19</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-7194178182684243596</id><published>2009-04-03T09:08:00.001-07:00</published><updated>2009-04-03T09:08:46.428-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>Small Zip / Unzip library for iPhone</title><content type='html'>I have looked with &lt;a href="http://code.google.com/p/ziparchive/"&gt;ZipArchive&lt;/a&gt;, which is an Objective-C compression framework; however, I ended up using &lt;a href="http://www.codeproject.com/KB/library/LiteZip.aspx"&gt;Lite Zip / Unzip&lt;/a&gt; on codeproject as it is just two .C files.  Include one for compressing ZIP files and the other for decompressing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-7194178182684243596?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/7194178182684243596/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=7194178182684243596' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/7194178182684243596'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/7194178182684243596'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2009/04/small-zip-unzip-library.html' title='Small Zip / Unzip library for iPhone'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-7512060577959853257</id><published>2009-03-07T21:56:00.002-07:00</published><updated>2009-03-07T21:57:40.706-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xcode'/><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>XCode Tip: Generate comments in your assembler output</title><content type='html'>To make it easier to find the assembly generated when you 'Show Assembly Code', embed comments using:  &lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;asm("# your comment")&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-7512060577959853257?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/7512060577959853257/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=7512060577959853257' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/7512060577959853257'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/7512060577959853257'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2009/03/xcode-tip-generate-comments-in-your.html' title='XCode Tip: Generate comments in your assembler output'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-5513459707372834609</id><published>2009-01-30T23:33:00.041-07:00</published><updated>2009-04-18T16:51:25.007-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xcode'/><category scheme='http://www.blogger.com/atom/ns#' term='debugging'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>How to debug handleOpenURL</title><content type='html'>I've seen a number of questions on the Apple iPhone developer forums asking how to debug the UIApplication handleOpenURL message.  I finally had a complex scenario that I needed to debug, and came up with the following solution.

Note that this example has been tested using the simulator only.

Firstly, you'll need to grab the two 'DebugSupport' files from my google code repository &lt;a href="http://code.google.com/p/iphone-sdk-examples/source/browse/#svn/trunk/utility/debugging"&gt;here&lt;/a&gt;.

Include them in your project and modify your handleOpenURL message as follows:

&lt;pre class="brush: cpp"&gt;-(BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
 [DebugSupport waitForDebugger];
 ...
 // place breakpoint after the above line
}
&lt;/pre&gt;

The call to [DebugSupport waitForDebugger] shows a UIAlertView, which will wait until you confirm by clicking the OK button.  You'll notice that the prompt tells you the process ID.  Don't click OK yet.  Return to XCode and from the Run menu, choose Attach To Process | Process ID...  Enter the PID given to you from the alert box and XCode will attach and enable all the breakpoints.

Obviously, remove this from production code.

Enjoy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-5513459707372834609?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/5513459707372834609/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=5513459707372834609' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/5513459707372834609'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/5513459707372834609'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2009/01/test-code_5589.html' title='How to debug handleOpenURL'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-4301705910498372244</id><published>2009-01-30T09:03:00.009-07:00</published><updated>2009-02-03T10:51:47.922-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>iPhone 3.0 Wish List</title><content type='html'>I took this from a comment I made on TUAW&lt;br /&gt;
&lt;br /&gt;
Here's what I'd like to see, assuming we'll also get iPhone 3.0 software update.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;Hardware&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;The entire screen should be touch enabled, so the border could be used for interactivity.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;ARM Cortex A9 (multi-core version would be a dream),&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;PowerVR SGX and&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;minimum of 256MB RAM (up from 128MB)&lt;/li&gt;
&lt;/ul&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;Software, given the above specs&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Background applications&lt;br /&gt;
&lt;/li&gt;

&lt;ul&gt;&lt;li&gt;I'm wondering if this is coming rather than Apple's original 'push' solution, since we haven't seen it yet...&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Support for cross-application communication / shared data&lt;br /&gt;
&lt;/li&gt;

&lt;ul&gt;&lt;li&gt;At the very minimum, this should be permitted for apps released by the same developer&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Major innovations to Springboard, since it is becoming unwieldy on iPhones with many apps installed&lt;br /&gt;
&lt;/li&gt;

&lt;ul&gt;&lt;li&gt;'spotlight' style launching would be good&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;It could be arranged in a grid pattern so you could flip left, right, up or down or diagonally. A faint arrow could show you where centre is. Pressing home would take you back to the centre screen.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;For up to 9 screens you would be no more than 2 flips from any other screen.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;A gesture (like pinch) could be used to zoom out the spring board, like spaces to see 4 page or further out for 6 and then 9 pages. Tap on a page to zoom back.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;You should be able to name spaces, so you could see text on each space. e.g. 'Games', 'Financial', etc...&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-4301705910498372244?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/4301705910498372244/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=4301705910498372244' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/4301705910498372244'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/4301705910498372244'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2009/01/iphone-30-wish-list.html' title='iPhone 3.0 Wish List'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-1591279589766619320</id><published>2009-01-04T18:15:00.000-07:00</published><updated>2011-02-02T16:53:08.218-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xcode'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>Utility class for loading a UIImage without caching</title><content type='html'>&lt;p&gt;I've checked in a &lt;a href="http://code.google.com/p/iphone-sdk-examples/source/browse/#svn/trunk/utility/cocoa-touch"&gt;utility class for UIImage&lt;/a&gt;, which adds a new category to load images without caching .  You use it as follows:&lt;br /&gt; &lt;br /&gt;&lt;/p&gt;
&lt;pre class="brush: cpp"&gt;UIImage *image = [UIImage imageFromResource:@"my_image.png"];&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt; You should only do this if there is a specific reason you do not want caching.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-1591279589766619320?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/1591279589766619320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=1591279589766619320' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/1591279589766619320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/1591279589766619320'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2009/01/utility-class-for-loading-uiimage.html' title='Utility class for loading a UIImage without caching'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-5074228618365729865</id><published>2008-12-26T14:40:00.000-07:00</published><updated>2008-12-26T14:42:42.076-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='graphics'/><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>New cocos2d release</title><content type='html'>See &lt;a href="http://blog.sapusmedia.com/2008/12/cocos2d-for-iphone-v062-released.html"&gt;this&lt;/a&gt; post and get &lt;span class="Apple-style-span" style="font-style: italic;"&gt;the &lt;/span&gt;premier 2D&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&amp;nbsp;&lt;/span&gt;iPhone graphics library &lt;a href="http://code.google.com/p/cocos2d-iphone/"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-5074228618365729865?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/5074228618365729865/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=5074228618365729865' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/5074228618365729865'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/5074228618365729865'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2008/12/new-cocos2d-release.html' title='New cocos2d release'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-305533503896355912</id><published>2008-11-30T16:00:00.000-07:00</published><updated>2008-11-30T16:12:39.583-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ARM'/><category scheme='http://www.blogger.com/atom/ns#' term='example'/><category scheme='http://www.blogger.com/atom/ns#' term='technical'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>New repository for iPhone examples created</title><content type='html'>I've created a &lt;a href="http://code.google.com/p/iphone-sdk-examples/"&gt;google code project&lt;/a&gt;&amp;nbsp;, which I will use to post working mini-examples for iPhone developers.&lt;br /&gt;
&lt;br /&gt;
The &lt;a href="http://code.google.com/p/iphone-sdk-examples/source/browse/#svn/trunk/performance/ARM-Parallel-Assembly"&gt;first installment&lt;/a&gt; is an example of using parallel ARM assembler in XCode to do basic processing of an ARGB image. &amp;nbsp;I'll post a follow up with more detail. &amp;nbsp;In summary, for each iteration, the routine&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;reads 16 bytes into 4, 32-bit registers (r2-r5) in 1 ldmia (load multiple) instruction,&amp;nbsp;&lt;/li&gt;
&lt;li&gt;processes the 16 bytes in 4 uqadd8 instructions, which equates to 4 pixels (ARGB).&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;stores the 16 bytes back to memory, and increments the buffer point in 1 stmia instruction&lt;/li&gt;
&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-305533503896355912?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/305533503896355912/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=305533503896355912' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/305533503896355912'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/305533503896355912'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2008/11/new-repository-for-iphone-examples.html' title='New repository for iPhone examples created'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-5477581405556282699</id><published>2008-11-15T15:56:00.003-07:00</published><updated>2008-11-16T14:53:19.798-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c64'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>C64 for iPhone: There and back again</title><content type='html'>Lately, I've had a chance to play some more with the iPhone (and I'm really enjoying XCode). &amp;nbsp;The title, 'There and back again' eludes to the fact that in my quest to have a C64 on my iPhone, I started by porting &lt;a href="http://frodo.cebix.net/"&gt;Frodo&lt;/a&gt;, and then ported &lt;a href="http://www.viceteam.org/"&gt;VICE&lt;/a&gt;. &amp;nbsp;Now I'm 'back again' to Frodo.&lt;br /&gt;
&lt;h3&gt;Why?&lt;/h3&gt;I'll spare all the technical details for another post, but essentially the design of VICE (written in C) was not optimal for achieving playable performance out of a mobile CPU, like the iPhone. &amp;nbsp;Frodo is a much smaller code base, written in C++ and designed in such a way that GCC's optimizations were fully utilised. &amp;nbsp;I've spent time fixing some lingering issues with Frodo the last few days and now have iFrodo running 100% emulation speed at 25fps. &amp;nbsp;I could run the emulator at 50fps, but frame buffer access is not optimal in the public SDK today, adding significant overhead.  When running Frodo in 'turbo' mode, the emulator runs up to 900%!&lt;br /&gt;
&lt;br /&gt;
I fixed an issue in the 'fake' drive emulation, where many games would fail to load using the 'fast drive mode'. &amp;nbsp;This mode typically loads games in less than a couple of seconds at 100% emulation (even fast in turbo mode). &amp;nbsp;I found they would work when enabling the 'Emulate 1571' switch, but given this emulates the 6502 CPU similar to a real 1571 drive, it can take many minutes to load a game in some cases. &amp;nbsp;With that fix, the majority of games can load in fast mode. &amp;nbsp;For usability, I also updated the fast drive code to alert the user when a game requires the 1571 emulation, so it doesn't just crash, leaving you wondering.&lt;br /&gt;
&lt;br /&gt;
I also found out that some games are cracked in such a way that are incompatible with Frodo (such as Wizball and Fist II). &amp;nbsp;I located alternative images of these games that worked, so Frodo is a go!&lt;br /&gt;
&lt;br /&gt;
I resolved some remaining issues with the 'touch stick', and now can play games effectively. &amp;nbsp;I think the idea has turned out great in practice. &amp;nbsp;I chose this over the more popular on-screen 'D' pad and fire button, which forces the user to press a specifically targeted area, that is difficult to master without any tactile feedback. &amp;nbsp;What lead to my design was that I attended a User Experience seminar, presented by &lt;a href="http://www.nngroup.com/about/people/cnodder.html"&gt;Chris Nodder&lt;/a&gt; of &lt;a href="http://www.nngroup.com/"&gt;Nielsen Norman Group&lt;/a&gt;&amp;nbsp;(ironically, their website appears to be an example of poor design) and learnt about &lt;a href="http://en.wikipedia.org/wiki/Fitts'_law"&gt;Fitts' Law&lt;/a&gt;. &amp;nbsp;I've alloted the whole screen to joystick function, meaning you can watch the game and not your fingers.&lt;br /&gt;
&lt;br /&gt;
The majority of work left is related to&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Saving state when the app is terminated (such as by the Home button or an incoming phone call).&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;save / load named game state and&lt;/li&gt;
&lt;li&gt;landscape mode.&lt;/li&gt;
&lt;/ul&gt;I'll create a video demonstration the emulator in action on a physical device very soon.&lt;br /&gt;
&lt;br /&gt;
This all helps with some of the issues I had with mSID too - so I'll post an update on that shortly.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-5477581405556282699?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/5477581405556282699/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=5477581405556282699' title='20 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/5477581405556282699'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/5477581405556282699'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2008/11/c64-for-iphone-there-and-back-again.html' title='C64 for iPhone: There and back again'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>20</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-9203816700988206587</id><published>2008-10-29T01:39:00.020-07:00</published><updated>2008-10-29T21:16:54.971-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FAQ'/><category scheme='http://www.blogger.com/atom/ns#' term='licensing'/><category scheme='http://www.blogger.com/atom/ns#' term='gpl'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>The GPL and iPhone development</title><content type='html'>I have read through the GPLv3, and whilst I am not a lawyer, it is worded without too much legalese.&amp;nbsp; Here is my take in FAQ style, addressing some points of contention that I have come across on a number of forums.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;Doesn't the signing certificate imply 'Tivoization'?&lt;/h3&gt;To clarify what 'Tivoization' is, included is the following from the article &lt;a href="http://www.fsf.org/licensing/licenses/quick-guide-gplv3.html"&gt;A Quick Guide to GPLv3&lt;/a&gt;:&lt;br /&gt;
&lt;blockquote&gt;&lt;strong&gt;Tivoization&lt;/strong&gt;: Some companies have created various different kinds of devices that run GPLed software, and then rigged the hardware so that they can change the software that's running, but you cannot.  If a device can run arbitrary software, it's a general-purpose computer, and its owner should control what it does.  When a device thwarts you from doing that, we call that tivoization.&lt;/blockquote&gt;Many users are confusing the purpose of the signing certificate as a potential 'Tivoization' violation.&amp;nbsp; Your signing certificate has &lt;em&gt;nothing&lt;/em&gt; to do with a specific application, nor is your application tied to a specific signing certificate (unless you were to somehow code it as such).&amp;nbsp; It is simply a requirement imposed by Apple that all 'official' applications be signed and it's purpose is to identify &lt;em&gt;who&lt;/em&gt; built the application and that the application has come from a trusted source.&amp;nbsp; Remember, anyone who has access to the SDK and has paid their dues can sign an application and install it on the physical device.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;GPL requires all the source be released, but doesn't the NDA prevents this?&lt;/h3&gt;Apple has revised the NDA, and now it applies to unreleased versions of the SDK.&amp;nbsp; At the time of publication, that would imply anything built on version 2.2 of the SDK (which is currently in beta) is under NDA.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;GPL software requires all installation scripts ('Corresponding Source') be released, so don't I have to release my signing certificate, which would be a violation of Apple's license?&lt;/h3&gt;You do not need to release your signing certificate.&amp;nbsp; The source code or the compiled application is not tied to the original author's signing key, and as mentioned elsewhere in this FAQ there is no 'Tivoization' violation.&amp;nbsp; An individual can simply uninstall the original version of GPL'd application, compile using XCode and reinstall their modified version.&amp;nbsp; Releasing the compilable XCode project will ensure your project is in compliance with the GPL, as this handles the installation of the software to the device.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;You must pay to enter the Apple Developer Program, is this a violation of the GPL?&lt;/h3&gt;Yes, and you had to pay to get an iPhone in the first place.&amp;nbsp; You also had to pay for an Apple computer running OS X to do official iPhone development.&amp;nbsp; Paying to enter the developer program is another cost, but this is not a violation with regards to GPL'd software.&amp;nbsp; Once you've paid your dues and received your own signing certificate, you can compile and install the GPL'd software you downloaded.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
Ultimately, the user still has complete freedom to modify and install the GPL'd application - and that is the essence of GPL'd software.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-9203816700988206587?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/9203816700988206587/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=9203816700988206587' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/9203816700988206587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/9203816700988206587'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2008/10/gpl-and-iphone-development.html' title='The GPL and iPhone development'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-5961468657192355141</id><published>2008-10-05T21:59:00.005-07:00</published><updated>2008-10-05T22:11:04.055-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c64'/><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>!NDA</title><content type='html'>&lt;p&gt;This is a huge boon for all the GPL software out there.  The more I researched the issue, the more I realised I wasn't going to be able to release any GPL'd software via the App Store until it was lifted.&lt;/p&gt;&lt;br/&gt;
&lt;p&gt;Also, I've been quiet lately - not because I've lost interest in the iPhone, but my day job has required more of my personal time lately - admittedly, the GPL issue didn't help.  I have been talking to Andreas, who is the author of &lt;a href="http://www.sidmusic.org/sidplay/mac/"&gt;SIDPLAY&lt;/a&gt; for OS X.  We are going collaborate, which should result in a great version of SIDPLAY for the iPhone.  Unfortunately, we have both been very busy lately, so things have been moving slowly, but don't despair, as in the coming months I'm sure we will be able to finish off SIDPLAY for the iPhone.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-5961468657192355141?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/5961468657192355141/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=5961468657192355141' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/5961468657192355141'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/5961468657192355141'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2008/10/nda.html' title='!NDA'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-2023554687352965678</id><published>2008-09-02T01:24:00.002-07:00</published><updated>2008-09-02T01:41:54.584-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SID'/><category scheme='http://www.blogger.com/atom/ns#' term='c64'/><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>mSID and the High Voltage SID Collection</title><content type='html'>The default format for running the High Voltage SID Collection (HVSC) on the device will be in a ZIP archive.  The HVSC is about 65mb zip'ed up, which in turn contains a 200mb uncompressed archive, C64Music.zip.  This inner archive contains over 35,000 files.  It is impractical to expect that will extract on the device in a reasonable amount of time, hence the decision to stick with an archive.  I will provide a re-compressed version of C64Music.zip, which you will be able to download via mSID and from then on, one should be able to download the HVSC updates direct from their site.  I will also include a sqlite database of all the files, in order to improve performance for searching.  I expect that long-term, the role of the database will grow to become your store of ratings, play lists, etc.  Given it's sqlite, it will be open to reading and updating.&lt;br /&gt;
&lt;br /&gt;
From an implementation perspective, I have pulled together the necessary code to be able to read a ZIP archive as Cocoa does not have ZIP support built in.  I have built this as a .framework, and will probably open-source it at some point.&lt;br /&gt;
&lt;br /&gt;
The browser will use the familiar hierarchical navigation built in to the iPhone.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-2023554687352965678?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/2023554687352965678/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=2023554687352965678' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/2023554687352965678'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/2023554687352965678'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2008/09/msid-and-high-voltage-sid-collection.html' title='mSID and the High Voltage SID Collection'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-1931365527107771070</id><published>2008-09-01T00:56:00.016-07:00</published><updated>2008-09-01T22:49:28.259-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SID'/><category scheme='http://www.blogger.com/atom/ns#' term='c64'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>Introducing mSID</title><content type='html'>'m' what? mobile-&lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;SID&lt;/span&gt;&lt;/span&gt;!&lt;br /&gt;
&lt;br /&gt;
Given the setback in rendering iC64 usable, I wanted to tackle something that would generate results relatively quickly. &amp;nbsp;There has been a modest amount of interest in a SID player for the iPhone (it is a mobile &lt;span style="font-style: italic;"&gt;music&lt;/span&gt; player after all) and so m&lt;span style="font-style: italic;"&gt;SID&lt;/span&gt;&amp;nbsp;has begun.&lt;br /&gt;
&lt;br /&gt;
As of this evening, I have played Wizball on the the device, and to my delight it works like a charm. &amp;nbsp;There is no user interface to speak of yet so no screenshots; however, I can focus on the design now that playback is not going to be an issue.&lt;br /&gt;
&lt;br /&gt;
I'll be working on brining m&lt;i&gt;SID&lt;/i&gt; to the App Store in the coming weeks.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;How will I get songs on the device?&lt;/h3&gt;I have several games that allow downloading of content (new levels) from the internet, so I will provide the same feature.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;What about STIL and song length support?&lt;/h3&gt;Of course.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-1931365527107771070?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/1931365527107771070/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=1931365527107771070' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/1931365527107771070'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/1931365527107771070'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2008/09/introducing-msid.html' title='Introducing mSID'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-8734209168254583381</id><published>2008-09-01T00:20:00.007-07:00</published><updated>2008-09-01T23:08:34.696-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c64'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>What's going on with iC64?</title><content type='html'>Lot's of emails and posts asking how the emulator, iC64 is coming along, so I wanted to post a short update.  Firstly, iC64 is still alive, but took a back seat for a while due to life commitments, both work (travel and major release going out the door) and much needed vacation.  I am beginning to find some spare time, allowing me to return to my hobby.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;What's the problem?&lt;/h3&gt;I'm running into some significant performance problems running iC64 on the device.  Let's not forget this &lt;span class="Apple-style-span" style="font-style: italic;"&gt;is&lt;/span&gt; a mobile device, and VICE is designed to run on some pretty hefty hardware.  I believe the iPhone can do it, but it's going to take some work on my part to get it there.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;What can you do about it?&lt;/h3&gt;&lt;p&gt;I've been staring at ARM assembly (not Thumb) and monitored the device with Shark, which is a tool used for performance analysis.  It's obvious that there simply aren't enough cycles to run the emulator as it stands today.&lt;/p&gt;&lt;p&gt;Part of the issue is that VICE is broken into 100's of small files for modularity, but that causes problems accessing shared static data across object files.  What I'm finding is that a variable 'foo' declared in file 'a' and accessed in file 'b' generates three memory accesses.  Two indirect reads before getting the value.  Ouch.  I've found ways to mitigate this, but it's going to require a fair amount of refactoring.  I'll start with the hot-spots first and work my way on from there, until I've squeezed out the performance I need.  Unfortunately, how long this will take is an unknown, so I'll post updates as I progress.&lt;/p&gt;&lt;br /&gt;
Stay tuned.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-8734209168254583381?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/8734209168254583381/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=8734209168254583381' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/8734209168254583381'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/8734209168254583381'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2008/09/whats-going-on-with-ic64.html' title='What&apos;s going on with iC64?'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-2594314255490744430</id><published>2008-07-12T14:22:00.002-07:00</published><updated>2008-07-12T15:11:10.055-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c64'/><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>I'm in!</title><content type='html'>It seems with the release of iPhone 2.0, Apple opened the flood gates to the iPhone developer programme on Friday.  I received my acceptance email late in the day.  I've subsequently paid my dues ($99 USD) and now have iC64 running on the device.  This brief experience leads to a separate post about compiler settings for hi-performance applications on the iPhone.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-2594314255490744430?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/2594314255490744430/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=2594314255490744430' title='16 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/2594314255490744430'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/2594314255490744430'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2008/07/im-in.html' title='I&apos;m in!'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>16</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-4820250575291384094</id><published>2008-06-20T10:02:00.005-07:00</published><updated>2008-06-27T12:14:26.630-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c64'/><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>iFrodo is dead, long live iC64</title><content type='html'>&lt;h2&gt;The Obituary&lt;/h2&gt;
&lt;p&gt;To whom it may concern:&lt;/p&gt;
&lt;p&gt;After repeated gaming accidents, it is with sincere regret that iFrodo is no longer.&amp;nbsp; A team of 1 and countless hours spent operating in the debugger simply could not save it.&lt;/p&gt;
&lt;p&gt;And for all that you, iFrodo have taught me about the iPhone SDK, I am forever in your debt.&lt;/p&gt;

&lt;h2&gt;The Diagnosis&lt;/h2&gt;
&lt;p&gt;During routine exercises (testing), iFrodo was consistently passing out.&amp;nbsp; The first occurrences were running &lt;a href="http://en.wikipedia.org/wiki/Wizball"&gt;Wizball&lt;/a&gt; and &lt;a href="http://www.lemon64.com/?game_id=2824"&gt;Fist II&lt;/a&gt;, which caused iFrodo to report an invalid opcode.&amp;nbsp; In an attempt to eliminate any genetic issues, I decided to check family history, which included WinFrodo and their .NET cousin, sharp-64; however, they showed almost identical symptoms.&lt;/p&gt;
&lt;p&gt;Next, to eliminate the possibility the D64 images were corrupt, I tested the offending games using iFrodo's distant relatives, &lt;a href="http://www.computerbrains.com/ccs64/"&gt;CCS64&lt;/a&gt; (PC), &lt;a href="http://www.viceteam.org/"&gt;WinVICE&lt;/a&gt; (PC), &lt;a href="http://www.viceteam.org/"&gt;VICE&lt;/a&gt; (OSX) and &lt;a href="http://www.infinite-loop.at/Power64/index.html"&gt;Power64&lt;/a&gt; (OSX) all of which had no issues.&lt;/p&gt;
&lt;p&gt;I spent &lt;i&gt;many&lt;/i&gt; hours and explored many avenues, but could not come up with the elusive fix.&lt;/p&gt;

&lt;h2&gt;&lt;a name="thefuture"&gt;The Future&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I have completed a port of &lt;a href="http://www.viceteam.org/"&gt;VICE&lt;/a&gt; to the iPhone, iC64. &amp;nbsp;Any suggestions for an alternative name for the 'product' are welcome.&amp;nbsp; More importantly, all functionality that was present in iFrodo is available in iC64, with the exception of the previously mentioned bugs.&lt;/p&gt;
&lt;p&gt;A picture is worth a thousand words and a video is worth a lot more:&lt;/p&gt;
&lt;div style="text-align:center;"&gt;&lt;object width="425" height="350"&gt; &lt;param name="movie" value="http://www.youtube.com/v/mjrCApqDtEo"&gt; &lt;/param&gt; &lt;embed src="http://www.youtube.com/v/mjrCApqDtEo" type="application/x-shockwave-flash" width="425" height="350"&gt; &lt;/embed&gt; &lt;/object&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Video now plays the emulator sound.&amp;nbsp; Forgive the voice-over, as it is a little quite when the sound is on.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-4820250575291384094?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/4820250575291384094/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=4820250575291384094' title='27 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/4820250575291384094'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/4820250575291384094'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2008/06/ifrodo-is-dead-long-live-ic64.html' title='iFrodo is dead, long live iC64'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>27</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-2751788529875561060</id><published>2008-06-04T01:00:00.002-07:00</published><updated>2008-06-04T01:03:03.193-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c64'/><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>iFrodo - Keyboard mania</title><content type='html'>&lt;p&gt;I've now successfully hooked the keyboard up to iFrodo.  Without a doubt, the experience is &lt;i&gt;much&lt;/i&gt; better.&lt;/p&gt;&lt;p&gt;I've uploaded a short video to youtube to demonstrate the new functionality in action.  Forgive the green text over the video implying 'please register me, you bad, bad individual' - I will buy a copy of the software and redo the video.&lt;/p&gt;

&lt;div style="text-align: center;"&gt;&lt;object width="425" height="350"&gt; &lt;param name="movie" value="http://www.youtube.com/v/NsuXIxj9jDE"&gt;  &lt;embed src="http://www.youtube.com/v/NsuXIxj9jDE" type="application/x-shockwave-flash" width="425" height="350"&gt;&lt;/embed&gt;  &lt;/object&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-2751788529875561060?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/2751788529875561060/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=2751788529875561060' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/2751788529875561060'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/2751788529875561060'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2008/06/ifrodo-keyboard-mania.html' title='iFrodo - Keyboard mania'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-101820458400261469</id><published>2008-06-03T01:10:00.001-07:00</published><updated>2008-06-03T01:17:30.281-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c64'/><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>iFrodo Keyboard: Working</title><content type='html'>&lt;p&gt;I've now completed the keyboard to the point where I can load and run programs via the emulator, including support for multiple layouts.&lt;/p&gt;
&lt;p&gt;I will add the Fn keys next and then hook it all up to the emulator, removing the clunky NSTextField and built-in keyboard.  I short video will follow with this milestone.&lt;/p&gt;
&lt;p&gt;A longer term usability goal is to show the actual 'drawing' keys when the shift or C= key is pressed, but gathering all the images of the keys is a lot of work for a rainy day.&lt;/p&gt;
&lt;p style="font-weight:bold;"&gt;The default layout:&lt;/p&gt;
&lt;div style="text-align:center;"&gt;&lt;img src="http://lh3.ggpht.com/stuart.carnie/SET8ADsmimI/AAAAAAAAAXM/Z3uv4v_p--8/Picture%201.png?imgmax=800" alt="Picture 1.png" border="0" width="383" height="322" /&gt;&lt;/div&gt;&lt;br/&gt;
&lt;p style="font-weight:bold;"&gt;The number and glyph layout (Fn keys will go here):&lt;/p&gt;
&lt;div style="text-align:center;"&gt;&lt;img src="http://lh6.ggpht.com/stuart.carnie/SET8EzsminI/AAAAAAAAAXQ/cnko7v1JrLI/Picture%202.png?imgmax=800" alt="Picture 2.png" border="0" width="386" height="320" /&gt;&lt;/div&gt;

&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-101820458400261469?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/101820458400261469/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=101820458400261469' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/101820458400261469'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/101820458400261469'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2008/06/ifrodo-keyboard-working.html' title='iFrodo Keyboard: Working'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/stuart.carnie/SET8ADsmimI/AAAAAAAAAXM/Z3uv4v_p--8/s72-c/Picture%201.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-6169497483942521111</id><published>2008-06-01T02:52:00.001-07:00</published><updated>2008-06-01T14:21:34.426-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c64'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>iFrodo - More keyboard features</title><content type='html'>&lt;p&gt;A lot of 'under the hood' changes have been made to the keyboard, including support for left, centre and right snap regions (note the shift and del keys), sticky keys (like the shift or the Commodore key) and multiple layouts. Multiple layouts will lead to support for switching between the QWERTY or number layout.&lt;/p&gt;
&lt;p&gt;I will be pretty close to hooking the basic keyboard up to the Frodo emulator.&lt;/p&gt;
&lt;div style="text-align:center;"&gt;
  &lt;br /&gt;
  &lt;img src="http://farm4.static.flickr.com/3056/2540393579_b9f15bba0f_o.jpg" width="388" height="318" alt="iFrodo Keyboard 2.png" /&gt;
&lt;/div&gt;

&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-6169497483942521111?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/6169497483942521111/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=6169497483942521111' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/6169497483942521111'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/6169497483942521111'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2008/06/ifrodo-more-keyboard-features.html' title='iFrodo - More keyboard features'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-1654487336431576656</id><published>2008-05-28T00:03:00.003-07:00</published><updated>2008-05-29T10:20:48.623-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c64'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>iFrodo - The keyboard is shaping up</title><content type='html'>&lt;p&gt;I have the basic framework for rendering any virtual keyboard (in a resolution independent manner) almost completed. The keyboard supports touch events; however, I now have to complete the shift-key support and a few other enhancements for switching layouts (to numbers, etc).&lt;/p&gt;
&lt;p&gt;For nostalgia, the colors are pulled from numerous pictures of Commodore 64 keyboards:&lt;/p&gt;
&lt;div style="text-align:center"&gt;
  &lt;br /&gt;
  &lt;img src="http://farm3.static.flickr.com/2387/2530683970_e474dfd336_o.jpg" width="379" height="318" alt="iPhone keyboard for emulators" /&gt;
&lt;/div&gt;

&lt;b&gt;Update&lt;/b&gt;: I will be including full support for all the Commodore 64 keys (C64 key, del, clr, etc)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-1654487336431576656?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/1654487336431576656/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=1654487336431576656' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/1654487336431576656'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/1654487336431576656'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2008/05/ifrodo-keyboard-is-shaping-up.html' title='iFrodo - The keyboard is shaping up'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-5175924950752243010</id><published>2008-05-25T02:36:00.006-07:00</published><updated>2008-05-25T10:19:03.719-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iphone accessories'/><title type='text'>iControlPad</title><content type='html'>I'll definitely purchase one of &lt;a href="http://www.icontrolpad.com/"&gt;these&lt;/a&gt; when they are released.  In addition, I'll be particularly interested in adding support for the device to iFrodo, using their provided SDK. &lt;span style="text-decoration: line-through"&gt;assuming I can access the unit via the Apple SDK&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-5175924950752243010?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/5175924950752243010/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=5175924950752243010' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/5175924950752243010'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/5175924950752243010'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2008/05/icontrolpad.html' title='iControlPad'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-3151286436002072940</id><published>2008-05-22T22:51:00.010-07:00</published><updated>2008-05-22T23:51:49.181-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c64'/><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>iFrodo - 'Touch-Stick' demonstration</title><content type='html'>Attached is a short video to demonstrate the joystick (touch-stick) emulation in action using the iPhone Simulator and &lt;a href="http://en.wikipedia.org/wiki/Impossible_Mission"&gt;Impossible Mission&lt;/a&gt; by &lt;a href="http://en.wikipedia.org/wiki/Epyx"&gt;Epyx&lt;/a&gt;.   Hopefully, once I receive my developer certificate, the experience will be functional on the device.

I do plan to support landscape mode, along with switching the position of the fire button area.



&lt;div style="text-align: center;"&gt;&lt;object width="425" height="350"&gt; &lt;param name="movie" value="http://www.youtube.com/v/_XamzyVArCI"&gt; &lt;/param&gt; &lt;embed src="http://www.youtube.com/v/_XamzyVArCI" type="application/x-shockwave-flash" width="425" height="350"&gt; &lt;/embed&gt; &lt;/object&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-3151286436002072940?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/3151286436002072940/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=3151286436002072940' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/3151286436002072940'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/3151286436002072940'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2008/05/ifrodo-touch-stick-demonstration.html' title='iFrodo - &apos;Touch-Stick&apos; demonstration'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-2388068495280583735</id><published>2008-05-17T20:21:00.001-07:00</published><updated>2008-05-17T20:22:45.736-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='utility'/><title type='text'>SQLite management tool</title><content type='html'>&lt;p&gt;For those using &lt;a href="http://www.sqlite.org/about.html" title="SQLite Database" target="_blank"&gt;SQLite&lt;/a&gt; (particularly relevant given it's the default database engine for the iPhone / iPod Touch), &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/5817" title="SQLite Manager"&gt;here&lt;/a&gt; is a great tool for visually managing you database. What is most impressive is the tool is a &lt;a href="http://www.mozilla.com/en-US/firefox/" title="Firefox 2 browser" target="_blank"&gt;Firefox&lt;/a&gt; add-on, compatible with versions 2.0 - 3.0.*.&lt;/p&gt;

&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-2388068495280583735?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/2388068495280583735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=2388068495280583735' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/2388068495280583735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/2388068495280583735'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2008/05/sqlite.html' title='SQLite management tool'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-3097169066934532331</id><published>2008-05-12T23:51:00.003-07:00</published><updated>2008-05-13T01:29:37.670-07:00</updated><title type='text'>iFrodo - Let there be sound</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Watch and &lt;span class="Apple-style-span" style="font-style: italic;"&gt;listen&lt;/span&gt;.&lt;/span&gt;

&lt;div style="text-align: center;"&gt;&lt;object width="425" height="350"&gt;&lt;param name="movie" value="http://www.youtube.com/v/fdTojtB6Idg"&gt;&lt;embed src="http://www.youtube.com/v/fdTojtB6Idg" type="application/x-shockwave-flash" width="425" height="350"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;

Be aware that the video and audio are greatly compressed on it's journey to YouTube.  It sounds significantly better on the simulator.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-3097169066934532331?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/3097169066934532331/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=3097169066934532331' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/3097169066934532331'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/3097169066934532331'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2008/05/ifrodo-let-there-be-sound.html' title='iFrodo - Let there be sound'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-3081919126408988566</id><published>2008-05-11T22:05:00.003-07:00</published><updated>2008-05-11T22:26:35.321-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c64'/><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>iFrodo - progress</title><content type='html'>&lt;p&gt;&lt;strong&gt;Where are we today?&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Graphics&lt;/strong&gt;: Done
    &lt;ul&gt;
      &lt;li&gt;I am using the scan-line mode for the emulator, but I may change to the single-cycle mode after some performance testing. So far it screams on the simulator. I could deploy both versions of the emulator, but that would require considerable work. Hopefully this runs with similar performance characteristics as the real device. I won't know until Apple accepts my application...&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;&lt;br/&gt;
  &lt;li&gt;&lt;strong&gt;User Experience&lt;/strong&gt; : None
    &lt;ul&gt;
      &lt;li&gt;Portrait: Partial
        &lt;ul&gt;
          &lt;li&gt;In this mode, the full keyboard will be available, as well as playing games&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;&lt;br/&gt;
      &lt;li&gt;Landscape: None
        &lt;ul&gt;
          &lt;li&gt;This mode will be primarily for playing games, with the availability of the joystick and probably the Fn keys. Switching to portrait will be necessary to perform more work with the keyboard.&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;  
  &lt;/li&gt;&lt;br/&gt;
  &lt;li&gt;&lt;strong&gt;Audio&lt;/strong&gt; : Researching
    &lt;ul&gt;
      &lt;li&gt;I've found that the Audio Queue Services look to be exactly what I need. Frodo was conveniently built to support sound 'drivers', so shouldn't be too much work here.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;&lt;br/&gt;
  &lt;li&gt;&lt;strong&gt;Input&lt;/strong&gt;, Keyboard : Planning
    &lt;ul&gt;
      &lt;li&gt;What I have to day is a 'line editor', using the built-in keyboard (as you can see in the video clip). I type a line of text and 'send' it to the emulator. This is just a debugging tool and will go away before the release.&lt;/li&gt;&lt;br/&gt;
      &lt;li&gt;The iPhone SDK and associated frameworks do not allow the built-in keyboard to be repurposed, so I'm going to have to roll my own. This is probably okay, as I'd like to make it generic enough to work with other emulators in the future - think Atari 800XL and Apple II.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;&lt;br/&gt;

  &lt;li&gt;&lt;strong&gt;Input&lt;/strong&gt;, Joystick : Planning
    &lt;ul&gt;
      &lt;li&gt;Two options
        &lt;ul&gt;
          &lt;li&gt;Multi-Touch: I have some ideas for joystick support, which I'll document in a future post - it's going to take advantage of the multi-touch interface and the entire screen surface - 'Touch Stick'.&lt;/li&gt;&lt;br/&gt;
          &lt;li&gt;Accelerometer: Something similar to what was shown for the initial SDK release for the space shoot-em-up style game.&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;&lt;br/&gt;
&lt;/ul&gt;&lt;strong&gt;Show and Tell&lt;/strong&gt;&lt;br /&gt;
Here is a short video showing 'Hello World' and running IK+ (International Karate +). As mentioned above, it uses the built in keyboard, in 'line mode', which is simply a debugging tool, until I build the UI. No sound either, but that is underway. I'll follow up with another video once sound is activated.&lt;br /&gt;
&lt;div style="text-align: center;"&gt;&lt;object width="425" height="355"&gt;&lt;param name="movie" value="http://www.youtube.com/v/0U_mPf50QqU&amp;hl=en"&gt;&lt;/param&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/0U_mPf50QqU&amp;hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Note about the video recording:&lt;/strong&gt; It was recorded at 15 frames/sec to limit the size up to youtube; however, the emulator runs at 30 fps without breaking a sweat.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-3081919126408988566?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/3081919126408988566/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=3081919126408988566' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/3081919126408988566'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/3081919126408988566'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2008/05/ifrodo-progress.html' title='iFrodo - progress'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-3315346453826381285</id><published>2008-05-08T00:46:00.003-07:00</published><updated>2011-09-17T12:12:11.875-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c64'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>iFrodo - Success!</title><content type='html'>After getting over the Objective C and Cocoa learning hump, I have a running C64 on the iPhone simulator.&lt;br /&gt;
Next will be to create a UI to manage the user experience, such as&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Save / Resume state&lt;/li&gt;
&lt;li&gt;File browser for disk / tape images

    &lt;ul&gt;
&lt;li&gt;Ability to 'auto launch' games&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Virtual keyboard and joystick&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="color: white; font: 10.0px Monaco;"&gt;
&lt;br /&gt;
&lt;span id="goog_1188211990"&gt;&lt;/span&gt;&lt;img alt="First run of C64 in iPhone" id=":current_picnik_image" src="http://www.blogcdn.com/www.tuaw.com/media/2008/05/2475716918_6a88f97e41.jpg" width="258" /&gt;&lt;span id="goog_1188211991"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-3315346453826381285?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/3315346453826381285/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=3315346453826381285' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/3315346453826381285'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/3315346453826381285'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2008/05/ifrodo-success.html' title='iFrodo - Success!'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-2825599997581725378</id><published>2008-05-05T10:37:00.005-07:00</published><updated>2008-05-05T11:48:05.422-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c64'/><category scheme='http://www.blogger.com/atom/ns#' term='graphics'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>iFrodo - porting C64 emulator to the iPhone / iPod Touch</title><content type='html'>As an Objective-C / Objective-C++ / XCode / iPhone development learning experience, I have began porting the &lt;a href="http://frodo.cebix.net/"&gt;Frodo &lt;/a&gt;C64 emulator to the mobile OS X platform.  I chose Frodo, as I have experience with this code-base, and there is a certain satisfaction of seeing the READY prompt for the first time.&lt;br/&gt;
&lt;br/&gt;
&lt;span style="font-weight: bold;"&gt;What will some of the challenges be?&lt;br/&gt;&lt;/span&gt;
&lt;span style="font-style: italic;"&gt;Display&lt;br/&gt;&lt;/span&gt;
&lt;ul&gt;&lt;li&gt;The iPhone screen is 320x480 pixels. The C64 had a 320x200 pixel display, so ideally the  top of the screen will represent the C64's virtual display, without the need to scale.&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-style: italic;"&gt;Input&lt;/span&gt;
&lt;ul&gt;&lt;li&gt;The C64 had a keyboard and games were typically played with a joystick.  We have 280 pixels left to represent these devices.  I'm not sure if I can display the iPhone's virtual keyboard, and it is unlikely I can reconfigure the keys.  Therefore, I'm probably going to have to design my own virtual keyboard image.&lt;/li&gt;&lt;li&gt;For the joystick, I'll probably model something off the NES emulator, with a virtual D-Pad and fire button.
&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;Where are we today?&lt;br/&gt;&lt;/span&gt;
I have reached my first milestone, which was to create an XCode project and compile the basic Frodo engine for the iPhone platform.&lt;br/&gt;
&lt;br/&gt;
&lt;span style="font-weight: bold;"&gt;What is next?&lt;br/&gt;&lt;/span&gt;
An emulator typically virtualises numerous devices of the original hardware, so the first I will tackle is the display, as this provides the most immediate rewards.  We need an in-memory buffer to write the output of the virtual display device, which finally is rendered to host screen.  I experimented with the OpenGL ES API, but found that Core Graphics / CGImage will do the job just fine.&lt;br/&gt;
&lt;br/&gt;
Last night I achieved my goal of writing to an in-memory buffer and rendering this to the iPhone screen.  Next is to incorporate this test code into the Frodo engine, to get a C64 running.  Screenshots will follow.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-2825599997581725378?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/2825599997581725378/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=2825599997581725378' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/2825599997581725378'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/2825599997581725378'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2008/05/ifrodo-porting-c64-emulator-to-iphone.html' title='iFrodo - porting C64 emulator to the iPhone / iPod Touch'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-5268227391847552640</id><published>2008-05-04T01:36:00.003-07:00</published><updated>2008-05-04T01:39:12.793-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sdl'/><category scheme='http://www.blogger.com/atom/ns#' term='graphics'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>SDL coming to iPhone / Touch</title><content type='html'>I've learnt that Google SoC is &lt;a href="http://code.google.com/soc/2008/sdl/appinfo.html?csaid=5511833B36DD526E"&gt;sponsoring&lt;/a&gt; a project to bring SDL to the iPhone / iPod Touch.  Great news!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-5268227391847552640?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/5268227391847552640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=5268227391847552640' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/5268227391847552640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/5268227391847552640'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2008/05/sdl-coming-to-iphone-touch.html' title='SDL coming to iPhone / Touch'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-7722979884035445520</id><published>2008-04-29T12:21:00.004-07:00</published><updated>2008-06-22T15:49:48.128-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='windows-x64'/><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>Can't see drivers\etc folder or hosts file in Vista x64?</title><content type='html'>I've just joined the Windows 64-bit OS club and ran into a frustrating issue, whereby I couldn't edit my hosts file (%systemroot%\system32\drivers\etc) using &lt;a href="http://www.altap.cz/"&gt;Altap Salamander&lt;/a&gt;. If I used Vista's Explorer, there it was.&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
Now, what's important to understand is Salamander is a 32-bit Windows application and the Wow64 layer is redirecting 32-bit applications to %systemroot%\SysWOW64. I remembered I 'knew' this, but surely there must be a way for a 32-bit application to see the native system32 folder, for file management operations.&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
Turns out there is. Create a folder %systemroot%\&lt;strong&gt;sysnative&lt;/strong&gt;, and navigate via this to see the native system32 folder from within 32-bit applications.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-7722979884035445520?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/7722979884035445520/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=7722979884035445520' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/7722979884035445520'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/7722979884035445520'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2008/04/cant-see-driversetc-folder-or-hosts.html' title='Can&apos;t see drivers\etc folder or hosts file in Vista x64?'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-5483734490194124471</id><published>2008-04-26T10:54:00.003-07:00</published><updated>2008-04-26T11:00:22.501-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><title type='text'>Vista x64 officially supported on Apple hardware</title><content type='html'>The Vista x64 update for Boot Camp is available &lt;a href="http://www.apple.com/support/downloads/bootcampupdate21forwindowsvista64.html"&gt;here&lt;/a&gt;.  Perfect timing, as I'll be getting a new 17" Macbook Pro for 'research' at work in the coming weeks, and was hoping to dual-boot with Vista x64.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-5483734490194124471?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/5483734490194124471/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=5483734490194124471' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/5483734490194124471'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/5483734490194124471'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2008/04/vista-x64-officially-supported-on-apple.html' title='Vista x64 officially supported on Apple hardware'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-6356421714100763596</id><published>2008-04-26T09:55:00.006-07:00</published><updated>2008-04-29T12:35:00.592-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c64'/><category scheme='http://www.blogger.com/atom/ns#' term='audio'/><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><title type='text'>SIDPLAY 4.0 for OS X 10.5</title><content type='html'>For all those old Commodore 64 chip-tune fans out there, take a look at the re-released &lt;a href="http://www.sidmusic.org/sidplay/mac/"&gt;SIDPLAY&lt;/a&gt; for OS X.&lt;div&gt;
&lt;/div&gt;&lt;div&gt;&lt;div&gt;In Summary:
&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Rewrite of the UI&lt;/li&gt;&lt;li&gt;iTunes look and feel&lt;/li&gt;&lt;li&gt;Export to mp3, AAC, AIFF and Apple Lossless&lt;/li&gt;&lt;li&gt;Integrated Spotlight search&lt;/li&gt;&lt;li&gt;Core Audio support&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-6356421714100763596?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/6356421714100763596/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=6356421714100763596' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/6356421714100763596'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/6356421714100763596'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2008/04/sidplay-40-for-os-x-105.html' title='SIDPLAY 4.0 for OS X 10.5'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-7957593126963636133</id><published>2008-04-25T12:36:00.003-07:00</published><updated>2008-04-25T12:47:54.125-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><title type='text'>Get latest code from TFS via command line</title><content type='html'>&lt;div&gt;I tend to work from the command line for managing builds and source control.&amp;#160; For my day job, we use TFS, so I use the Team Foundation command-line utility &lt;strong&gt;tf.exe &lt;/strong&gt;with the 'get' option.&lt;/div&gt;  &lt;div&gt;Be sure to start a Visual Studio 200x command-line prompt, to ensure tf.exe is available in the search path.&lt;/div&gt;  &lt;div&gt;&lt;a href="http://lh5.ggpht.com/stuart.carnie/SBI1At701yI/AAAAAAAAAWI/sNnyobQlYyM/s1600-h/image%5B4%5D.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="167" alt="image" src="http://lh6.ggpht.com/stuart.carnie/SBI1B9701zI/AAAAAAAAAWQ/jJDQmxw7mpc/image_thumb%5B2%5D.png?imgmax=800" width="644" border="0" /&gt;&lt;/a&gt; &lt;/div&gt;  &lt;div&gt;&lt;/div&gt;  &lt;div&gt;tf get will recursively grab changes from the current directory, so you can be somewhat selective.&lt;/div&gt;  &lt;div&gt;&amp;#160;&lt;/div&gt;  &lt;div&gt;If there are any conflicts, the familiar conflict dialog is presented, allowing you to determine the appropriate resolution.&lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-7957593126963636133?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/7957593126963636133/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=7957593126963636133' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/7957593126963636133'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/7957593126963636133'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2008/04/get-latest-code-from-tfs-via-command.html' title='Get latest code from TFS via command line'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/stuart.carnie/SBI1B9701zI/AAAAAAAAAWQ/jJDQmxw7mpc/s72-c/image_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-2095593310800128983</id><published>2008-04-25T12:28:00.004-07:00</published><updated>2008-04-25T12:36:02.469-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><title type='text'>Improve MSBuild performance with multi-processor builds</title><content type='html'>Using the command line

&lt;span style="font-family:courier new;"&gt;:\&gt;msbuild /m[:max cores]&lt;/span&gt;

will automatically take advantage of multiple cores if they are available. Without the max cores parameter, msbuild will use all available cores.

I've seen some &lt;a href="http://www.hanselman.com/blog/FasterBuildsWithMSBuildUsingParallelBuildsAndMulticoreCPUs.aspx"&gt;recent posts&lt;/a&gt; on this topic, and wanted to point out I have been using this feature for a number of months, and can confirm noticable performance gains on my dual-core laptop. A big issue for laptops is the IO performance, so if you have slower drives, you may not see the same gains.

Have not had a chance to try it on my 8-core Mac Pro :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-2095593310800128983?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/2095593310800128983/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=2095593310800128983' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/2095593310800128983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/2095593310800128983'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2008/04/multi-proc-builds-with-msbuild.html' title='Improve MSBuild performance with multi-processor builds'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-4266106896432272471</id><published>2007-07-16T12:58:00.001-07:00</published><updated>2008-03-19T10:21:20.400-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='c64'/><category scheme='http://www.blogger.com/atom/ns#' term='mono'/><title type='text'>Recent Mono / MS JIT observations with #64</title><content type='html'>&lt;p&gt;Some time ago, I had run &lt;a title="#64 - Commodore 64 emulator in C#" href="http://aussiebloke.blogspot.com/2006/08/sharp-64-commodore-64-emulator-in-c.html"&gt;#64&lt;/a&gt; using the &lt;a href="http://aussiebloke.blogspot.com/search/label/c64"&gt;Mono&lt;/a&gt; and MS runtimes.&amp;#160; Judging on the timeframe of my post, I expect I was running version &lt;a title="Mono 1.2.3: Release Notes" href="http://www.go-mono.com/archive/1.2.3/"&gt;1.2.3&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Everything worked great; however, there was a fairly significant delta in performance between the two, Mono falling quite short of the MS runtime. It didn't concern me at all, as the emulator was still running at 100% the performance of the original C64.&lt;/p&gt;  &lt;p&gt;I am now running version &lt;a title="Mono 1.2.4: Release Notes" href="http://www.go-mono.com/archive/1.2.4/"&gt;1.2.4&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;I ran the emulator under both runtimes for about 90 seconds, and monitored the CPU usage under the Performance Monitor.&amp;#160; I started monitoring after the emulator had fully started up, to exclude JIT overhead.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;hr /&gt;  &lt;table cellspacing="0" cellpadding="2" width="466" border="0"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="139"&gt;&lt;strong&gt;Command Line&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="102"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="127"&gt;&lt;strong&gt;CPU Usage (%)&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="96"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="139"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="102"&gt;&lt;strong&gt;Average&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="127"&gt;&lt;strong&gt;Minimum&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="96"&gt;&lt;strong&gt;Maximum&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="139"&gt;mono TestHost.exe&lt;/td&gt;        &lt;td valign="top" width="102"&gt;&lt;font color="#008000"&gt;&lt;strong&gt;38.813&lt;/strong&gt;&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="127"&gt;29.687&lt;/td&gt;        &lt;td valign="top" width="96"&gt;67.187&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="139"&gt;TestHost.exe&lt;/td&gt;        &lt;td valign="top" width="103"&gt;45.229&lt;/td&gt;        &lt;td valign="top" width="127"&gt;&lt;font color="#008000"&gt;&lt;strong&gt;21.875&lt;/strong&gt;&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="96"&gt;&lt;font color="#008000"&gt;&lt;strong&gt;59.375&lt;/strong&gt;&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;hr /&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Granted, these tests aren't entirely scientific, but for 90 seconds, the average is quite different, in Mono's favour.&lt;/p&gt;  &lt;p&gt;Could the recent patches to the MS runtime be causing the drop in performance?&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Turns out that my machine was set 'Maximum Battery' mode.&amp;#160; In 'Maximum Performance' mode.&amp;#160; I wonder why Mono performs better in this scenario?&lt;/p&gt;  &lt;p&gt;When reverted to 'Maximum Performance', the CPU usage of Mono didn't change (~38%) and is fairly consistent:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="244" alt="image" src="http://lh5.google.com/stuart.carnie/R-FLjQwak3I/AAAAAAAAASs/fq6BLzF1LMA/image_thumb" width="168" border="0" /&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;whereas the MS JIT jumps from 20% to 40% in cycles, as follows.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="195" alt="image_3" src="http://lh3.google.com/stuart.carnie/R-FLjwwak4I/AAAAAAAAAS0/7XKz8fxGpt4/image_3_thumb" width="244" border="0" /&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;Each vertical line represents 4 seconds.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-4266106896432272471?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/4266106896432272471/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=4266106896432272471' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/4266106896432272471'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/4266106896432272471'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2007/07/recent-mono-ms-jit-observations-mono.html' title='Recent Mono / MS JIT observations with #64'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-1356484184855583801</id><published>2007-07-11T10:34:00.001-07:00</published><updated>2007-07-11T10:46:39.977-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='safari'/><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><title type='text'>Google Bookmarks 'bookmarklet' link in Safari</title><content type='html'>&lt;p&gt;If you&amp;nbsp;are unable to use the&amp;nbsp;Google Bookmarks 'bookmarklet' in Safari, the workaround is to manually add a bookmark and use the following javascript code for the address.&lt;/p&gt;&lt;pre&gt;javascript:(function(){a=window;b=document;c=encodeURIComponent;d=a.open("http://www.google.com/bookmarks/mark?op=edit&amp;amp;output=popup&amp;amp;bkmk="+c(b.location)+"&amp;amp;title="+c(b.title),"bkmk_popup","left="+((a.screenX||a.screenLeft)+10)+",top="+((a.screenY||a.screenTop)+10)+",height=420px,width=550px,resizable=1,alwaysRaised=1");a.setTimeout(function(){d.focus()},300)})();&lt;/pre&gt;
&lt;div&gt;The issue is the spaces and quotes in the original javascript code do not appear to be correctly&amp;nbsp;decoded in Safari.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-1356484184855583801?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/1356484184855583801/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=1356484184855583801' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/1356484184855583801'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/1356484184855583801'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2007/07/google-bookmarks-link-in-safari.html' title='Google Bookmarks &amp;#39;bookmarklet&amp;#39; link in Safari'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-162895570770044297</id><published>2007-05-15T13:48:00.001-07:00</published><updated>2007-05-15T13:49:25.125-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='mono'/><title type='text'>Mono 1.2.4 released</title><content type='html'>&lt;p&gt;According to the Mono Project feed, &lt;a title="Mono 1.2.4 Released" href="http://www.go-mono.com/archive/1.2.4/" target="_blank"&gt;Mono 1.2.4&lt;/a&gt; has been released.&amp;nbsp; Check out the link as there are lots of improvements.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-162895570770044297?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/162895570770044297/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=162895570770044297' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/162895570770044297'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/162895570770044297'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2007/05/mono-124-has-been-release.html' title='Mono 1.2.4 released'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-5592860231987021814</id><published>2007-05-15T10:53:00.001-07:00</published><updated>2007-05-15T11:26:50.236-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='monoxna'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='graphics'/><category scheme='http://www.blogger.com/atom/ns#' term='mono'/><category scheme='http://www.blogger.com/atom/ns#' term='xna'/><title type='text'>GraphicsDeviceCapabilities.CompareCaps</title><content type='html'>&lt;p&gt;Implemented &lt;a title="GraphicsDeviceCapabilities.CompareCaps" href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevicecapabilities.comparecaps_properties.aspx" target="_blank"&gt;CompareCaps&lt;/a&gt;&amp;nbsp;a few days ago, which are exposed via the &lt;a href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevicecapabilities.alphacomparecapabilities.aspx" target="_blank"&gt;AlphaCompareCapabilities&lt;/a&gt;&amp;nbsp;and &lt;a href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevicecapabilities.depthbuffercomparecapabilities.aspx" target="_blank"&gt;DepthBufferCompareCapabilities&lt;/a&gt;.&amp;nbsp; These indicate the comparison operators supported for the alpha and depth buffers.&amp;nbsp; Their OpenGL equivalents are &lt;a href="http://www.opengl.org/sdk/docs/man/xhtml/glAlphaFunc.xml" target="_blank"&gt;glAlphaFunc&lt;/a&gt; and &lt;a href="http://www.opengl.org/sdk/docs/man/xhtml/glDepthFunc.xml" target="_blank"&gt;glDepthFunc&lt;/a&gt; respectively.&lt;/p&gt; &lt;p&gt;The implementation was easy, since they were all supported since&amp;nbsp;v1.0 of OpenGL and therefore just return true.&lt;/p&gt; &lt;p&gt;As per &lt;a title="MSDN documentation for GraphicsDeviceCapabilities.CompareCaps" href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevicecapabilities.comparecaps.aspx" target="_blank"&gt;MSDN&lt;/a&gt; documentation,&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Represents comparison capabilities.&lt;/p&gt;&lt;/blockquote&gt; &lt;table width="100%" border="0"&gt; &lt;tbody valign="top"&gt; &lt;tr&gt; &lt;th style="width: 48%"&gt;Property&lt;/th&gt; &lt;th style="width: 48%"&gt;OpenGL Extension or Minimum Version&lt;/th&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevicecapabilities.comparecaps.supportsalways.aspx" target="_blank"&gt;SupportsAlways&lt;/a&gt;&lt;/td&gt; &lt;td&gt;v1.0&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevicecapabilities.comparecaps.supportsequal.aspx" target="_blank"&gt;SupportsEqual&lt;/a&gt;&lt;/td&gt; &lt;td&gt;v1.0&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevicecapabilities.comparecaps.supportsgreater.aspx" target="_blank"&gt;SupportsGreater&lt;/a&gt;&lt;/td&gt; &lt;td&gt;v1.0&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevicecapabilities.comparecaps.supportsgreaterequal.aspx" target="_blank"&gt;SupportsGreaterEqual&lt;/a&gt;&lt;/td&gt; &lt;td&gt;v1.0&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevicecapabilities.comparecaps.supportsless.aspx" target="_blank"&gt;SupportsLess&lt;/a&gt;&lt;/td&gt; &lt;td&gt;v1.0&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevicecapabilities.comparecaps.supportslessequal.aspx" target="_blank"&gt;SupportsLessEqual&lt;/a&gt;&lt;/td&gt; &lt;td&gt;v1.0&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevicecapabilities.comparecaps.supportsnever.aspx" target="_blank"&gt;SupportsNever&lt;/a&gt;&lt;/td&gt; &lt;td&gt;v1.0&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevicecapabilities.comparecaps.supportsnotequal.aspx" target="_blank"&gt;SupportsNotEqual&lt;/a&gt;&lt;/td&gt; &lt;td&gt;v1.0&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-5592860231987021814?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/5592860231987021814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=5592860231987021814' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/5592860231987021814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/5592860231987021814'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2007/05/graphicsdevicecapabilitiescomparecaps.html' title='GraphicsDeviceCapabilities.CompareCaps'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-7446177461978466167</id><published>2007-05-15T10:12:00.001-07:00</published><updated>2007-05-15T10:30:43.407-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='monoxna'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='graphics'/><category scheme='http://www.blogger.com/atom/ns#' term='mono'/><category scheme='http://www.blogger.com/atom/ns#' term='xna'/><title type='text'>MonoXna - what version of OpenGL?</title><content type='html'>&lt;p&gt;A few posts on the MonoXna groups generated an interesting discussion related to implementing the GraphicsDeviceCapabilities API.&amp;nbsp; What is the minimum version of OpenGL we should (or even can)&amp;nbsp;support?&lt;/p&gt; &lt;p&gt;There will be a number of features expected of the base Xna implementation, which will not be available in earlier versions of OpenGL.&amp;nbsp; &lt;/p&gt; &lt;p&gt;So far, from what I can tell we will need &lt;/p&gt; &lt;ul&gt; &lt;li&gt;v1.5 with a&amp;nbsp;significant set of ARB/EXT extensions&lt;/li&gt; &lt;li&gt;2.0 with the &lt;a title="GL_ARB_pixel_buffer_object" href="http://GL_ARB_pixel_buffer_object"&gt;pixel buffer&lt;/a&gt;, and a few other ARB/EXT extensions&lt;/li&gt; &lt;li&gt;2.1+&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Should we go straight for 2.0 or try to target 1.5?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-7446177461978466167?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/7446177461978466167/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=7446177461978466167' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/7446177461978466167'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/7446177461978466167'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2007/05/monoxna-what-version-of-opengl.html' title='MonoXna - what version of OpenGL?'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-7345565219157969766</id><published>2007-05-14T10:17:00.001-07:00</published><updated>2008-03-19T10:28:48.322-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='utility'/><title type='text'>Altap Salamander 2.5 has been released</title><content type='html'>&lt;p&gt;I am a long time user of &lt;a href="http://www.softpanorama.org/OFM/Paradigm/Ofm_08.shtml"&gt;Orthodox File Managers&lt;/a&gt;, which can generally be categorised as a two pane view of a hierarchical storage system.&amp;#160; Examples of these include file, registry, archive (zip, rar, etc) ftp, nfs, etc.&amp;#160; I used &lt;a href="http://farmanager.com/"&gt;Far&lt;/a&gt; for some time, which has a fantastic plug-in model, but was not progressing.&amp;#160; I changed to &lt;a title="Salamander 2.5" href="http://www.altap.cz/"&gt;Salamander 2.5 Beta&lt;/a&gt; well over a year ago, and have never looked back.&amp;#160; Now that it has been released, you can pick it up for $30 USD.&lt;/p&gt;  &lt;p&gt;Whilst Far is somewhat nostalgic of DOS file managers, like Norton and &lt;a title="XTree Pro 1.0" href="http://www.xtreefanpage.org/lowres/docs/xtp10sc.gif"&gt;XTree&lt;/a&gt;, we live in a world of WYSIWYG, and I find character mode doesn't cut it when previewing files.&amp;#160; This is where the move to Salamander was welcomed.&amp;#160; It's still missing features a loved in Far, but if Altap ever release their SDK, I'll be the first to jump in.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.google.com/stuart.carnie/R-FNRQwak_I/AAAAAAAAAT4/kym1gtXX-BA/image01%5B6%5D"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="470" alt="image01" src="http://lh3.google.com/stuart.carnie/R-FNRwwalAI/AAAAAAAAAUA/RldUk09T6D0/image01_thumb%5B4%5D" width="644" border="0" /&gt;&lt;/a&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;For OSX I have been experimenting with Disk Order 2.5 - it still has a ways to go, lacking many of the standard key strokes one expects from a 2 pane file manager, but is by far the best option on the Apple platform today.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="448" alt="image05" src="http://lh3.google.com/stuart.carnie/R-FNSwwalBI/AAAAAAAAAUI/4ydSrX9ZG8k/image05_thumb%5B3%5D" width="644" border="0" /&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-7345565219157969766?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/7345565219157969766/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=7345565219157969766' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/7345565219157969766'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/7345565219157969766'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2007/05/altap-salamander-25-has-been-released.html' title='Altap Salamander 2.5 has been released'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-69778919654666176</id><published>2007-05-09T00:47:00.001-07:00</published><updated>2007-05-15T09:40:04.700-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='monoxna'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='graphics'/><category scheme='http://www.blogger.com/atom/ns#' term='mono'/><category scheme='http://www.blogger.com/atom/ns#' term='xna'/><title type='text'>GraphicsDeviceCapabilities.BlendCaps structure</title><content type='html'>&lt;p&gt;&lt;/p&gt; &lt;p&gt;As per &lt;a title="MSDN documentation for GraphicsDeviceCapabilities.BlendCaps" href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevicecapabilities.blendcaps.aspx" target="_blank"&gt;MSDN&lt;/a&gt; documentation, &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Represents the supported blend capabilities.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;There are&amp;nbsp;14 capabilities for this structure, as follows&lt;/p&gt; &lt;p&gt; &lt;table width="100%" border="0"&gt; &lt;tbody valign="top"&gt; &lt;tr&gt; &lt;th style="width: 48%"&gt;Property&lt;/th&gt; &lt;th style="width: 48%"&gt;OpenGL Extension or Minimum Version&lt;/th&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a class="code" title="Gets a value indicating that the driver supports the Blend.One blend mode." href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevicecapabilities.blendcaps.supportsblendfactor.aspx" target="_blank"&gt;SupportsBlendFactor&lt;/a&gt;&lt;/td&gt; &lt;td&gt;V1.4 || &lt;a href="http://www.opengl.org/sdk/docs/man/xhtml/glBlendColor.xml"&gt;ARB_imaging&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a title="Gets a value indicating that the driver supports the Blend.BothInverseSourceAlpha blend mode." href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevicecapabilities.blendcaps.supportsbothinversesourcealpha.aspx" target="_blank"&gt;SupportsBothInverseSourceAlpha&lt;/a&gt;&lt;/td&gt; &lt;td&gt;&lt;a href="http://www.opengl.org/sdk/docs/man/xhtml/glBlendFunc.xml" target="_blank"&gt;V1.0&lt;/a&gt;&lt;a title="NVIDIA OpenGL Specs: GL_EXT_texture_edge_clamp" href="http://www.nvidia.com/dev_content/nvopenglspecs/GL_EXT_texture_edge_clamp.txt" target="_blank"&gt;&lt;/a&gt; &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a title="Gets a value indicating that the driver supports the Blend.BothSourceAlpha blend mode." href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevicecapabilities.blendcaps.supportsbothsourcealpha.aspx" target="_blank"&gt;SupportsBothSourceAlpha&lt;/a&gt; &lt;/td&gt; &lt;td&gt;&lt;a href="http://www.opengl.org/sdk/docs/man/xhtml/glBlendFunc.xml" target="_blank"&gt;V1.0&lt;/a&gt;&lt;a title="NVIDIA OpenGL Specs: GL_EXT_texture_edge_clamp" href="http://www.nvidia.com/dev_content/nvopenglspecs/GL_EXT_texture_edge_clamp.txt" target="_blank"&gt;&lt;/a&gt; &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a title="Gets a value indicating that the driver supports the Blend.DestinationAlpha blend mode." href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevicecapabilities.blendcaps.supportsdestinationalpha.aspx" target="_blank"&gt;SupportsDestinationAlpha&lt;/a&gt; &lt;/td&gt; &lt;td&gt;&lt;a href="http://www.opengl.org/sdk/docs/man/xhtml/glBlendFunc.xml" target="_blank"&gt;V1.0&lt;/a&gt;&lt;a title="NVIDIA OpenGL Specs: GL_EXT_texture_edge_clamp" href="http://www.nvidia.com/dev_content/nvopenglspecs/GL_EXT_texture_edge_clamp.txt" target="_blank"&gt;&lt;/a&gt; &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a title="Gets a value indicating that the driver supports the Blend.DestinationColor blend mode." href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevicecapabilities.blendcaps.supportsdestinationcolor.aspx" target="_blank"&gt;SupportsDestinationColor&lt;/a&gt; &lt;/td&gt; &lt;td&gt;&lt;a href="http://www.opengl.org/sdk/docs/man/xhtml/glBlendFunc.xml" target="_blank"&gt;V1.4&lt;/a&gt; &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a title="Gets a value indicating that the driver supports the Blend.InverseDestinationAlpha blend mode." href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevicecapabilities.blendcaps.supportsinversedestinationalpha.aspx" target="_blank"&gt;SupportsInverseDestinationAlpha&lt;/a&gt; &lt;/td&gt; &lt;td&gt;&lt;a href="http://www.opengl.org/sdk/docs/man/xhtml/glBlendFunc.xml" target="_blank"&gt;V1.0&lt;/a&gt; &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a title="Gets a value indicating that the driver supports the Blend.InverseDestinationColor blend mode." href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevicecapabilities.blendcaps.supportsinversedestinationcolor.aspx" target="_blank"&gt;SupportsInverseDestinationColor&lt;/a&gt; &lt;/td&gt; &lt;td&gt;&lt;a href="http://www.opengl.org/sdk/docs/man/xhtml/glBlendFunc.xml" target="_blank"&gt;V1.4&lt;/a&gt; &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a title="Gets a value indicating that the driver supports the Blend.InverseSourceAlpha blend mode." href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevicecapabilities.blendcaps.supportsinversesourcealpha.aspx" target="_blank"&gt;SupportsInverseSourceAlpha&lt;/a&gt;&amp;nbsp; &lt;/td&gt; &lt;td&gt;&lt;a href="http://www.opengl.org/sdk/docs/man/xhtml/glBlendFunc.xml" target="_blank"&gt;V1.0&lt;/a&gt; &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a title="Gets a value indicating that the driver supports the Blend.InverseSourceColor blend mode." href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevicecapabilities.blendcaps.supportsinversesourcecolor.aspx" target="_blank"&gt;SupportsInverseSourceColor&lt;/a&gt;&amp;nbsp; &lt;/td&gt; &lt;td&gt;&lt;a href="http://www.opengl.org/sdk/docs/man/xhtml/glBlendFunc.xml" target="_blank"&gt;V1.4&lt;/a&gt; &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a title="Gets a value indicating that the driver supports the Blend.One blend mode." href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevicecapabilities.blendcaps.supportsone.aspx" target="_blank"&gt;SupportsOne&lt;/a&gt; &lt;/td&gt; &lt;td&gt;&lt;a href="http://www.opengl.org/sdk/docs/man/xhtml/glBlendFunc.xml" target="_blank"&gt;V1.0&lt;/a&gt; &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a title="Gets a value indicating that the driver supports the Blend.SourceAlpha blend mode." href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevicecapabilities.blendcaps.supportssourcealpha.aspx" target="_blank"&gt;SupportsSourceAlpha&lt;/a&gt; &lt;/td&gt; &lt;td&gt;&lt;a href="http://www.opengl.org/sdk/docs/man/xhtml/glBlendFunc.xml" target="_blank"&gt;V1.0&lt;/a&gt; &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a title="Gets a value indicating that the driver supports the Blend.SourceAlphaSat blend mode." href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevicecapabilities.blendcaps.supportssourcealphasat.aspx" target="_blank"&gt;SupportsSourceAlphaSat&lt;/a&gt;&amp;nbsp; &lt;/td&gt; &lt;td&gt;&lt;a href="http://www.opengl.org/sdk/docs/man/xhtml/glBlendFunc.xml" target="_blank"&gt;V1.0&lt;/a&gt; &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a title="Gets a value indicating that the driver supports the Blend.SourceColor blend mode." href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevicecapabilities.blendcaps.supportssourcecolor.aspx" target="_blank"&gt;SupportsSourceColor&lt;/a&gt; &lt;/td&gt; &lt;td&gt;&lt;a href="http://www.opengl.org/sdk/docs/man/xhtml/glBlendFunc.xml" target="_blank"&gt;V1.4&lt;/a&gt; &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a title="Gets a value indicating that the driver supports the Blend.Zero blend mode." href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevicecapabilities.blendcaps.supportszero.aspx" target="_blank"&gt;SupportsZero&lt;/a&gt;&amp;nbsp; &lt;/td&gt; &lt;td&gt;&lt;a href="http://www.opengl.org/sdk/docs/man/xhtml/glBlendFunc.xml" target="_blank"&gt;V1.0&lt;/a&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;If these are not correct or you can help fill in the blanks, comments are welcome.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-69778919654666176?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/69778919654666176/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=69778919654666176' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/69778919654666176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/69778919654666176'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2007/05/graphicsdevicecapabilitiesblendcaps.html' title='GraphicsDeviceCapabilities.BlendCaps structure'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-3244606249465081464</id><published>2007-05-07T11:33:00.001-07:00</published><updated>2007-05-07T11:33:56.433-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='monoxna'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='graphics'/><category scheme='http://www.blogger.com/atom/ns#' term='mono'/><category scheme='http://www.blogger.com/atom/ns#' term='xna'/><title type='text'>Tao 2.0 and SDL.NET 6.0 released</title><content type='html'>&lt;p&gt;Great to see that &lt;a href="http://www.taoframework.com/news/2007/05/07/taoframework20"&gt;Tao 2.0&lt;/a&gt; and &lt;a href="http://cs-sdl.sourceforge.net/index.php/Main_Page"&gt;SDL.NET 6.0&lt;/a&gt; were released over the weekend.&amp;nbsp; &lt;/p&gt; &lt;p&gt;The pre-release versions are currently in use&amp;nbsp;by &lt;a href="http://groups.google.com/group/monoxna"&gt;MonoXna&lt;/a&gt;, so I look forward to updating to the released versions as soon as possible.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-3244606249465081464?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/3244606249465081464/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=3244606249465081464' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/3244606249465081464'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/3244606249465081464'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2007/05/tao-20-and-sdlnet-60-released.html' title='Tao 2.0 and SDL.NET 6.0 released'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-1529986662930800272</id><published>2007-05-04T09:05:00.001-07:00</published><updated>2007-05-06T23:14:49.614-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='monoxna'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='graphics'/><category scheme='http://www.blogger.com/atom/ns#' term='mono'/><category scheme='http://www.blogger.com/atom/ns#' term='xna'/><title type='text'>GraphicsDeviceCapabilities.AddressCaps structure</title><content type='html'>&lt;p&gt;As per &lt;a title="MSDN documentation for GraphicsDeviceCapabilities.AddressCaps" href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevicecapabilities.addresscaps.aspx" target="_blank"&gt;MSDN&lt;/a&gt; documentation, &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Represents the texture addressing capabilities for &lt;a href="http://msdn2.microsoft.com/microsoft.xna.framework.graphics.texture.aspx"&gt;Texture&lt;/a&gt; structures&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;There are 6 capabilities for this structure, as follows&lt;/p&gt; &lt;p&gt; &lt;table width="100%" border="0"&gt; &lt;tbody valign="top"&gt; &lt;tr&gt; &lt;th style="width: 20%"&gt;Property&lt;/th&gt; &lt;th style="width: 30%"&gt;OpenGL Extension or Minimum Version&lt;/th&gt; &lt;th style="width: 40%"&gt;Notes&lt;/th&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;pre class="code"&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevicecapabilities.addresscaps.supportsborder.aspx" target="_blank"&gt;SupportsBorder&lt;/a&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td&gt;&lt;pre class="code"&gt;&lt;a title="OpenGL&amp;reg; Extension Registry: GL_ARB_texture_border_clamp" href="http://opengl.org/registry/specs/ARB/texture_border_clamp.txt" target="_blank"&gt;GL_ARB_texture_border_clamp&lt;/a&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td&gt;Gets a value indicating whether the device supports the setting of coordinates outside the range [0.0, 1.0] to the border color.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;pre class="code"&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevicecapabilities.addresscaps.supportsclamp.aspx"&gt;SupportsClamp&lt;/a&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td&gt;&lt;pre class="code"&gt;&lt;a title="NVIDIA OpenGL Specs: GL_EXT_texture_edge_clamp" href="http://www.nvidia.com/dev_content/nvopenglspecs/GL_EXT_texture_edge_clamp.txt" target="_blank"&gt;GL_EXT_texture_edge_clamp&lt;/a&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td&gt;Gets a value indicating whether the device supports the clamping of textures to addresses.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;pre class="code"&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevicecapabilities.addresscaps.supportsindependentuv.aspx"&gt;SupportsIndependentUV&lt;/a&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;&lt;font color="#ff0000"&gt;Unknown&lt;/font&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Gets a value indicating whether the device can separate the texture-addressing modes of the texture's u and v coordinates.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;pre class="code"&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevicecapabilities.addresscaps.supportsmirror.aspx"&gt;SupportsMirror&lt;/a&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td&gt;&lt;pre class="code"&gt;&lt;a title="OpenGL&amp;reg; Extension Registry: GL_EXT_texture_mirror_clamp" href="http://opengl.org/registry/specs/EXT/texture_mirror_clamp.txt" target="_blank"&gt;GL_EXT_texture_mirror_clamp&lt;/a&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td&gt;Gets a value indicating whether a device can mirror textures to addresses.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;pre class="code"&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevicecapabilities.addresscaps.supportsmirroronce.aspx"&gt;SupportsMirrorOnce&lt;/a&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td&gt;&lt;pre class="code"&gt;&lt;a title="OpenGL&amp;reg; Extension Registry: GL_EXT_texture_mirror_clamp" href="http://opengl.org/registry/specs/EXT/texture_mirror_clamp.txt" target="_blank"&gt;GL_EXT_texture_mirror_clamp&lt;/a&gt;&lt;br&gt;+&lt;br&gt;&lt;a title="OpenGL&amp;reg; Extension Registry: GL_ATI_texture_mirror_once" href="http://opengl.org/registry/specs/ATI/texture_mirror_once.txt" target="_blank"&gt;GL_ATI_texture_mirror_once&lt;/a&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td&gt;Gets a value indicating whether a device can take the absolute value of the texture coordinate (thus, mirroring around 0) and then clamp to the maximum value.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;pre class="code"&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevicecapabilities.addresscaps.supportswrap.aspx"&gt;SupportsWrap&lt;/a&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;&lt;font color="#ff0000"&gt;Unknown&lt;/font&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Gets a value indicating whether a device can wrap textures to addresses.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;If these are not correct or you can help fill in the blanks, comments are welcome.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-1529986662930800272?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/1529986662930800272/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=1529986662930800272' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/1529986662930800272'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/1529986662930800272'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2007/05/graphicsdevicecapabilitiesaddresscaps.html' title='GraphicsDeviceCapabilities.AddressCaps structure'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-4572437080090380933</id><published>2007-05-04T08:06:00.001-07:00</published><updated>2007-05-06T23:14:49.615-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='monoxna'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='graphics'/><category scheme='http://www.blogger.com/atom/ns#' term='mono'/><category scheme='http://www.blogger.com/atom/ns#' term='xna'/><title type='text'>GraphicsDeviceCapabilities and OpenGL</title><content type='html'>&lt;p&gt;Part of the process of implementing GraphicsDevice and GraphicsAdapter involve a number of related classes.&amp;nbsp; The first I'm going to tackle is &lt;a title="MSDN documentation for GraphicsDeviceCapabilities" href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevicecapabilities.aspx" target="_blank"&gt;GraphicsDeviceCapabilities&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;As per the MSDN documentation, this class represents the capabilities for the hardware.&amp;nbsp; It is made up of no less than 18 structures, defined with the GraphicsDeviceCapabilities class definition.&amp;nbsp; I expect I may run in to a few cross platform issues whilst implementing some of the queries, so it will be an interesting exercise.&lt;/p&gt; &lt;p&gt;Over the coming days / weeks / whenever, I'm going to document each structure as a separate article and on the Mono.XNA groups as to how I've obtained the capabilities, with references to articles, etc&amp;nbsp;- hopefully garnering feedback from the Mono.XNA team and other OpenGL / DirectX experts.&lt;/p&gt; &lt;p&gt;I've also created a &lt;a title="GraphicsDeviceCapabilities page" href="http://groups.google.com/group/monoxna/web/graphicsdevicecapabilities" target="_blank"&gt;page&lt;/a&gt; on the mono.xna discussion group, to track and document our implementation of the various GraphicsDeviceCapabilities structures.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-4572437080090380933?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/4572437080090380933/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=4572437080090380933' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/4572437080090380933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/4572437080090380933'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2007/05/graphicsdevicecapabilities-and-opengl.html' title='GraphicsDeviceCapabilities and OpenGL'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-2721620259204216019</id><published>2007-05-03T00:59:00.001-07:00</published><updated>2007-05-06T22:56:09.128-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><title type='text'>C# partial classes and file naming conventions</title><content type='html'>&lt;p&gt;I find that partial classes in C# have more uses than just the automatic .Designer.cs created by numerous designers in your IDE of choice.&lt;/p&gt; &lt;p&gt;In certain scenarios, I will create partial classes and use multiple files.&amp;nbsp; I&amp;nbsp;consider the &lt;code&gt;[&lt;strong&gt;Class&amp;nbsp;Name&lt;/strong&gt;].cs&lt;/code&gt; as the &lt;em&gt;primary&lt;/em&gt; file and &lt;code&gt;[Class Name].[&lt;strong&gt;Name&lt;/strong&gt;].cs&lt;/code&gt; as the satellite files.&amp;nbsp; The name is up to you,&amp;nbsp;but&amp;nbsp;should&amp;nbsp;succinctly&amp;nbsp;indicate&amp;nbsp;the function and preferrably is one word.&lt;/p&gt; &lt;p&gt;I've found in practice&amp;nbsp;it has worked very well, with regards to maintenance and&amp;nbsp;reducing the time to understand a class.&amp;nbsp; I've been using this convention for a while, and&amp;nbsp;felt it was time to review, given a&amp;nbsp;few ideas I've been tossing around.&lt;/p&gt; &lt;p&gt;Currently I only use it for classes that are large enough to warrant separating out functional areas.&amp;nbsp;&amp;nbsp;Additionally, if the class implements a complex interface or a related set of interfaces I may move these to a separate file.&lt;/p&gt; &lt;p&gt;I&amp;nbsp;consider this is appropriate&amp;nbsp;for larger classes and therefore you would always start off with a single file and as your implementation grows, reconsider if it is worth separating.&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Limiting the public interface of the class to the primary file, so it is very easy for a developer to view the file and determine the public API  &lt;ul&gt; &lt;li&gt;Move protected and private members to a separate file  &lt;ul&gt; &lt;li&gt;&lt;code&gt;[Class Name].&lt;strong&gt;private&lt;/strong&gt;.cs&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt; &lt;li&gt;When a class has a significant number of private and protected members, separate as &lt;ul&gt; &lt;li&gt;&lt;code&gt;[Class Name].&lt;strong&gt;private&lt;/strong&gt;.cs&lt;/code&gt;  &lt;li&gt;&lt;code&gt;[Class Name].&lt;strong&gt;protected&lt;/strong&gt;.cs&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;I know regions can provide similar functionality, assuming your editor supports outlining, but I tend to see them either overused or not at all.&amp;nbsp; When viewing a file in [insert simple text viewer of your choice], regions provide little value.&lt;/p&gt; &lt;p&gt;I usually limit regions to:&lt;/p&gt; &lt;p&gt;&lt;code&gt;#region private fields&lt;br&gt;#region constructors&lt;br&gt;#region public members&lt;br&gt;#region protected members&lt;br&gt;#region private members&lt;/code&gt;&lt;/p&gt; &lt;p&gt;Thoughts?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-2721620259204216019?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/2721620259204216019/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=2721620259204216019' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/2721620259204216019'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/2721620259204216019'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2007/05/c-partial-classes-and-file-naming.html' title='C# partial classes and file naming conventions'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-3330971917352691235</id><published>2007-05-02T00:54:00.001-07:00</published><updated>2007-05-06T23:14:49.615-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='monoxna'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='graphics'/><category scheme='http://www.blogger.com/atom/ns#' term='mono'/><category scheme='http://www.blogger.com/atom/ns#' term='xna'/><title type='text'>GamePad and Color implementations for Mono XNA</title><content type='html'>&lt;p&gt;Just posted some updates to the repository tonight, now that I have write access.&amp;nbsp; This is really going to help me, in moving things along whilst I have a &lt;em&gt;little&lt;/em&gt; time to contribute right now.&lt;/p&gt; &lt;ul&gt; &lt;li&gt;GamePad  &lt;ul&gt; &lt;li&gt;As previously mentioned, GamePad has a preliminary implementation of the two dead zone algorithms now  &lt;li&gt;Unit tests (where possible) have also been submitted&lt;br&gt;&lt;/li&gt;&lt;/ul&gt; &lt;li&gt;Color  &lt;ul&gt; &lt;li&gt;The initial source appeard to come from the System.Drawing namespace in the mono implementation of the BCL, so it was&amp;nbsp;a little&amp;nbsp;heavy for XNA.&amp;nbsp; I've submitted a revised versions that is greatly simplified and is now 100% complete, with associated unit tests.  &lt;li&gt;These unit tests helped me figure out a few things about the MS implementation, including the fact that Vector3 / Vector4 conversions use rounding rather than truncation.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;I've started work on GraphicsDevice and Graphics adapter, but these will require&amp;nbsp;acquiring a more thorough knowledge of OpenGL.&amp;nbsp; To assist with this process, I've ordered the &lt;a title="OpenGL Red Book" href="http://www.amazon.com/exec/obidos/ASIN/0321335732/khongrou-20" target="_blank"&gt;Red Book&lt;/a&gt;&amp;nbsp;and &lt;a title="OpenGL Distilled" href="http://www.amazon.com/OpenGL-R-Distilled-Paul-Martz/dp/0321336798/ref=sr_1_1/002-0348226-0437641?ie=UTF8&amp;amp;s=books&amp;amp;qid=1178092230&amp;amp;sr=1-1" target="_blank"&gt;OpenGL Distilled&lt;/a&gt;.&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; I've added the &lt;a title="OpenGL: Reference Manual" href="http://www.amazon.com/gp/product/032117383X/002-0348226-0437641" target="_blank"&gt;OpenGL: Reference Manual&lt;/a&gt; to that order&lt;/p&gt; &lt;p&gt;I'll post some&amp;nbsp;discovery in the coming days.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-3330971917352691235?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/3330971917352691235/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=3330971917352691235' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/3330971917352691235'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/3330971917352691235'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2007/05/gamepad-and-color-implementations-for.html' title='GamePad and Color implementations for Mono XNA'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-1775476035300250603</id><published>2007-04-30T11:24:00.001-07:00</published><updated>2008-03-19T10:36:43.267-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='monoxna'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='graphics'/><category scheme='http://www.blogger.com/atom/ns#' term='mono'/><category scheme='http://www.blogger.com/atom/ns#' term='xna'/><title type='text'>GamePad Dead Zone functionality</title><content type='html'>&lt;p&gt;The last couple of nights I've been working on the dead zone functionality for the GamePad class in MonoXna, which was an interesting excursion off into formula's and equations I haven't been exposed to for many years.&lt;/p&gt;  &lt;p&gt;I read an post by &lt;a title="Gamepads suck" href="http://blogs.msdn.com/shawnhar/archive/2007/03/28/gamepads-suck.aspx" target="_blank"&gt;Shawn Hargreaves&lt;/a&gt;, which gave me a good start on understanding the MSXNA implementation.&amp;#160; I've now implemented the basic functionality of the two algorithms, &lt;a title="IndependentAxis" href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.input.gamepaddeadzone.aspx" target="_blank"&gt;IndependentAxis&lt;/a&gt; and &lt;a title="MSDN link for Circular" href="http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.input.gamepaddeadzone.aspx" target="_blank"&gt;Circular&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;I used Shawn's formula for the IndependentAxis deadzone calculation and here is a plot of this:&lt;/p&gt;  &lt;p&gt;   &lt;table width="100%" align="center"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td align="center"&gt;Independent Axis - Plot X&lt;/td&gt;          &lt;td align="center"&gt;Independent Axis - Plot XY&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td align="center"&gt;&lt;a href="http://lh4.google.com/stuart.carnie/R-FOLAwalCI/AAAAAAAAAVY/3S1_mAaNIwY/IndependentAxisPlotX4%5B2%5D" target="target"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="244" alt="IndependentAxisPlotX4" src="http://lh6.google.com/stuart.carnie/R-FOLgwalDI/AAAAAAAAAVc/rlZhKufkwOg/IndependentAxisPlotX4_thumb%5B1%5D" width="230" border="0" /&gt;&lt;/a&gt;&amp;#160;&lt;/td&gt;          &lt;td align="center"&gt;&lt;a href="http://lh5.google.com/stuart.carnie/R-FO6QwalHI/AAAAAAAAAVA/hVgBro5qomw/IndependentAxisPlotXY1%5B1%5D"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="244" alt="IndependentAxisPlotXY1" src="http://lh4.google.com/stuart.carnie/R-FOMAwalEI/AAAAAAAAAVI/nWHb8gTuNmU/IndependentAxisPlotXY1_thumb%5B1%5D" width="230" border="0" /&gt;&lt;/a&gt;&amp;#160; &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;p&gt;I ended up using a variation of Shawn's formula for the IndependentAxis and using a bit of trig, ended up with the following for the Circular implementation:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: rgb(128,128,128)"&gt;///&lt;/span&gt;&lt;span style="color: rgb(0,128,0)"&gt; &lt;/span&gt;&lt;span style="color: rgb(128,128,128)"&gt;&amp;lt;summary&amp;gt;
///&lt;/span&gt;&lt;span style="color: rgb(0,128,0)"&gt; As per http://blogs.msdn.com/shawnhar/archive/2007/03/28/gamepads-suck.aspx
&lt;/span&gt;&lt;span style="color: rgb(128,128,128)"&gt;///&lt;/span&gt;&lt;span style="color: rgb(0,128,0)"&gt; Both &lt;/span&gt;&lt;span style="color: rgb(128,128,128)"&gt;&amp;lt;paramref name=&amp;quot;x&amp;quot;/&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0,128,0)"&gt; and &lt;/span&gt;&lt;span style="color: rgb(128,128,128)"&gt;&amp;lt;paramref name=&amp;quot;y&amp;quot;/&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0,128,0)"&gt; parameters assumed to be between -1.0 and 1.0
&lt;/span&gt;&lt;span style="color: rgb(128,128,128)"&gt;///&lt;/span&gt;&lt;span style="color: rgb(0,128,0)"&gt; &lt;/span&gt;&lt;span style="color: rgb(128,128,128)"&gt;&amp;lt;/summary&amp;gt;
&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;static&lt;/span&gt; Vector2 CircularAxisDeadZone(&lt;span style="color: rgb(0,0,255)"&gt;float&lt;/span&gt; x, &lt;span style="color: rgb(0,0,255)"&gt;float&lt;/span&gt; y)
{
    &lt;span style="color: rgb(0,0,255)"&gt;float&lt;/span&gt; dist = (&lt;span style="color: rgb(0,0,255)"&gt;float&lt;/span&gt;)&lt;span style="color: rgb(43,145,175)"&gt;Math&lt;/span&gt;.Max(&lt;span style="color: rgb(43,145,175)"&gt;Math&lt;/span&gt;.Sqrt(x * x + y * y), EPSILON);
    &lt;span style="color: rgb(0,0,255)"&gt;float&lt;/span&gt; deadZone = &lt;span style="color: rgb(43,145,175)"&gt;Math&lt;/span&gt;.Max(dist - DEADZONE, 0)/(MAX_DIST - DEADZONE)/dist;
    &lt;span style="color: rgb(0,0,255)"&gt;return&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; Vector2(x*deadZone, y*deadZone);
}&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;The MSDN documentation states that the Circular algorithm uses the combined position of both joystick axes to make the deadzone calculation.&amp;#160; So, &lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;We calculate the &lt;em&gt;dist&lt;/em&gt;ance from the centre, and if zero, returning EPSILON, so we never divide by zero. &lt;/li&gt;

  &lt;li&gt;If we're in the DEADZONE (=0.2f), we'll clamp to 0, otherwise we'll create a weighting factor for the deadzone calculation &lt;/li&gt;

  &lt;li&gt;return a Vector2 with the new x,y values &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here is a plot of our IndependentAxis calculation:&lt;/p&gt;

&lt;table width="100%" align="center"&gt;&lt;tbody&gt;
    &lt;tr&gt;
      &lt;td align="center"&gt;Circular - Plot XY&lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td align="center"&gt;&lt;a href="http://lh4.google.com/stuart.carnie/R-FO7AwalII/AAAAAAAAAVM/OjbQKVWk0QU/CircularPlotXY1%5B1%5D"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="244" alt="CircularPlotXY1" src="http://lh4.google.com/stuart.carnie/R-FONAwalFI/AAAAAAAAAVU/5FASbOSfKjQ/CircularPlotXY1_thumb%5B1%5D" width="230" border="0" /&gt;&lt;/a&gt;&amp;#160; &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;&lt;/table&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-1775476035300250603?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/1775476035300250603/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=1775476035300250603' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/1775476035300250603'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/1775476035300250603'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2007/04/gamepaddeadzone-functionality.html' title='GamePad Dead Zone functionality'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-6459731654847640107</id><published>2007-04-23T09:55:00.001-07:00</published><updated>2007-05-06T22:54:44.351-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='c64'/><category scheme='http://www.blogger.com/atom/ns#' term='graphics'/><category scheme='http://www.blogger.com/atom/ns#' term='mono'/><title type='text'>#64 - Commodore 64 emulator on Mono</title><content type='html'>&lt;p&gt;With the recent&amp;nbsp;success of running Pong on Mono.Xna, on the&amp;nbsp;mono runtime, I decided to try my port of #64.&amp;nbsp; I was pleasantly surprised to see it run without recompilation or any issues on the mono runtime.&lt;/p&gt; &lt;p&gt;My first observation was the not insignificant increase in CPU usage over running on the Microsoft JIT.&amp;nbsp; &lt;/p&gt; &lt;p&gt;I haven't had a chance to dig into things yet, and it may not be for a while, some areas I will look at are:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;switch statements  &lt;ul&gt; &lt;li&gt;Like many emulators,&amp;nbsp;#64 has a&amp;nbsp;number of&amp;nbsp;large switch statements to emulate the various CPUs (6502, 6510, 6581, 6569, etc), and these are perhaps not as well optimized as the MS JIT.&lt;br&gt;&lt;/li&gt;&lt;/ul&gt; &lt;li&gt;inlining  &lt;ul&gt; &lt;li&gt;Whilst I inlined some code, the other possibility is that the mono JIT may not be as aggressive when inlining code.&lt;br&gt;&lt;/li&gt;&lt;/ul&gt; &lt;li&gt;floating point  &lt;ul&gt; &lt;li&gt;The sound emulation does use a significant amount of floating point code.&lt;br&gt;&lt;/li&gt;&lt;/ul&gt; &lt;li&gt;memory allocation  &lt;ul&gt; &lt;li&gt;I am pretty sure the memory allocation is minimal, and suspect the mono memory allocator is just a pointer being incremented, much like the MS&amp;nbsp;implementation&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;It will be an interesting journey into the inners of the code generation and optimizations, since I'm not familiar with all the optimization techniques.&amp;nbsp; I'll blog about my experiences when the time comes.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-6459731654847640107?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/6459731654847640107/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=6459731654847640107' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/6459731654847640107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/6459731654847640107'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2007/04/64-commodore-64-emulator-on-mono.html' title='#64 - Commodore 64 emulator on Mono'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-7932879749752227656</id><published>2007-04-19T00:05:00.001-07:00</published><updated>2008-03-19T10:34:16.307-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='monoxna'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='graphics'/><category scheme='http://www.blogger.com/atom/ns#' term='mono'/><category scheme='http://www.blogger.com/atom/ns#' term='xna'/><title type='text'>Running Pong under Mono.Xna on mono</title><content type='html'>&lt;p&gt;It is official; we've successfully run Pong under Mono.Xna!&amp;#160; It is running with either the Microsoft or mono runtimes!&lt;/p&gt;  &lt;p&gt;Last night, I completed most of the core functionality within the Microsoft.Xna.Framework.Game.dll assembly, and wrote a number of unit tests to exercise the Game logic.&lt;/p&gt;  &lt;p&gt;Looks and runs identical to it's counterpart running under the Microsoft implementation of Xna.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="260" alt="PongFirstRun3" src="http://lh3.google.com/stuart.carnie/R-FOlwwalGI/AAAAAAAAAUw/_bISYUkRu8s/PongFirstRun3_thumb%5B2%5D" width="394" border="0" /&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strike&gt;My next step is to run it under the mono runtime on my windows machine and then follow with running it on my MacBook Pro.&lt;/strike&gt;&amp;#160; This is completed.&amp;#160; Now for my Macbook Pro.&lt;/p&gt;  &lt;p&gt;I will submit patches after I complete the additional classes I stubbed to get this basically working.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-7932879749752227656?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/7932879749752227656/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=7932879749752227656' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/7932879749752227656'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/7932879749752227656'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2007/04/running-pong-under-monoxna.html' title='Running Pong under Mono.Xna on mono'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-864379263556829914</id><published>2007-04-17T14:10:00.001-07:00</published><updated>2007-05-06T23:14:49.617-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='monoxna'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='graphics'/><category scheme='http://www.blogger.com/atom/ns#' term='mono'/><category scheme='http://www.blogger.com/atom/ns#' term='xna'/><title type='text'>Mono.Xna - The beginning</title><content type='html'>&lt;h2&gt;Why?&lt;/h2&gt; &lt;p&gt;Given my interest in game programming, graphics and generally making computers do interesting things other than running enterprise software, I've starting contributing to the mono.xna team.&lt;/p&gt; &lt;p&gt;These series of posts, tagged with XNA, will chronicle my findings, exploration and implementation of my areas of the &lt;a title="XNA" href="http://msdn2.microsoft.com/en-us/xna/default.aspx" target="_blank"&gt;XNA&lt;/a&gt; framework.&lt;/p&gt; &lt;h2&gt;Hardware and Development&lt;/h2&gt; &lt;p&gt;I own a Macbook Pro and a Windows laptop, so I can develop and test on both these platforms.&amp;nbsp; My primary development environment will be VS 2005, since I cannot live without &lt;a href="http://www.jetbrains.com/resharper/"&gt;Resharper 2.5&lt;/a&gt;, and think any serious software engineer should at least look at this tool.&lt;/p&gt; &lt;h2&gt;And it begins...&lt;/h2&gt; &lt;p&gt;After I obtained the current &lt;a title="monoxna svn repository" href="http://code.google.com/p/monoxna/"&gt;code&lt;/a&gt;, I found the best place to start was implementing the classes in Microsoft.Xna.Framework.Game.dll, since this assembly was largely unimplemented, and is really one of the core entry points for a consumer of this framework.&lt;/p&gt; &lt;p&gt;Based on previous&amp;nbsp;conversations in the &lt;a title="mono.xna discussion group" href="http://groups.google.com/group/monoxna"&gt;discussion group&lt;/a&gt;, &lt;a href="http://taoframework.com/"&gt;Tao&lt;/a&gt; and &lt;a href="http://cs-sdl.sourceforge.net/index.php/Main_Page"&gt;SDL.NET&lt;/a&gt; are the cross-platform APIs of choice.&amp;nbsp; This was great to see, given I've previously used and contributed to SDL.NET for my C# implementation of the Frodo C64 emulator, and found it easy to use.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-864379263556829914?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/864379263556829914/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=864379263556829914' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/864379263556829914'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/864379263556829914'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2007/04/monoxna-beginning.html' title='Mono.Xna - The beginning'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-7783970389192187194</id><published>2007-04-04T13:47:00.000-07:00</published><updated>2007-05-06T22:57:04.729-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>Command Prompt : Set the title for easier ALT-TAB</title><content type='html'>If you are like me, and run several command prompts at any given time, rooted at different folders, it turns into a game of chance, when 'ALT-TAB'ing.  "Visual Studio 2005 Command Prompt" is a little too generic.&lt;br/&gt;
&lt;br/&gt;
I'm in the habit of using the&lt;span style="font-family:courier new;"&gt; title &lt;/span&gt;command to use something more meaningful:&lt;br/&gt;

&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_WTgxY9AxbJk/RhQQJzP5kcI/AAAAAAAAAKw/TtfVCHDOeYE/s1600-h/commandprompt.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_WTgxY9AxbJk/RhQQJzP5kcI/AAAAAAAAAKw/TtfVCHDOeYE/s320/commandprompt.png" alt="" id="BLOGGER_PHOTO_ID_5049678842750931394" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-7783970389192187194?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/7783970389192187194/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=7783970389192187194' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/7783970389192187194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/7783970389192187194'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2007/04/command-prompt-set-title-for-easier-alt.html' title='Command Prompt : Set the title for easier ALT-TAB'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_WTgxY9AxbJk/RhQQJzP5kcI/AAAAAAAAAKw/TtfVCHDOeYE/s72-c/commandprompt.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-2662925074348445284</id><published>2007-03-25T11:42:00.000-07:00</published><updated>2007-05-06T22:56:09.129-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='utility'/><title type='text'>Generic copy object using Lightweight Code Generation</title><content type='html'>I was involved in a &lt;a href="http://tinyurl.com/pajcl"&gt;discussion&lt;/a&gt; on microsoft.public.dotnet.framework.clr regarding reflection and lightweight code generation. The original topic was in regards to a 2x slowdown using reflection in .NET 2.0 over 1.1, which was ultimately recognised as a bug by the Microsoft CLR team. I brought up the possibility of using LCG as an alternative in 2.0, and the one of the contributers presented some good examples of using &lt;a href="http://msdn2.microsoft.com/en-us/library/system.delegate.createdelegate.aspx"&gt;Delegate.CreateDelegate.&lt;/a&gt; Here I wanted to present a use of LCG to copy all the public read/write properties of any object. The meat of the example was the GenerateCopyDelegate function, as follows: &lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt; &lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;static&lt;/span&gt; CopyPublicPropertiesDelegate&amp;lt;T&amp;gt; GenerateCopyDelegate&amp;lt;T&amp;gt;()&lt;/pre&gt;&lt;pre&gt;{&lt;/pre&gt;&lt;pre class="alt"&gt;    Type type = &lt;span class="kwrd"&gt;typeof&lt;/span&gt;(T);&lt;/pre&gt;&lt;pre&gt; &lt;/pre&gt;&lt;pre class="alt"&gt;    DynamicMethod dm = &lt;span class="kwrd"&gt;new&lt;/span&gt; DynamicMethod(type.Name, &lt;span class="kwrd"&gt;null&lt;/span&gt;, &lt;span class="kwrd"&gt;new&lt;/span&gt; Type[] { &lt;span class="kwrd"&gt;typeof&lt;/span&gt;(T), &lt;span class="kwrd"&gt;typeof&lt;/span&gt;(T) }, &lt;span class="kwrd"&gt;typeof&lt;/span&gt;(Program).Module);&lt;/pre&gt;&lt;pre&gt; &lt;/pre&gt;&lt;pre class="alt"&gt;    ILGenerator il = dm.GetILGenerator();&lt;/pre&gt;&lt;pre&gt; &lt;/pre&gt;&lt;pre class="alt"&gt;    PropertyInfo[] props = type.GetProperties(BindingFlags.Public | BindingFlags.Instance);&lt;/pre&gt;&lt;pre&gt; &lt;/pre&gt;&lt;pre class="alt"&gt;    &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (PropertyInfo prop &lt;span class="kwrd"&gt;in&lt;/span&gt; props)&lt;/pre&gt;&lt;pre&gt;    {&lt;/pre&gt;&lt;pre class="alt"&gt;        &lt;span class="kwrd"&gt;if&lt;/span&gt; (prop.CanRead &amp;amp;&amp;amp; prop.CanWrite)&lt;/pre&gt;&lt;pre&gt;        {&lt;/pre&gt;&lt;pre class="alt"&gt;            il.Emit(OpCodes.Ldarg_1);&lt;/pre&gt;&lt;pre&gt;            il.Emit(OpCodes.Ldarg_0);&lt;/pre&gt;&lt;pre class="alt"&gt;            il.EmitCall(OpCodes.Callvirt, prop.GetGetMethod(), &lt;span class="kwrd"&gt;null&lt;/span&gt;);&lt;/pre&gt;&lt;pre&gt;            il.EmitCall(OpCodes.Callvirt, prop.GetSetMethod(), &lt;span class="kwrd"&gt;null&lt;/span&gt;);&lt;/pre&gt;&lt;pre class="alt"&gt;        }&lt;/pre&gt;&lt;pre&gt;    }&lt;/pre&gt;&lt;pre class="alt"&gt;    il.Emit(OpCodes.Ret);&lt;/pre&gt;&lt;pre&gt; &lt;/pre&gt;&lt;pre class="alt"&gt;    &lt;span class="kwrd"&gt;return&lt;/span&gt; (CopyPublicPropertiesDelegate&amp;lt;T&amp;gt;)dm.CreateDelegate(&lt;span class="kwrd"&gt;typeof&lt;/span&gt;(CopyPublicPropertiesDelegate&amp;lt;T&amp;gt;));&lt;/pre&gt;&lt;pre&gt;}&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;table style="background-color: lightgrey"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Method&lt;/td&gt;
&lt;td style="text-align: center" colspan="3"&gt;Calls (per iteration)&lt;/td&gt;
&lt;td style="width: 77px"&gt;Total Calls&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;Delegate&lt;/td&gt;
&lt;td&gt;get_*&lt;/td&gt;
&lt;td&gt;set_*&lt;/td&gt;
&lt;td style="width: 77px"&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LCG&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td style="width: 77px"&gt;13,000,000&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Delegate&lt;/td&gt;
&lt;td&gt;12&lt;/td&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td style="width: 77px"&gt;24,000,000&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-2662925074348445284?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/2662925074348445284/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=2662925074348445284' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/2662925074348445284'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/2662925074348445284'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2007/03/generic-copy-object-using-lightweight.html' title='Generic copy object using Lightweight Code Generation'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-8728820290825146893</id><published>2007-03-19T13:49:00.000-07:00</published><updated>2007-05-06T22:56:09.129-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='utility'/><title type='text'>A simple console logger</title><content type='html'>A very simple class for logging output to the console.  What's special about it?
&lt;ul&gt;&lt;li&gt;Intended for the console only.&lt;/li&gt;&lt;ul&gt;&lt;li&gt;I wanted to keep the code &lt;span style="font-style: italic;"&gt;very&lt;/span&gt; simple.
&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Uses colour to differentiate the log message based on type: INFO, WARN or ERROR.
&lt;/li&gt;&lt;li&gt;Supports immediate or buffered output&lt;/li&gt;&lt;ul&gt;&lt;li&gt;All colour output is honoured in buffered mode.&lt;/li&gt;&lt;li&gt;Use Logger.Flush() to display pending output.&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;
Get it &lt;a href="http://www.carnie.us/stuart/blog/code-snippets/logger/Logger.cs.txt"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-8728820290825146893?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/8728820290825146893/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=8728820290825146893' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/8728820290825146893'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/8728820290825146893'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2007/03/simple-console-logger.html' title='A simple console logger'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-3308762201268689540</id><published>2007-03-19T01:41:00.000-07:00</published><updated>2007-05-06T22:56:09.130-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><title type='text'>A better FindControl: FindControlOf&lt;T&gt;</title><content type='html'>Whilst helping a colleague with some ASP.NET questions, I found a number of blocks enumerating the Controls collection for specific control types. Having to enumerate and determine the control type can become quite tedious, so I provided an iterator to simplify:&lt;br&gt;&lt;br&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt; &lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;static&lt;/span&gt; IEnumerable FindControlsOf&amp;lt;T&amp;gt;(Control parent)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;    &lt;span class="kwrd"&gt;where&lt;/span&gt; T : &lt;span class="kwrd"&gt;class&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;{&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;    &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (Control control &lt;span class="kwrd"&gt;in&lt;/span&gt; parent.Controls)&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;    {&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;        T item = control &lt;span class="kwrd"&gt;as&lt;/span&gt; T;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;        &lt;span class="kwrd"&gt;if&lt;/span&gt; (item != &lt;span class="kwrd"&gt;null&lt;/span&gt;)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;        {&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;            &lt;span class="kwrd"&gt;yield&lt;/span&gt; &lt;span class="kwrd"&gt;return&lt;/span&gt; item;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;        }&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;        &lt;span class="rem"&gt;// Don't enumerate the children, if control is type T as an optimization, since our&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;        &lt;span class="rem"&gt;// typical search criteria is not container controls.  If the criteria changes, &lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;        &lt;span class="rem"&gt;// remove the "item == null" check.&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt;        &lt;span class="kwrd"&gt;if&lt;/span&gt; (item == &lt;span class="kwrd"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; control.Controls.Count &amp;gt; 0)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;        {&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt;            &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (T child &lt;span class="kwrd"&gt;in&lt;/span&gt; FindControlsOf&amp;lt;T&amp;gt;(control))&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  18:  &lt;/span&gt;            {&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  19:  &lt;/span&gt;                &lt;span class="kwrd"&gt;yield&lt;/span&gt; &lt;span class="kwrd"&gt;return&lt;/span&gt; child;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  20:  &lt;/span&gt;            }&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  21:  &lt;/span&gt;        }&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  22:  &lt;/span&gt;    }&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  23:  &lt;/span&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;br&gt;&lt;br&gt;Making it easy to enumerate controls of a specific type:&lt;br&gt;&lt;br&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;foreach&lt;/span&gt; (MyControl sa &lt;span class="kwrd"&gt;in&lt;/span&gt; FindControlsOf&amp;lt;MyControl&amp;gt;(pnlMyContainer))&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;{&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;    ...&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;br&gt;&lt;br&gt;I should point out that this code generates recursive state machines depending on the depth of the hierarchy of controls, so it should be used carefully.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-3308762201268689540?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/3308762201268689540/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=3308762201268689540' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/3308762201268689540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/3308762201268689540'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2007/03/better-findcontrol-findcontrolof.html' title='A better FindControl: FindControlOf&amp;lt;T&amp;gt;'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-3258509674313844470</id><published>2006-08-31T22:48:00.000-07:00</published><updated>2007-05-06T23:22:57.878-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='o/r mapping'/><title type='text'>Caching and O/R mapping</title><content type='html'>&lt;p&gt;I was forwarded an article titled &lt;a href="http://weblogs.asp.net/fbouma/archive/2006/08/31/Why-a-cache-in-an-O_2F00_R-mapper-doesn_2700_t-make-it-fetch-data-faster_2E00_.aspx"&gt;&lt;i&gt;Why a cache in an O/R mapper doesn't make it fetch data faster&lt;/i&gt;&lt;/a&gt; and felt the need redirect the audience to some examples demonstrating the benefits of a well designed caching systems. &lt;/p&gt; &lt;p&gt;The author appears to be concerned you don't know if the data in the cache is dirty.&amp;nbsp; Although, fails to point at the reason for this uncertainty.&amp;nbsp; There are many reasons this could be the case, but why not provide an API or services for external applications, forcing them through you O/R framework (perhaps in an abstracted way), ensuring the cache is kept up to date.&amp;nbsp; I've read several articles (and my own tests with applications I've worked with) that demonstrate typical applications perform a greater percentage of reads than writes, further suggesting a cache is beneficial.&lt;/p&gt; &lt;h3&gt;What’s a cache?&lt;/h3&gt; &lt;p&gt;&lt;i style="font-weight: bold"&gt;&lt;span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span&gt;I’d like to refer to &lt;a href="http://www.sharpened.net/glossary/definition.php?cache"&gt;this&lt;/a&gt; definition, in particular “A cache stores recently-used information in a place where it can be accessed extremely fast.”.&lt;span&gt; &lt;/span&gt;I disagree that the &lt;a href="http://www.martinfowler.com/eaaCatalog/identityMap.html"&gt;Identity Map&lt;/a&gt; (or &lt;i&gt;uniqing&lt;/i&gt;) Frans refers to is necessarily the only cache used in O/R frameworks.&lt;/span&gt;&lt;/p&gt; &lt;h3&gt;Caches and queries: more overhead than efficiency&lt;/h3&gt; &lt;p&gt;Quoting from the author’s article,&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;So, when does this efficiency the myth talks about occur exactly?&amp;nbsp; Well, &lt;i&gt;almost&lt;/i&gt; never.&amp;nbsp; In fact, using a cache is often &lt;i&gt;less&lt;/i&gt; efficient.&amp;nbsp; I said &lt;i&gt;almost&lt;/i&gt;, as there are situations where a cache can help, though these are minor or require a lot of consessions.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;a href="http://www.hibernate.org/361.html"&gt;NHibernate&lt;/a&gt; (Hibernate ported to .NET) was developed with 2&lt;sup&gt;nd&lt;/sup&gt; level caching at its core, allowing you to control the caching options &lt;i&gt;per class&lt;/i&gt;, such as whether it writes-through or invalidates &lt;i&gt;it's entry&lt;/i&gt; on a write to the database, which I think is important in demonstrating a cache’s benefits.&amp;nbsp; Additionally, NHibernate can cache query results as a list of IDs, furthering the benefit of its cache and increasing the hits.&lt;/p&gt; &lt;p&gt;The 2&lt;sup&gt;nd&lt;/sup&gt; level cache is completely pluggable, so you have many options, including the ASP.NET &lt;a href="http://www.danga.com/memcached/"&gt;cache&lt;/a&gt;. For even greater scalability, consider a distributed caching solution such as &lt;a href="http://www.danga.com/memcached/"&gt;memcached&lt;/a&gt; or &lt;a href="http://www.alachisoft.com/ncache/intelligent_cache.html"&gt;NCache&lt;/a&gt;. This is counter to the point ‘.NET’ doesn’t have support for cross process or server object awareness.True, it’s not built in to the framework, but solutions certainly exist. &lt;/p&gt; &lt;p&gt;I now want to direct you to this article, &lt;a href="http://www.javalobby.org/java/forums/t48846.html"&gt;Hibernate: Truly Understanding the Second-Level and Query Caches&lt;/a&gt;, which goes in to all the detail you need to understand just how powerful a well designed O/R framework and caching subsystem can be.&lt;/p&gt; &lt;p&gt;In the author’s example, we could create a named NHibernate query, with appropriate parameters, represented in &lt;abbr title="Hibernate Query Language"&gt;HQL&lt;/abbr&gt; as&lt;/p&gt; &lt;p&gt;&lt;span style="color: teal; font-family: consolas"&gt;IQuery&lt;/span&gt;&lt;span style="font-family: consolas"&gt; query = session.CreateQuery(&lt;span style="color: maroon"&gt;"from Customer C inner join C.Orders O where C.Orders.size &amp;gt; 5 and O.ModifyDate &amp;gt; :date"&lt;/span&gt;).SetDateTime(&lt;span style="color: maroon"&gt;"date"&lt;/span&gt;, &lt;span style="color: teal"&gt;DateTime&lt;/span&gt;.Now.AddDays(-30));&lt;/span&gt;&lt;/p&gt; &lt;p&gt;For the cache to be effective and accurate, all changes to the database must notify the cache, so we &lt;i&gt;know&lt;/i&gt; the entry in the cache is current, and therefore do not need to go to the database.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-3258509674313844470?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/3258509674313844470/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=3258509674313844470' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/3258509674313844470'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/3258509674313844470'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2006/08/caching-and-or-mapping.html' title='Caching and O/R mapping'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-339631009414799006</id><published>2006-08-31T17:27:00.000-07:00</published><updated>2007-05-06T23:23:30.834-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='sandcastle'/><title type='text'>August CTP Sandcastle buildchm.bat update</title><content type='html'>&lt;a href="http://www.carnie.us/stuart/buildchm/buildchm.zip"&gt;Here&lt;/a&gt; is an updated buildchm.bat that works with the August CTP of &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=e82ea71d-da89-42ee-a715-696e3a4873b2&amp;DisplayLang=en"&gt;Microsoft Sandcastle&lt;/a&gt;.  The steps were derived from the Sandcastle &lt;a href="http://blogs.msdn.com/sandcastle/archive/2006/07/29/682398.aspx"&gt;blog&lt;/a&gt;.

If you need to add additional assembly dependencies, edit the &lt;span style="font-family:courier new;"&gt;.BAT&lt;/span&gt; file, and locate the large comment.

Cheers&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-339631009414799006?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/339631009414799006/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=339631009414799006' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/339631009414799006'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/339631009414799006'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2006/08/august-ctp-sandcastle-buildchmbat.html' title='August CTP Sandcastle buildchm.bat update'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7494164.post-2794576889084859702</id><published>2006-08-30T21:40:00.000-07:00</published><updated>2008-03-19T10:25:37.014-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='c64'/><title type='text'>sharp-64 - A Commodore 64 emulator in C#</title><content type='html'>&lt;h3&gt;What is it?&lt;/h3&gt;  &lt;p&gt;As of today, I've scoured the internet, and think it is fair to say sharp-64 (#64) is the first Commodore 64 emulator for the .NET platform. I could go as far to say it's the first 'emulator' for the CLR, given various searches on google turned up nothing on the subject of emulation related to .NET / C# / CLR. #64 is written entirely in C#, using &lt;a href="http://cs-sdl.sourceforge.net/index.php/Main_Page"&gt;SDL.NET&lt;/a&gt; as the sound and audio library. By using SDL.NET, I expect to build #64 as a cross platform executable.&lt;/p&gt;  &lt;h3&gt;Why?&lt;/h3&gt;  &lt;p&gt;I've always had an interest in emulation and software emulators for old 8-bit platforms, such as the Commodore 64 and Atari 800XL (both of which I had as a youngster). I hacked around both machines quite a bit as a kid, learning 6502 assembler and playing with their excellent graphics and sound capabilities (of their time).   &lt;br /&gt;I also was interested in seeing how well the CLR handled the demands of an emulator, and how much I could optimize the code to gain every ounce of performance out of it.&lt;/p&gt;  &lt;h3&gt;How?&lt;/h3&gt;  &lt;p&gt;I cannot claim to have written the emulator from scratch - the credit goes to the excellent &lt;a href="http://frodo.cebix.net/"&gt;Frodo&lt;/a&gt; project. A very well designed and modular emulator written in C++. It is also a cycle exact emulator, meaning all the 'emulated' chips are in sync with each other, to the clock cycle. This allows emulation of practically every hardware hack on a real C64. Given the nature of cycle-exact emulators, they also require a greater demand of the platform it is executed upon, allowing me to further push the CLR.&lt;/p&gt;  &lt;h3&gt;Where is it at today?&lt;/h3&gt;  &lt;p&gt;It is a fully functioning C64 emulator, with sound and 1541 emulation via D64 virtual disks and mapping a directory. Sound and graphics use &lt;a href="http://cs-sdl.sourceforge.net/index.php/Main_Page"&gt;SDL.NET&lt;/a&gt;, with an extension to SDL.NET audio support for access to the streaming audio capabilities of SDL.    &lt;br /&gt;It has no user interface, besides the C64 itself, and therfore is not user friendly, nor is it recommended for a wide audience. Yet.    &lt;br /&gt;I have found a couple games do not work; however, they do fail with the official Frodo emulator, suggesting bugs in the original emulation code. I will try to troubleshoot this when I get some time.    &lt;br /&gt;#64 does have a few unsafe blocks, using pointers to access the emulated RAM, however I am planning to create some conditional defines and make these optional, to see how much overhead is incurred by the array bounds checks.&lt;/p&gt;  &lt;h3&gt;How does it perform?&lt;/h3&gt;  &lt;p&gt;When speed limiting is turned off, sharp-64 runs at greater than 400% of an original C64 on my 1.83GHz Core Duo Dell notebook.   &lt;br /&gt;I have tried various demos, such as those with FLI, FLD, DYCP, open borders, multiplexed sprites, timing dependent decoders, fast loaders etc, and they work great.    &lt;br /&gt;This is currently a straight port, so we may even be able to get closer to the C++ native version, which runs about twice the speed after some optimizations.&lt;/p&gt;  &lt;h3&gt;Can I play?&lt;/h3&gt;  &lt;p&gt;The full source is currently available via svn on sourceforge.net, &lt;a title="Source Code" href="https://svn.sourceforge.net/svnroot/sharp-c64"&gt;https://svn.sourceforge.net/svnroot/sharp-c64&lt;/a&gt;. There is no documentation on getting it running, so it's up to you to hack around for now. The place to modify which d64 or directory is used for the 1541 disk drive is in prefs.cs.&lt;/p&gt;  &lt;h3&gt;Screen shots? &lt;/h3&gt;  &lt;p&gt;&lt;a href="http://lh6.google.com/stuart.carnie/R-FMZgwak8I/AAAAAAAAATU/TgWMaV-loE4/Basic%5B3%5D"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="325" alt="Basic" src="http://lh6.google.com/stuart.carnie/R-FMKgwak5I/AAAAAAAAATc/FY0e-qRL4B8/Basic_thumb%5B1%5D" width="394" border="0" /&gt;&lt;/a&gt; CBM Basic &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.google.com/stuart.carnie/R-FMjAwak9I/AAAAAAAAATg/HemGHFOV-kg/Decath%5B3%5D"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="325" alt="Decath" src="http://lh4.google.com/stuart.carnie/R-FMLAwak6I/AAAAAAAAATo/5Cuh32Dcwuo/Decath_thumb%5B1%5D" width="394" border="0" /&gt;&lt;/a&gt; Decathalon &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.google.com/stuart.carnie/R-FMjwwak-I/AAAAAAAAATs/ffkuFq96ZZ0/BlueMax%5B3%5D"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="325" alt="BlueMax" src="http://lh6.google.com/stuart.carnie/R-FMLgwak7I/AAAAAAAAAT0/IxiSs63b8dg/BlueMax_thumb%5B1%5D" width="394" border="0" /&gt;&lt;/a&gt;&amp;#160; Blue Max&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7494164-2794576889084859702?l=aussiebloke.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aussiebloke.blogspot.com/feeds/2794576889084859702/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7494164&amp;postID=2794576889084859702' title='14 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/2794576889084859702'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7494164/posts/default/2794576889084859702'/><link rel='alternate' type='text/html' href='http://aussiebloke.blogspot.com/2006/08/sharp-64-commodore-64-emulator-in-c.html' title='sharp-64 - A Commodore 64 emulator in C#'/><author><name>Stuart</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>14</thr:total></entry></feed>
