I've solved the problem now. It turned out to be a very standard CRC algorithm, complicated by the presence of a few extra bytes of data being checked that didn't appear explicitly in the file anywhere.
In the process I developed some very general techniques for solving this kind of problem, which I've written about here if anyone's interested: http://www.cosc.canterbury.ac.nz/greg.ewing/essays/CRC-Reverse-Engineering.html Thanks for everyone's help, Greg -- http://mail.python.org/mailman/listinfo/python-list