CDTCHECK
========

(c) Kevin Thacker
03/August/2002

CDTCHECK is a utility to check ".CDT" tape image files.

The tool will currently check standard and headerless loaders to ensure the checksums are correct
and the files are complete.

What the tool can do:
- give warnings if a header or data block is missing
- report the checksum result of the header and data blocks
- display filenames from the blocks (note: if the character is not in the printable range,
a '.' character will be displayed in the place of the character. Printable characters
have ASCII codes in the range 20-127).
- warn if complete blocks (a header and data block pair) is missing
- test if the header and data block lengths are correct (data block length is stored in the header block)
- will attempt to recognise headerless files (these are read using firmware function CAS READ - &bca1)
  However, it is not possible to know if the length of the file is correct, because the length is defined
  in the loader program and not in the data. Therefore cdtcheck will report the possible length (rounded to
  the highest 256 byte unit). CDTCheck will report the checksum result for all complete 256 byte records.

What the tool can't do:
- the tool will not warn if a complete file is missing. 
There is no way to test this!
- The tool can't detect the correct length of a headerless block.
There is no way to test this!

** The software must be run on a emulator to ensure all files are present. **

To do:
- check timings (pilot pulse, sync pulses, 0 bit and 1 bit durations)
(if some timings are incorrect the CPC will generate a read fail)
- check pauses between blocks (if the pause is too short, then the CPC will miss a file even if
it exists)

Usage:

CDTCHECK	<input filename> 

This archive contains a Windows command-line executable that will run under Win95, Win98,
Win2000 and WinNT.

The source is written to use the standard C libraries and has been compiled and tested under
Linux.

License:

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.