26 January 2011

Microsoft, NetBSD, and extensible computing

Antti Kantee, a member of the NetBSD core group (as well as the author of the really cool rump subsystem - which, among other things, has helped fuel the explosion of automated testing which has been occurring recently) has just imported a new port to the NetBSD source tree:  eMIPS (Extensible MIPS), a dynamically extensible processor architecture from Microsoft Research.  The actual port of NetBSD to the platform was done by Alessandro Forin and Neil Pittman of Microsoft, and Microsoft has generously donated the code to The NetBSD Foundation.

I'm still just starting to look into the capabilities, but eMIPS appears to support application-specific hardware optimizations and even machine instructions.  The overview on Microsoft Research's project page for eMIPS says: "Have you ever thought of building your own processor or maybe just defining your own machine instructions? With eMIPS now you can."  Sounds like a really interesting avenue for research, and I eagerly await cool applications based on it.

24 January 2011

I've had a camera with CHDK firmware (a replacement for many Canon point-and-shoot cameras) on and off for a couple of years, but I hadn't really started to play with the scripting capabilities until recently.  I decided to start with time-lapse photography, as it's one of the easiest for people to understand.  There are a bunch of scripts written by other people readily available - and that's usually a good place to start.  (One hopes that they're already tested to a certain degree, which should help with figuring out how moving parts work.)

My first test was with the so-called Ultra Intervalometer, a UBASIC script which seemed to be a recommended way to get started.  It was relatively straightforward to get working, and I played around with it for a bit, but the first time I tried to get a time lapse of more than a few minutes, I discovered a flaw: the power in the camera's battery runs out fairly quickly.  With this very basic script, the camera's display remains on the entire time, and lots and lots or refocusing happens.

So, I did a little more searching, and came up with a Lua script called lapse.lua which not only supports turning off the display, but has pre-focus support as well.  I was able to get several hours out of the battery, and the results are below.

This is the moon setting in San Francisco, with nothing particularly special done.  One frame every 30 seconds, and then a quick editing pass with Final Cut Pro (though something lighter-weight could certainly have been used).

I'll continue to play with this script, and the capabilities of CHDK and my PowerShot SD780IS that it points out to me.  More later!