Archive entry by JPickford on Fri, 28 Nov 2008
A few months ago I went to my parents' house, and they'd dug out a box of old papers and magazines of mine from the shed. There were a few old sketchbooks, some 2000ad comics, a 1977 Dr Who annual, a 1979 Spider-man annual, and a massive wodge of old, yellowing dot matrix printer paper.
I unfolded the printer paper and discovered this: a print out of the z80 source code for Amaurote on the Spectrum!
The Amstrad code was included at the end too.
I've no idea why I printed it out. I don't have digital copies of any of the source code or graphics files from anything we did back on the 8-bit computers. It would all have been on tape or microdrive (lol) anyway, so unlikely to have survived in a readable state. I guess a print out is the most robust archive method.
If anyone is curious about the "fancy" interrupt routine - It was an invention of (colleague and mentor) Mike Webb.
For speed we sometimes pointed the stack at graphical data we wanted to read because the POP (grab data from the stack) was very quick and the stack pointer incremented automatically.
The problem with this technique was that when an interrupt occurred it would dump a return address on the stack which just happened to be an arbitrary place in the games graphics data.
Mike invented the idea of creating a sort of checksum for each page (256 bytes) of data. Basically the all the first bytes in each page would be XOR'd together, all the second bytes and so on.
When the data was corrupted it was a simple matter of replacing the two bytes. You'd recalculate the checksum with Zero in place of the corrupted bytes and XOR that with the originally calculated checksum and you magically have your data back. Interrupts only occurred once per frame (50hz) so this was quite practical.
If the data ever got corrupted for any other reason (bug) this lovely routine would gradually destroy all your graphics over a period of several minutes.
Click on the image for a longer section. No, I'm not scanning in the rest.
» Amaurote softography page