data over time

First, a little history: When I was in my teens my friends and I used to play around on our computers with a program called "deluxe paint animation" which was, at the time, was a quite powerful graphics and animation tool for the PC.  Not only did it provide basic painting capabilities but it also included some cutting edge animation tools like motion tweening, morphing, and so on.  All of this ran at 320x200 pixels with an eyeball popping 256 color fixed palette.

delux paint animation

The other day while cleaning out a closet my brother came across an old floppy disk which, according to the label, held part of an animation project made by one of our close friends.  As amazing as it was to find the disk, the file was corrupt and couldn't be read; all attempts to view the now 20 year old animation failed.  It was part one of a science fiction saga titled "Porth" that our friend Cory had made (when he was fifteen) by stretching the animation tool to the absolute limits. In addition to being an interesting technical challenge, it was worth putting some effort into saving this file for nostalgia alone.

porth floppy

Many years ago I wrote a Pascal library to decode PCX images, and I had a hunch that the ANM format might use a similar run-length encoding scheme.  Upon recieving the corrupted file from my brother I set about scouring the internet for details of the ANM file format which Delux Paint Animation used for storing animated sequences.

After digging through some long abandoned forums and various geocities-styled nooks of the web, I came across some crusty old C source that claimed to decode ANM files. I'm not fluent in C but I figured it was at least a place to start.  It was clear that my assumption about the encoding method was correct.  After a couple hours of head scratching I managed to decipher the code enough to figure out the details of the data format.  Rather than start with a file I knew to be corrupt, I used an old EA Sports ANM file that I found online to test my code before delving into the digital archaeology project that my brother had unearthed.

ea sports animation

After a few hours of digging into the corrupt file with a hex editor, I had most of the original content playing back in all of it's pixelated glory. No crashes, just a handful of garbage frames introduced by reliance on a flimsy physical media never meant for long term archival data storage.

I was able to hack around the busted frames and managed to salvage most of the original file.  Unfortunately the animation encoding scheme works based on the delta between frames so there's still some visual corruption but I saved most of the content.  Here's the resurrected chapter of the Porth saga saved from a pile of corrupt bytes.