Building a Dreamcast Emulator for Xbox 360

Tuesday, January 17th, 2012

In 2008 I built a prototype software emulator for the Dreamcast that could run on an Xbox 360. Although an ambitious goal, I had a few advantages in that I worked at Microsoft on the Xbox 360 project, had access to internal tools, and could seek help from Sega if necessary. This project was challenging however, due to the asymmetries of the two hardware platforms, the highly tuned nature of the target games, and the security models of both platforms.

Continue reading...

Avoiding a Common Objective-C Mistake

Wednesday, July 6th, 2011

There is one particular mistake that stands out to me as the most common error made by beginning iOS developers (even above misuse of auto-release pools). It essentially boils down to a (quite forgivable) lack of understanding of how properties and reference counting work within Modern Objective-C.

Continue reading...

Big Buck Bunny: Cairo vs. H.264

Sunday, July 3rd, 2011

Cairo is a simple video codec that I developed in early 2011 during the later stages of everyAir. The purpose of this codec was to experiment with compression features and learn about their individual impact on efficiency while developing a simple framework for future work. Cairo was also designed to be easy to understand, and serves as a great learning aid for students.

Throughout the development of Cairo I was greatly assisted by the availability of several world class H.264 encoders. These encoders provided a benchmark to which Cairo was tuned and re-tuned. Now that Cairo is complete, I thought it might be interesting to see how it performs against the best H.264 coder around: x264.

Note that this is not a rigorous comparison by any means. Further, it is notoriously difficult to compare video codecs due to the subjective nature of quality, inherent sampling error, operator bias, etc. This comparison is no doubt biased in favor of Cairo and should be taken with a large grain of salt.

Continue reading...

Objective-C Class Properties

Saturday, April 2nd, 2011

In Objective-C, an instance variable is simply an object member variable whose value is stored uniquely for each instance of the object. In a similar manner, instance member functions operate on a particular instance of an object, and have access to the object's instance variables. Interestingly, there is also the notion of a class member function, which must be called without respect to a particular object instance, and cannot access instance variables.


So far these concepts are fairly familiar to C++ programmers, as they are very similar to the concepts of static member variables, member functions (or methods), and static methods, respectively.


Judging by a quick scan of the popular programming websites however, it's clear that significant confusion arises from the fact that Objective-C provides no direct support for class member variables, similar to the notion of a static member variable in C++.

Continue reading...

Basics of Huffman Coding

Sunday, January 9th, 2011

Compression is the process of reducing the storage space requirement for a set of data by converting it into a more compact form than its original format. Huffman coding is one of the most well known compression schemes and it dates back to the early 1950s, when David Huffman first described it in his paper, "A Method for the Construction of Minimum Redundancy Codes."

Huffman coding works by deriving an optimal prefix code for a given alphabet that reduces the cost of frequent symbols, at the expense of less common ones. Let's walk through a simple example that demonstrates the process of building a Huffman code.

Continue reading...

De-3D: Watch 3D Movies in Comfortable 2D

Saturday, October 2nd, 2010

Like many people, I rushed to theatres in late 2009 to watch Avatar in stereo 3D. I viewed it with a large group of people and found that several members of the party experienced nausea or fatigue throughout the film. It turns out a significant percentage of the population1 is either stereo-blind or experiences discomfort when viewing 3D content, so this result isn't too surprising.

Immediately after finishing my first viewing of Avatar, I drove across town to catch a second showing using a different stereo technology and made a few observations that I believe may have contributed to viewer discomfort.

Ultimately, even the best stereo 3D content will still cause discomfort for some percentage of the population due to the inherent nature of the technology. As a result, given a sufficiently large group of moviegoers, some percentage is likely to prefer a 2D version over a 3D one. In these circumstances, a simple tweaking of the free 3D glasses given out at the theatre will allow a viewer to watch a 3D movie in the comfort of 2D.

Continue reading...



previous page    |    1    2    3    4    5    |    next page