Incomplete and corrupt ZZTGames worlds: notes
=========================================================================

Some of the ZZT files in the ZZT Games archive were corrupt. The metadata
is intact, fortunately, and thus I could determine which worlds were already
present on the Museum of ZZT.

The files that are already in the Museum are:
    - ISLE.ZZT     (zzt_worlds_1997.zip/music.zip/ISLE.ZZT)
    - MUSICBOX.ZZT (zzt_worlds_1994.zip/zzttool.zip/MUSICBOX.ZZT)
    - RINGS.ZZT    (szzt_worlds.zip/aolcompilation.zip/RINGS.ZZT)
    - SA.ZZT       (zzt_worlds_UNKNOWN.zip/aolcompilation.zip/SA.ZZT)
    - SIM2002.ZZT  (zzt_worlds_1992.zip/sim2002.zip/SIM2002.ZZT)
    - S-TOOL-K.ZZT (szzt_worlds.zip/aolcompilation.zip/!ZZTTOOL.ZIP/S-TOOL-K.ZZT)
    - TOWN1.ZZT    (zzt_worlds_UNKNOWN.zip.out/aolcompilation.zip.out/TOWN1.ZZT)
    - WARGAMES.ZZT

A few other worlds seem to be very close to worlds already on the Museum, but
the checksums don't match and the file sizes are slightly off. Due to the
nature of the corruption, it might be possible to reconstruct these by
compressing their Museum counterparts and replacing the corrupted chunks
with the corresponding uncorrupted ones. I have not done so, though.

These files are:
    - CANNIBAL.ZZT (zzt_worlds_1993.zip/classiccannibal.zip/CANNIBAL.ZZT)
    - CASINO.ZZT   (zzt_worlds_1993.zip.out/zztcasino.zip.out/CASINO.ZZT)
    - ENIGMA.ZZT   (Mission:Enigma)
    - LOSTMONK.ZZT (The Lost Monkeys, by Chris Jong)
    - MMPDSTR.ZZT  (Mostly Morphine Powder Strangers)

Finally, there are the entirely new corrupt ZZT files. These have no Museum
counterparts that I know of, and I've put what PKUNZIP could recover in this
directory.

These files are:
    - ROSSLAND.ZZT (Rossy Land)
    - Y.ZZT        ("Year 01", very badly corrupted; this might be a smaller
		    version of BEAR.)

They could *possibly* be recovered by finding out just how the ZIP file got
corrupted in the first place, or by doing some kind of predictive
reconstruction - e.g. given some idea of what a ZZT board is "supposed" to look
like, guess at the proper Deflate data to replace the corrupted chunk with so
that it picks up correctly after the corrupted area.

I've put the corrupt files and the original zztgames.zip file inside this
archive for any who'd like to try to decorrupt them.

Nature of the corruption
=========================================================================

The corruption takes the form of around 400 bytes of completely different
Deflate data compared to PKZIP's. After this corrupted chunk, the Deflate
data picks back up as if nothing had happened, and is identical to PKZIP's.
I've provided an example (with ISLE.ZZT) in the investigation/ directory.
isle_bad.dat is the Deflate data snipped from the zztgames.zip file for
ISLE.ZZT, and isle_good.dat is the corresponding good data produced by
PKZIP.

Note that Linux zip(1) produces entirely different Deflate data compared to
PKZIP, so any chunk patching has to be done by using the latter to construct
the ground truth.

Since the data matches PKZIP's output except for a few areas and the ZIP
metadata is correct, it suggests that the corruption either happened while
outputting the file (glitched/out-of-spec compression program was used, not
PKZIP) or after the file was created (floppy sector error, line noise while
uploading using a protocol without error correction). I don't know for certain,
though.

-km
2022-01-03
