home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
378.lha
/
DiskInfo_v5.0
/
DiskInfo.doc
< prev
next >
Wrap
Text File
|
1990-05-02
|
23KB
|
437 lines
DiskInfo v5.0 Copyright © 1990 by Stan Ziel, all rights reserved.
This document contains the following sections:
Overview - A quick look at what DiskInfo is
Usage - Starting, stopping, and using DiskInfo
Options - Command-line options to customize DiskInfo
Considerations - Bugs (there are none!), precautions, and so on
DiskInfo & FFS - Specific info for using DiskInfo with FFS floppies
FFS Floppies - A more detailed look at FFS floppies
Program Notes - History and notes for the curious
Credits, etc. - Special thanks, and how to contact me
OVERVIEW
--------
DiskInfo is a utility (actually two utilities in one) designed for use
from the CLI or in your startup-sequence. It will not run directly from
the WorkBench. DiskInfo's main purpose is to display what floppy drives
(3.5") are mounted, and how many free-blocks remain on each one. The
second function of DiskInfo is to make it easier to use FFS-floppy disks
with WorkBench 1.3. It does this by indicating when a FFS-floppy is in a
drive, and performing a DiskChange on that drive when disks are swapped.
However, you do not need to use FFS-floppies in order to use DiskInfo.
USAGE
-----
Before you can use DiskInfo, you must copy it to your boot floppy or
hard drive. SYS:System is a good place for utilities such as DiskInfo.
If you do this, you may have to specify a full pathname to DiskInfo when
using it. Since DiskInfo is intended for use from your startup-sequence,
this should not be inconvenient. If it is, you may want to copy DiskInfo
to a directory in your path, such as C:. You also must have the
arp.library (v39 or higher) in your LIBS: directory.
Once this is done, just type "DiskInfo" at the CLI prompt, including a
path as needed. DiskInfo will start up and detach itself from the CLI.
There is no need to "Run" DiskInfo, and you can close the CLI window that
started DiskInfo. Once you have DiskInfo working the way you want it, you
might want to add the DiskInfo command to your startup-sequence.
When DiskInfo starts, it checks to see what floppy drives are in your
system, and if any of these are mounted as FFS units. If any FFS units
are mounted, DiskInfo activates them by doing a DiskChange on each one.
This DiskChange is never done if a drive is not mounted as a FFS unit.
All floppy drives are found automagically. DiskInfo ignores other drives
such as hard drives, IBM-type floppy drives, and so on. Then, DiskInfo
opens up a small window in the title-bar area of the WorkBench screen, and
displays the drive names and free-blocks. The window is sized according
to the number of drives found by DiskInfo.
While DiskInfo is running, it normally sleeps in the background. By
doing this, DiskInfo uses very little CPU time, and should not slow down
your system to any noticable extent. DiskInfo will wake up and update
it's information when one of a few things happen: you activate or
deactivate the window (usually by clicking on it), or you swap a disk in
any floppy drive. Also, if you have enabled timed updates, DiskInfo will
update it's information every "n-seconds." (See "Options" for more info
on this.) Once this is done, DiskInfo goes back to sleep.
If you are not using timed updates, sometimes the information shown by
DiskInfo will be wrong. For example, if you put an empty disk into a
drive, and then copy over a number of files, DiskInfo will still report an
empty disk. If this happens, just click on the DiskInfo window to force
the update.
DiskInfo usually displays the number of free-blocks on each unit. But
sometimes DiskInfo shows other information in place of free-blocks:
none - There is no disk in the drive.
??? - The disk is bad, blank, or some other unrecognized disk.
ffs - The disk is a FFS-floppy, but the unit is not mounted as such.
kick - The disk in the drive is a KickStart disk.
qbak - The disk in the drive is a QuarterBack disk.
If you activate DiskInfo's window, the title of the workbench screen
will change to "DiskInfo v5.0". When the window is active, you can hold
down either mouse button, and DiskInfo will report what drives it is aware
of. This will be in the form of "DF0: only" or "FF0: also", indicating
if it is aware of FFS-units mounted on a particular drive. (Of course,
DF0 and FF0 will be the proper names for your units.) This is displayed
regardless of what disk is in each drive at the time. If the DiskInfo
window is dragable, you will have to use the right mouse button to see
this information.
It is possible to quit DiskInfo. However, it is a bit awkward, and is
intended to be this way. This is because quitting DiskInfo when using
FFS-floppies is NOT recommended. To quit DiskInfo, first make sure the
window is active. Then, while holding down the right mouse button, press
the delete key. If DiskInfo does not find any FFS units, it will simply
quit. However, if there are FFS units, DiskInfo will put up an alert
warning you about the dangers of quitting. If you still wish to quit,
press the left mouse button. Pressing the right mouse button will keep
DiskInfo running. Do not be frightened by this alert; it is not a GURU!
Since DiskInfo uses very little CPU time and ram (about 10K), there should
be no reason to quit, especially when using FFS-floppies. However, you
may want to quit to change DiskInfo's options.
OPTIONS
-------
Starting DiskInfo, as explained above, will use the default settings.
However, there are some command-line options to customize DiskInfo. These
options cannot be changed while DiskInfo is running; you will have to quit
DiskInfo and then re-start it to change any option. If you are using
DiskInfo with FFS-floppies, it is suggested that you do not mount your FFS
drives the first time you try DiskInfo. This makes it easier to start and
stop DiskInfo to try new options. (See the above note about the alert
shown when quitting DiskInfo.) Once you have figured out the options you
prefer, you can use DiskInfo as normal. You might even include the
DiskInfo command and options in your startup-sequence so that DiskInfo
will be installed every time you boot.
The options may be given in any order. DiskInfo will use the last
instance of an option if it is given more than once. Any invalid options
will result in the default value being used. This means that unknown
options will be used for the window's left edge. If this is not a number,
the default left edge will be used. The letters used for the options may
be upper or lower case. Individual options should be seperated by spaces,
but arguments to an option must follow it with no space in between.
The format of the command-line options is: (n is a number)
DiskInfo <left-edge> D Cnnnn Tn
left-edge - This specifies where DiskInfo will try to open it's window
in relation to the WorkBench screen. The normal WorkBench
screen ranges from 0 to 640. So a 0 for this value will
cause the DiskInfo window to be at the left-most side of
the screen. If this value is not a positive number, the
default value will be used. If this value is too large,
DiskInfo will open the window at the right-most side of
the screen. The default is 136.
D - This specifies that DiskInfo's window should be dragable.
If you omit this option, the window will be 'stuck' in
place. It still might be possible to move the window with
some other utiltiy such as Scripit.
C - This specifies the colour arangement that DiskInfo should
use. This is followed by up to four digits, symbolized by
"n" above. These tell DiskInfo which WorkBench colours to
use for it's display. 0 is the first colour, 1 is the
second, and so on. The maximum value is one less than the
number of colours on your WorkBench screen. Normally,
this ranges from 0 to 3. An eight-colour screen would
range from 0 to 7. The colours are specified in order,
but you do not need to specify all of them. The order of
the colours is:
background - Used for the titlebar. Default = 0
text - Used for most of the text that DiskInfo
displays. Default = 1
seperator - Used for a bar seperating one drive's info
from the next. (Only shown if you have more
than one floppy.) Default = 2
ffs-text - Used for the name of a FFS unit. Since the
colour is different than the normal text, it
is a bit more obvious when a FFS-floppy is in
a drive. Default = 3
DiskInfo will not allow you to set the same colour for the
backgound and the text. If you do, DiskInfo will choose a
different value for the text. This also applies to the
ffs-text colour.
T - This enables timed updates. Normally, in order to keep
CPU use down to a minimum, DiskInfo only updates it's
information when you activate/deactivate the window, or
when you swap a disk in a drive. When using timed
updates, DiskInfo updates it's information every 'n'
seconds. Chances are, you won't notice a slow-down when
using timed updates. DiskInfo does not physically access
the disk to get it's information, so there is very little
overhead. If you use 'T0', then DiskInfo will not do
timed updates, which is the what happens when the T option
is not used. If you use T without any value, the default
is to update every 10 seconds.
EXAMPLES
--------
DiskInfo t1 9999 - This sets up the window on the right side of the
screen, with an update every second.
DiskInfo 0 c0101 d - This puts a dragable window on the left side of
the screen. The first two colours (background
and text) are the defaults. The seperator bar
is the same colour as the background, thus it
won't be visible. The ffs-text is the same
colour as the normal text.
DiskInfo ? - This does not print a help message. Instead,
"?" is taken as the left-edge since it is not
any other known option. Since this is not a
positive number, it results in using the default
value.
CONSIDERATIONS
--------------
If DiskInfo refuses to run, you should first make sure that the
arp.library (v39 or higher) is in your LIBS: directory. DiskInfo will
also refuse to run if it can't open it's window, which might happen in
low-memory situations. (DiskInfo only uses about 10K of ram.)
DiskInfo expects an 8-point font to be in use. (Topaz, Siesta, etc.)
If you a larger font, or 60-columns, the display will not adjust. Maybe
I'll fix this one day, maybe not. For now, my apologies to anyone that
needs DiskInfo to work with such a font.
DiskInfo's window has no depth gadget. But you can depth-arange it
when using a utiltiy such as DMouse, QMouse, etc. You can also use a
utility such as Scripit to manipulate the DiskInfo window. For this
reason, DIskInfo's window has a title, although most of the time you will
not see it. The title is simply "DiskInfo". (Note that there is no
version number in this title.)
DiskInfo is intended to work with WorkBench 1.3 only. It should work
with 2.0 as well. But DiskInfo may not be as useful with 2.0 since the
FastFileSystem is more integrated into the Operating System.
Note that certain things do a "soft disk-change". This means that the
disk is changed without physically doing so. One example would be
formatting a brand new disk. After this is done, DiskInfo will still
report "???". You may be able to get DiskInfo to recognize the new disk
by clicking on the window. Or, swapping a disk in another drive might
cause the new disk to be recognized. However, it is more likely that you
will have to remove and then re-insert the disk. Other things that do
"soft disk-changes" include DiskChange, DiskCopy, and QuarterBack.
DiskInfo will never print any error messages, due to the way DiskInfo
releases it's hold on the CLI window. But errors should not cause any
problems. DiskInfo will normally exit cleanly. Some errors might cause
DiskInfo to display the wrong information. If this happens, click on the
DiskInfo window, or swap a disk in a drive. If the bad information
persists, quit and re-start DiskInfo.
DISKINFO & FFS
--------------
As mentioned before, you do not need to use FFS-floppies with
DiskInfo. However, one of DiskInfo's main functions is to make using
FFS-floppies with WorkBench 1.3 much easier. There are a few things you
should be aware of, in addition to the information provided below.
DiskInfo performs a DiskChange on all drives that are mounted as FFS
units. If a drive is not mounted as such, the DiskChange is never done.
When DiskInfo is first started, it finds any FFS units that have been
mounted. They will be found even if you omit "Mount=1" in your Mountlist.
DiskInfo will then do a DiskChange on all FFS units it found. So, do not
be surprised when your drive lights come on after starting DiskInfo.
After this, DiskInfo will do the DiskChange whenever a disk has been
swapped in a FFS unit. If you swap a disk in FF0:, for example, it will
issue a DiskChange to that unit, but not to unit FF1:, FF2:, etc. This
DiskChange is based on the drive, and not what kind of disk is in the
drive.
It is suggested that you omit "Mount=1" from your MountList entries,
and mount the FFS units *after* you start DiskInfo. By doing this,
DiskInfo will not know about the FFS unit when starting. This will
prevent DiskInfo from doing DiskChanges. But the first time a FFS-floppy
is placed in the drive, DiskInfo will see this, fully mount the unit, and
begin doing DiskChanges. By doing this, DiskInfo does a little less work
until you actually begin to use FFS-floppies. And you do not have to
remember to type or do anything to use them; just insert a disk!
DiskInfo will only display the first three letters of the unit's name,
followed by a colon. If you have a unit with a longer name, DiskInfo will
still work with it, but the display will show an abbreviated name. The
name of a FFS unit is shown in a different colour to make it more obvious
when a FFS-floppy is in a drive. (Unless, of course, you cahnge this with
the 'C' option.)
Most importantly, under WorkBench 1.3, it is very important to do a
DiskChange when a FFS-floppy is swapped. If you don't, then you could
risk damaging one or both disks that are swapped. This is why DiskInfo
puts up an alert before quitting. If you must quit DiskInfo, it is
strongly recommended that you stop using FFS-floppies, or have
AutoDiskChange running to deal with disk swaps. (DiskInfo will happily
co-exist with AutoDiskChange. In fact, DiskInfo should multitask with
just about anything, including copies of itself!)
FFS FLOPPIES
------------
This section provides more detailed information on the FastFileSystem
and FFS floppies. If you have used these before, you may skip this.
With the release of WorkBench 1.3, Commodore introduced an alternative
to the built-in File System called the FastFileSystem. The advantages to
this newer system are an increase in speed of disk access, and an increase
in the amount of space available on a disk (roughly 5%, or 38k on a floppy
disk.) However, FFS was designed to be used only with non-removable media
such as hard drives. (This should change in 2.0) You can use FFS with
floppy drives, but there is one major problem. The FFS does not expect
disks to be changed, so if you do this, you could ruin the disk (either
the one that was removed, the one that was inserted, or even both!) If
you use the DiskChange command, you can let FFS know that the disk has
been changed. However, it is very awkward to type this in every time you
swap a disk. Also, if you forget just once, you might destroy a disk (or
disks!)
The solution to this was provided by Martin Taillefer in the form of
AutoDiskChange. AutoDiskChange is a program that runs in the background,
and issues a DiskChange command every time a disk is swapped in a FFS
drive. This is a very nice program; one which I have been using for quite
a while. However, there was still a problem with using FFS disks. That
problem was memory related... not CHIP or FAST, but my memory. I would
often type "DF0:" when I meant "FF0:" and vice versa. The solution to
this was to write a program that would display what disk was in the drive
at the time. Once this was done, it became obvious that combining this
with an AutoDiskChange-type feature would provide the best solution (until
2.0)
To use FFS-floppies, you need to have FastFileSystem in your L:
directory. You will also need the Format command provided with WorkBench
1.3 or 1.32 to format disks using FFS. It is recommended you use DiskInfo
or AutoDiskChange (or both) for the reasons mentioned above. Both
programs require arp.library to be in your LIBS: directory. Finally, you
will need to add an entry in your MountList file (in the DEVS: directory)
for each FFS unit you intend to mount.
To mount a FFS unit, you use the Mount command for each unit you want
to use. (If you use the ARP version of Mount, you can mount all units
with one command.) The unit must be mounted before you can use it in any
way. Once the unit has been mounted (and you have installed DiskInfo or
AutoDiskChange) you can use it like any other drive by simply typing the
name of the unit. You can continue to use normal (OFS) disks in the drive
by using the original name of the unit.
For example, let's say that FF0: will be using unit 0 (DF0:)
MOUNT FF0: ; this mounts the unit
DiskInfo ; to add the auto DiskChange feature
DIR DF0: ; assuming a normal (OFS) disk is in there
; now put in a FFS-floppy...
DIR FF0: ; and get a listing of the FFS-floppy
If you wish to format FFS-floppies, you can do it like so:
FORMAT DRIVE FF0: NAME "FFS-floppy" FFS
Be sure to use the correct drive name for the format command. If you
format a FFS-floppy using "DF0:", it is possible that neither drive will
recognize the disk, and you will have to re-format it.
If you have the entry "Mount = 1" in your MountList, then the unit
will be fully active when you mount it. If you omit this entry, then you
you must "wake up" the unit by doing "CD FF0:", "LIST FF0:", or something
similar. DiskInfo will also wake up the unit when it sees a FFS-floppy in
it. If you mount a unit (without "Mount = 1") before you run DiskInfo,
then DiskInfo will "wake up" the unit immediately, and perform a
DiskChange every time a disk is swapped.
Most programs and commands work with FFS-floppies. The main exception
are those that explicitly ask for DF0:, etc. But if you use FF0: (or
whatever the name of the unit is) when you have an OFS-floppy in there, or
use DF0: with a FFS-floppy, you will see a requester saying something
like "Not a DOS disk". Just click on cancel, and try again with the
correct unit's name. Hopefully, DiskInfo will lower the chance of this
happening by reminding you what disk is in each drive. This makes
FFS-floppies much easier to deal with. And once you start using them, it
will be hard to go back to normal (OFS) disks and loose that extra storage
space.
The most important thing to consider while using FFS-floppies is disk
swaps. Besides using AutoDiskChange or DiskInfo, you should also make
certain that the drive light is out before removing a disk. Due to the
way in which FFS caches information (which is one reason FFS is faster)
the drive light sometimes comes back on for a brief moment. So always
wait a second or two before removing the disk. This is not really a
special precaution for FFS-floppies; it is a good idea to make sure that
the drive is finished when using *any* floppy!
PROGRAM NOTES
-------------
Unlike AutoDiskChange, DiskInfo does not install a trackdisk interrupt
which allows DiskInfo to be removed. (Wouldn't it be nice if you could
remove TD interrupts under 2.0? :-) )
DiskInfo was written with Aztec C, v5.0a, ARP REL 3, and Maxwell House
coffee.
A brief history of DiskInfo follows:
pre v 3.0 - You don't want to know!
Version 3.x - AutoDiskChange feature added. DiskInfo now finds
units (OFS & FFS) automatically.
Version 4.0 - Code tightened up. Release to the public on Feb. 23,
1990.
Version 4.0b - Oops! Now DiskInfo really does release it's hold on
the CLI window, allowing you to EndCLI.
Version 4.1 - Added a window title for Scripit, etc.
Version 5.0 - This one. Added timed updates, and changed the format
of the command-line options. Released on Apr 13, 1990.
CREDITS, ETC.
-------------
I would like to thank the following people:
Jim Mak - for beta-testing and various suggestions
Martin Taillefer - for AutoDiskChange
Steve Tibbett - for VirusX... a great program in addition to
serving as my first real-world example of using
the trackdisk.device
the ARP team - the Amiga wouldn't be worth using without ARP!
the Roches - for singing to me while I worked
Good luck with DiskInfo. I hope it is of use to you. I think you
will find that DiskInfo makes using FFS-floppies with WorkBench 1.3
almost second-nature. When 2.0 is out, there may be a new version of
DiskInfo.
If you have any bugs to report, suggestions, or flames, you can
contact me via:
Amagination BBS (NYC) Stan Ziel 212-727-3294
Elmhurst BBS (NYC) Stan Ziel 718-803-0292
BIX sziel
UseNet (Soon, I hope!)
SnailMail 19 Glenside Drive, New City, NY 10956 USA
- Stan, April 13, 1990
-----
"I just never knew how big nothing could be."