                                  Notes on g7t

Decoding process

   The tape reading and decoding process using g7t involves several steps
   which use a couple of intermediate file formats. The first step is to read
   the entire tape forward then reverse without stopping, creating two files
   in the first intermediate file format with both timing and character data.
   This is done with a variation of "t7" which is not included. The next step
   is to strip off the timing information, using it to identify record and
   LRC gaps as well as missing characters. The reverse file is first flipped
   end-to-end for this step. The result is a set of files in the second
   intermediate format. Sometimes this step is followed by an editing pass
   for one or more of the files to remove initial garbage records or select a
   particular portion of the tape to decode. The final step is to merge all
   the second intermediate format files into a single output file, taking the
   best records from each file and sometimes merging data from multiple files
   to obtain a good record. When it is not possible to get a good record,
   sometimes there is an obvious dropout which can be corrected
   automatically.

Intermediate File Formats

   The first intermediate file format consists of timing and data
   interspersed. The timing consists of one or 4 bytes, depending on whether
   the time between characters is small (the normal case) or large. The time
   unit is arbitrary, determined by the characteristics of the PC running the
   program. The data bytes are non-zero 7-bit characters as detected by the
   tape drive.

   The second intermediate file format is very similar to the .BCD or .BIN
   format, but within a record all-zero characters are inserted so that there
   is a character at every character time (according the the tape's density.)
   Also, the LRC character is included. Thus, a typical good record will look
   exactly like a .BCD or .BIN record except that there will be 3 trailing
   zeroes (the LRC gap) followed by the LRC character. A typical bad record
   may have more zeroes, characters with the wrong parity, the wrong size LRC
   gap and an LRC that does not match the data.

Usage Notes

   All the raw data and batch files to process it are here. The raw data is
   in the subdirectory "raw", a batch file to do it all is in "work" and the
   individual batch files are in "process", and the result is placed in
   "fin".

G7tedit

   The program "g7tedit" can be used on either the second intermediate file
   format or on regular .BCD, .BIN or .CBN files. On the command line it
   takes an input file name and an output file name. From standard input it
   accepts a set of simple commands which transfer data from the input file
   to the output file. Commands consist of "+" or "-" followed by a letter
   and an optional number. "+" means copy from input to output and "-" means
   skip on the input. The letters "c", "r", "f" and "a" mean respectively
   characters, records, files or the whole remaining tape. The number is a
   count, if it is missing 1 is assumed. The special command "+m" writes a
   file mark on the output file.

