Once upon a time, there was this game company called Loki Games. They made some nice Linux ports of games and then went bankrupt. Luckily, most of the games still work.

However, I got this weird idea today: Does Sid Meier's Alpha Centauri really need the CD? Well, I went and uninstalled the game, reinstalled, and after some patching, turns out that if I install the whole 600-whatever-megabytes of stuff, yes, the game works just nice and doesn't need a CD at all.

The patch following the reinstall fails spectacularly, however:

loki_patch: dynamic-link.h:57: elf_get_dynamic_info: Assert-makro "! "bad dynamic tag"" ei pidä paikkaansa.

Soooo... the program used by the patcher uses a dog-ancient tricks or something. The patch is just a mysterious executable full of binary crap? Are we doomed?

Well, no...

Stripping away the first few lines of the smac-6.0a-x86.run file, it turns out the file itself is just a .tar.gz file. Blowing that away, I get a small bunch of files: a few shell scripts, a file called patch.dat and what seem to be replacement files. The replacement files turn out to be in "xdelta" format. The patch.dat file is straightforward: Just look at the file name, old MD5 checksum, new file's MD5 checksum, run the xdelta, compare the checksums with patch.dat just to see if it went right, and move the new file over the old file. Tadah!

Still, I'd prefer something a bit easier next time...