ARMing for the future

Looking back, it turns out that I’ve actually been doing a lot of apparently unrelated stuff in between meetings, more meetings and real life, and some of it bears mentioning.

In anticipation of the Raspberry Pi launch (even though I don’t expect to be able to get one from the first production batch, given the amount of people expressing an interest these days) I’ve been messing around with Pyglet.

Pyglet is an interesting little beast, but I find it fascinating largely because it seems to be the easiest way to do cross-platform game/graphical development without bothering to install everything but the kitchen sink - it talks directly to SDL and OpenGL via the magic of ctypes, is very simple to get into, and the same codebase will run (and I’ve tested it) on the Mac, vanilla Linux, and an ARM emulator - I used both a pre-built scratchbox2 environment with QEMU inside a Linux box and qemu-system-arm on Lion, which I got to work recently1.

It’s obviously (and sadly) useless for targeting mobile platforms directly, but the nice thing about it is that it is such a thin wrapper that porting working SDL or OpenGL code into another language is pretty trivial refactoring, so it’s even useful for prototyping.

I have a couple ideas I’m going to use Raspberry Pi devices for on a personal level, but the starting point will be a little graphical shell that will take input from a Bluetooth gamepad (of which I have plenty, given the layers of dust my PS3 is collecting) and allow me to launch apps such as vintage emulators and application-specific web browsers.

Since I’m going to try to avoid X altogether, I’ve also been looking for a lightweight WebKit engine with Python bindings that will run inside an SDL environment2, so that I can make a credible stab at enabling the browser to work with keypad input.

This isn’t going to happen overnight, of course, but given my love for tiny machines, it promises to at least be an interesting hobby - I leave you with a couple of screenshots of Pyglet running inside an ARM VM and a shader demo running on Lion that I’m having some fun with3:

And this is just one of the things I have in mind…

  1. Sadly, the QEMU team seems to have a single person maintaining the Mac bits (and even then not using Lion), so they haven’t fixed the LLVM compiler builds and apparently have no milestone for doing so, which currently means that if you want to do ARM development on a Mac, your best bet is putting up with a Linux VM - I was lucky enough to get QEMU to build since I had the right tools lying around, but it’s an unsupported hack. ↩︎

  2. So far I’ve only found one, and it’s not trivial to get going… Pointers to more would be most welcome. ↩︎

  3. It runs on the ARM emulator as well but the whole thing is (naturally) painfully slow, so I’m breaking it down to figure out how much I can do with software rendering until I have some real hardware. ↩︎

See Also: