S C A T
*******

C:\AB1\UTIL\SCAT.TXT last updated by Roedy Green on 1993 August 7

Purpose
*******

SCAT has 7 main purposes, briefly:

1. Automatically rebooting from hard drive C: if you accidentally
   leave a diskette treated with SCAT in the floppy drive at boot time.

2. upgrading diskettes to DOS 6.0 standards without losing data.

3. repairing damaged diskettes.

4. Humouring PC DOS and OS/2 by putting IBM in as the OEM.

5. telling you what kind of floppy you have, including Norton
   proprietary backup format.

6. decontaminating FastBack Plus diskettes of the "unvirus".

7. Removing any virus that hides in the boot block of a floppy.

What Is SCAT for? -- in detail
******************************

1. automatically rebooting from hard disk when you boot from floppy.
********************************************************************

SCAT puts down a special boot track on the floppy that when it
is triggered, by leaving the floppy in the drive at boot time,
automatically reboots the machine from the C: hard disk.  This
is even faster than having no diskette in place!

2. upgrading diskettes to DOS 6.0 standards without losing data.
****************************************************************

SCAT upgrades the boot track of floppies formatted under older
versions of DOS.  Some programs such as RESTORE, QDOS or BackIt
may have trouble working with these older diskettes.  SCAT
brings them up to DOS 6.00 standards, complete with IBM as the
OEM, all the disk geometry fields filled in, the volume label
placed both in the boot track and the root directory, and
generated unique volume id.

When diskettes are upgraded to DOS 6.00 standards, you can still
use them under eariler versions of DOS.  I use an OEM ID of IBM
4.00 as the most universally acceptable.

3. repairing damaged diskettes.
*******************************

SCAT repairs a damaged boot block, the first sector on a diskette.
Even if it has been completely erased, SCAT can reconstruct it.

4. Humouring PC DOS and OS/2 by putting IBM in as the OEM.
**********************************************************

SCAT places the magic letters IBM (instead of MSDOS) in the
manufacturer field.  Reputedly DOS 4.01 and OS/2 refuse to work
if these letters are not present.

5. telling you what kind of floppy you have.
********************************************

SCAT tells you what sort of floppy you have -- how many sectors,
how many sides, XT or AT style, and capacity.  It also detects
Norton Proprietary backup format diskettes that masquerade as
normal DOS disks, but which need to be reformatted before use
under DOS.

6. decontaminating FastBack Plus diskettes of the "unvirus".
************************************************************

The original purpose of SCAT was to clean up after FastBack Plus.
Older versions of FastBack Plus had what I call an "unvirus".
The current versions have finally fixed the problem, but you may
still have disks around produced by earlier versions.  FastBack
Plus destroys the BPB (Boot block) of a normal DOS floppy disk.
To many programs, such a damaged diskette will masquerade as
normal, but to others it will not.  If you were to use these
disks for normal DOS purposes, you would sooner or later get
erratic results possibly losing your files.

There are two ways to decontaminate FastBack Plus diskettes to
make them suitable for DOS use again -- reformat them or use
SCAT.  If you are in any doubt whether a disk was ever
contaminated by FastBack Plus USE SCAT.  It won't hurt.  SCAT
will not erase or damage your files.  FORMAT, of course, erases
everything and takes much longer than SCAT.  WHATEVER YOU DO,
AVOID USING FASTBACK PLUS DISKETTES AS DOS DISKETTES BEFORE
DECONTAMINATION.

7. Removing any virus that hides in the boot block of a floppy.
***************************************************************

SCAT removes any virus that hides in the boot block of a floppy.
It is a broad spectrum antibiotic that works on all such
viruses, even ones that have not been written yet.  Most viruses
do not hide there, so it will be ineffective on them.

How to Use
**********

Put the 5 1/4 inch or 3 1/2 inch floppy to be decontaminated in
drive A: and type

SCAT

Follow the prompts.  You will hit Enter to uprade the disk or
Esc to leave it as is.

Alternatively type

SCAT A:

or

SCAT B:

to correct the floppy in the specified drive.

If you don't want to see the prompts try:

echo. | Scat A: >NUL:

GETTING THE LATEST VERSION
**************************

Look for the latest version at my Web site:
  http://mindprod.com

WARNINGS
********

FastBack Plus has some nasty habits, so even SCAT cannot always
fully clean up after it.  Watch out for partially formatted
diskettes that were used as the last diskette of a set.  These
have to be reformatted.  The fastest way to reformat is to use
BackIt -- FastBack Plus's competitor backup program from Gazelle
Systems in Provo Utah.

SCAT has only been fully tested on cleaning up after FastBack
Plus running on an XT.  I would appreciate feedback on how
successful it is at cleaning up after FastBack Plus running on
AT-style diskettes.

FastBack Plus is a totally different program from FastBack.  Old
FastBack used completely non standard diskettes that could not
possibly be confused with DOS diskettes.  The only way to
prepare such diskettes for reuse is to reformat them.  SCAT
won't help.

How SCAT Works
**************

The following information is for curious computer jocks only.
You do not need to understand a word of it to use SCAT
successfully.

SCAT works even if the Media descriptor byte is damaged and even
if the existing BPB (boot block) is totally trashed.  It does
not change the FAT or directory, so usually all files on the
floppy will be recovered.

Here is our overall strategy to reconstruct the BPB in the first
sector on the floppy.

1.  We read the boot record bypassing DOS to determine the media
    descriptor byte. If it is undamaged, we can reconstruct the
    rest of the BPB.

2.  If the media byte is damaged, we might ask DOS its idea.
    The problem is, DOS will crash with divide overflow if it
    starts to interpret a mildly damaged BPB.  So we read the FAT
    instead and look for the media byte at the head of the FAT.

2.  If that does not work we ask DOS what the default BPB is for
    the device.

3.  Reconstruct the rest of the BPB from the media byte.

4.  Read the boot sector to see what is there now.

5.  Warn user if we will actually be changing the BPB.

6.  Ask the user for final confirmation before fix.

7.  We repair the disk to DOS 3.3 standards.

8.  We then can safely get the volume label from the root directory.

9.  We then place that volume label in the boot record and
    upgrade it to DOS 6.0 standards by adding all the DOS 6.0 fields.

GETTING THE LATEST VERSION

Look for the latest version at my Web site:
  http://mindprod.com

It would also be helpful if you mentioned the URL or source of where
you got your copy.  I want to make sure that site is kept kept up to
date.

Author
======

SCAT is copyrighted but may be freely used for any purpose
except military.

Please report bugs and problems to:

Roedy Green
Canadian Mind Products
#101 - 2536 Wark Street
Victoria, BC Canada V8T 4G8
tel:(250) 361-9093
mailto:roedyg@mindprod.com
http://mindprod.com

SCAT was based on Peter Fletcher's copyrighted FIX_BPB program.

For the curious, SCAT is not an acronym, it refers to the word
"scat" as is "scat cat" referring to the FastBack cheetah cat
logo.

WHAT IS THIS BPB THAT SCAT FIXES?
*********************************

In the beginning, Peter Fletcher wrote an program called
FIX_BPB.  SCAT does everything FIX_BPB does and a little more.
FIX_BPB was written in to solve another problem, that
incidentally SCAT fixes too.

According to Peter, the issue of PC Magazine dated December 23,
1986 described, in the "PC Advisor" section, a problem with
reading certain floppy disks (created on non-IBM systems under
earlier DOS versions) while running IBM DOS 3.2. It was
suggested that the IBM DOS was looking for the "three magic
letters" in the 'oem' area at the beginning of the boot sector,
and bombing if it didn't find them.

The problem appears to be a real one and the solution proposed
in PC magazine (which involves copying the whole boot sector
from a PC DOS 3.2 FORMATted disk) will work, but a little
research revealed that its authors were unjustly maligning IBM.
It appears that IBM DOS 3.2 could not care less whether the OEM
name in the Bios Parameter Block area of the boot segment of a
floppy disk is "IBM", "ABC", or, indeed, not there at all.

What it does care about is that the rest of the data in the BPB
area (the data that describes the format of the disk) be valid
and correct. It would appear that earlier versions of DOS (up to
and including IBM DOS 3.1) simply looked at the media descriptor
byte in the BPB to determine what sort of diskette was in the
drive, and ignored the rest of the formatting data (the driver
presumably used internal default values for each of the few
possible media types).  DOS 3.2 reads in the whole of the BPB,
AND TRIES TO USE IT - although, strangely enough, it seems as if
DOS is prepared to cope with a BPB that is more or less totally
blank (it seems to ignore the descriptor byte and treat it as a
DSDD 9-sector disk).

The real problems occur if some of the BPB data are valid and
some aren't.  I would guess that some OEMs have assumed that DOS
would continue to ignore the formatting data on the disk, and
have failed to write much there during FORMATting except the
media descriptor byte (or, worse, have allowed random junk to be
written there).  While this error is understandable, and perhaps
even forgivable, it remains THEIR problem, not IBM's, since the
BPB area has always been documented as containing the format
information that IBM DOS 3.2 now requires to be there.

I have heard new reports that DOS 4.0 and OS/2 are now truly
looking for the magic letters IBM, so in this version of SCAT, I
humour them.

-30-