Topic: Quake on the Chumby
I've finally gotten Quake for the Chumby to a workable state. The source (sdlquake and SDL) are available at http://files.chumby.com/hacks/chumby_quake_src.tar.gz . A dongle image, ready to be extracted, is available for download at http://files.chumby.com/hacks/chumby_quake.tar.gz
You control it by tilting the Chumby. When sitting on your desk, it shouldn't move too much. Squeeze to shoot, tap to jump, unplug to quit.
A bit about how I did the build:
For starters, I used the Snapgear toolchain. It has everything compiled with soft-float support. Without soft-floats, I was getting framerates of <1 FPS. The Snapgear toolchain can be found at http://ftp.snapgear.org/pub/snapgear/tools/arm-linux/
Then, I configured ALSA with ./configure --build=i386-linux --host=arm-linux --prefix=/usr/local/arm-linux --enable-static=yes --enable-shared=no build_alias=i386-linux host_alias=arm-linux CFLAGS=-msoft-float. Be sure to apply the Chumby patches or else you'll have choppy audio.
Next I got SDL. I went with a subversion checkout, making it easy to do see what's changed.
It's configured by running CFLAGS=-msoft-float ./configure --build=i386-linux --host=arm-linux --prefix=/usr/local/arm-linux --enable-alsa --enable-static --disable-oss
--disable-esd--disable-pulseaudio --disable-video-x11 --enable-video-fbcon --disable-alsa-shared
You can easily see all of my ugly, ugly hacks by running "svn diff". Also, you can see my code droppings from initial attempts where I actually used a USB keyboard and mouse. I had to mostly rewrite those drivers, so those of you wanting SDL support might want to take a look at those sections. Also, SDL uses deprecated ALSA calls, which don't get renamed properly when statically compiling. I manually added __old_ in front of a few of those calls to get it to link right. There are also a few egregious hacks where, for example, tapping the screen mimics pressing the space bar, because I couldn't get Quake to accept the fact that I wanted MOUSE3 bound to +jump. Maybe once I've slept more I'll take another look at it.
Finally, Quake itself. I modified the Makefile by hand to, for example, remove all the x86 .S files, and enable -msoft-float. I also had it statically link, because we're using soft-float libraries not present on the Chumby. And I added a few calls manually to the startup code to, for example, adjust the brightness and start on the first map.
Networking doesn't yet work. This is due to a combination of things, ranging from a bug I found in the Quake BSD code that was causing a segfault, to an issue with not being able to call gethostbyaddr() on localhost, to issues with statically linking. When I do get that working, I think I'll have a separate build with networking that relies on keyboard/mouse rather than accelerometer/touchscreen/bend sensor.
One more thing: I have a simple touchscreen driver written. The first SDL program I ported, the Planet Hively music disk, requires an actual pointing device. To get that mode back, you'll just have to remove the if/elseif/else block around line 1210 on SDL_fbevents.c, and remove line 1253.
I think that's everything.