Wednesday, March 13, 2013

Fun and Games

Sometimes it seems like the one thing everyone wants to do on the zipit is recreate their cherished childhood memories playing various ancient video games.  I suppose I did that myself for a while when I finally got the rockblox plugin working in rockbox.  I still remember passing the entirety of a particularly long airport layover ages ago in New Oreleans, playing Breakout on the purchasing power of a single quarter.  I was actually saddened when the time finally came to board the plane because I still had 5 or 6 free game credits racked up.

While it's not exactly from my childhood, I do have some cherished memories of playing Super Mario and Link on the NES.  Link was a particular favorite because I never really finished it until the kids were old enough to try it, and they pushed me to complete the mission.  I think we still have the old NES box and a pile of cartridges tucked away in a closet somewhere...

Anyhow, the topic came up for like the millionth time on the zipit IRC channel and this time I made up my mind to try and build an NES emulator.  After reviewing the multitudinous choices, I eventually settled on the FCEU Rerecording emulator.  It's been built for the zipit before, but not yet for IZ2S or openwrt, the two zipit distros I seem to be using these days.

I got it working on IZ2S, but just like everyone before me I failed to get decent working sound out of it.  Plus the key binding configuration requires me to launch it from an ssh session so I can see the config instructions.  That's just weird.   So I thought I might try this gpfce variant of fceu.  It's got some ARM assembler optimations and a nifty SDL menu system borrowed from the picodrive emulator.


I got that working too, and the menus do look nice, but the emulation runs even slower.  Oh well.

After building both of these for IZ2S I decided to try and attempt an openwrt build.  This was more of a challenge.  I didn't feel up to wrestling with the weird openwrt Makefile and patches build system so I opted to compile it on the zipit itself.  This took longer that I'd have liked and probably wore a groove into my SD card, but eventually resulted in an fceu executable.  I launched it from ssh and configured the keys only to discover it had some sort of graphics bug, perhaps due to some quirk in the particular gcc version used by the native compiler.  Drat!  That forced me back into the openwrt Makefile that I was hoping to avoid.  

I eventually wrangled the Makefile into a working build, but it wasn't exactly easy.  The openwrt configure junk wouldn't even run until I figured out how to make it reduce the fceu folder depth by one level.  And autoconf absolutely refused to find the lua lib no matter what weird openwrt hack I threw at it, so I had to make a cheesy patch to trick the autoconf files into skipping the liblua check.

Goodies were posted to the zipit IRC channel.  I'll track them down and post them here when I get a chance.

Here's the iz2s build of fceu;
fceu-iz2s.zip

The fceu Makefile and patches are on the openwrt-zipit github now.
https://github.com/openwrt-zipit/openwrt-zipit-packages/tree/master/fceu

Here's my openwrt build of fceu:
fceu r67-1 pxa.ipk

Just in case the one from the nightly build has problems:
http://mozzwald.homelinux.net/zipit/openwrt/pxa/packages/fceu_r67-1_pxa.ipk

I also spent some more time on tinyirc.  The MirOS variant has a working SIGWINCH  handler which I've tested by resizing it in dvtm.  The executable it 1K bigger because they   added all sorts of improved random number generator code for the private messaging.  Whatever.  I do like the resize code.

I also built the recent Finch release for openwrt and compiled a notification plugin at Slug's request.  We'll have to wait and see just exactly what that does for the zipit.

Here's the libpurple ipk, the new finch ipk to go with it, and  the ultra generic command-execute.so plugin. It does a system call on whatever command string you want so you can make your own special notification.



No comments:

Post a Comment