home *** CD-ROM | disk | FTP | other *** search
/ Fish 'n' More 1 / FishNMoreVol1.bin / more / drive_utils / floppy / autodiskchange / autodiskchange.doc < prev    next >
Text File  |  1989-08-13  |  8KB  |  201 lines

  1. (*======================================================================*)
  2. (*           AutoDiskChnage: A program to run FFS on floppies           *)
  3. (*======================================================================*)
  4. (*        Copyright © 1988 Martin Taillefer, All Rights Reserved        *)
  5. (*                   This is freely redistributable                     *)
  6. (*======================================================================*)
  7. (*      Version: 1.00           Author : Martin Taillefer               *)
  8. (*      Date   : 12-Oct-88      Changes: Original                       *)
  9. (*======================================================================*)
  10.  
  11.  
  12. NOTE: This document will refer to "internal" and "first external" disk
  13.       drives. For A2000 users, the internal drive will be the disk drive on
  14.       the right side. The "first external" drive refers to the unit on the
  15.       left side on your Amiga.
  16.  
  17.  
  18. FFS: The Fast File System
  19. -------------------------
  20. The Fast File System is an alternate file systen developed by Commodore to
  21. replace the BCPL file system used up to this point. The initial release of
  22. FFS (as shipped with the 1.3 enhancer kit) is geared towards non-removable
  23. media such as hard disks, or RAD: (another 1.3 goodie). This means that FFS
  24. doesn't directly support floopies.
  25.  
  26.  
  27. The Problem: Swapping floppies
  28. ------------------------------
  29. In all fairness, FFS does work on floppies. There is a problem though: it
  30. doesn't notice when you swap floppies. This steems from the fact that FFS
  31. currently expects to be run on non-removable media only. This means you can
  32. easily corrupt floppies by writing data to a disk which was meant for
  33. another disk since FFS doesn't know that you changed floppy and may have a
  34. corrupt view of the floppy in the drive.
  35.  
  36.  
  37. The First Solution: DISKCHANGE
  38. ------------------------------
  39. The 1.2 release of AmigaDOS saw the apparition of the DISKCHANGE command.
  40. This was mainly meant for 5'25 inch drive users. It turns out the command
  41. can also be used to inform FFS whenever a disk is changed. This means that
  42. every time you change a floppy, you have to send a DISKCHANGE command. This
  43. is quite annoying, and risky. If you forget a DISKCHANGE only once you can
  44. damage two floppies!
  45.  
  46.  
  47. The Second Solution: AUTODISKCHANGE
  48. -----------------------------------
  49. AutoDiskChange is a small program that you run in the background. Every time
  50. you change a floppy it will send the appropriate information to FFS to tell
  51. it that a disk has changed. This puts FFS on the same level as the normal
  52. file system.
  53.  
  54.  
  55. The Third Solution: 1.4
  56. -----------------------
  57. Kickstart 1.4 will see FFS migrate into ROM. This will allow the system to
  58. be completly running FFS (including floppies).
  59.  
  60.  
  61. Why FFS on floppies?
  62. --------------------
  63. FFS will allow you to store 4.9% more data on the same floppy. It will also
  64. do disk directories quite a bit faster. Disk reads and writes are speeded up
  65. a little, but not that much. This is due to hardware limitations. One area
  66. where a big difference can be perceived is when doing 2 or more disk
  67. transactions simultaneously. If you're saving some data to floppy in DF0:
  68. and reading stuff to the RAM disk from DF1:, there will be virtually no
  69. slowdown of either the write or read operations. This is in contrast with
  70. the old FS. Note that performing two disk operations on the same floopy still
  71. results in HORRIBLE performance loss.
  72.  
  73.  
  74. 'How To' Guide
  75. --------------
  76. First, you need the file "FastFileSystem" in your system's L: directory.
  77.  
  78. Second, you will need the file "arp.library" in your system's LIBS:
  79. directory.
  80.  
  81. Third, append the following MountList entries to your system's mountlist
  82. (found in the DEVS: directory).
  83.  
  84. /* Entries to mount the normal DF0: and DF1: as FF0: and FF1:, those new
  85.  * handlers will use FFS.
  86.  */
  87. FF2:       Device = trackdisk.device
  88.            FileSystem = l:FastFileSystem
  89.            GlobVec = -1
  90.            Mask = 0x7FFF
  91.            Unit   = 0
  92.            Flags  = 1
  93.            Surfaces  = 2
  94.            Mount = 1
  95.            BlocksPerTrack = 11
  96.            Reserved = 2
  97.            PreAlloc = 11
  98.            Interleave = 0
  99.            LowCyl = 0  ;  HighCyl = 79
  100.            Buffers = 5
  101.            BufMemType = 3
  102.            DosType = 0x444F5301
  103. #
  104.  
  105. FF3:       Device = trackdisk.device
  106.            FileSystem = l:FastFileSystem
  107.            GlobVec = -1
  108.            Mask = 0x7FFF
  109.            Unit   = 1
  110.            Flags  = 1
  111.            Surfaces  = 2
  112.            Mount =1
  113.            BlocksPerTrack = 11
  114.            Reserved = 2
  115.            PreAlloc = 11
  116.            Interleave = 0
  117.            LowCyl = 0  ;  HighCyl = 79
  118.            Buffers = 5
  119.            BufMemType = 3
  120. #
  121.  
  122. [ Seems to me the above Mountlist entries should be FF0: and FF1:  --  KED ]
  123.  
  124. Fourth, issue the following commands from a CLI:
  125.    MOUNT FF0:
  126.    MOUNT FF1:
  127.  
  128. At this point, you should run AutoDiskChange:
  129.    RUN >NIL: <NIL: AutoDiskChange FF0: FF1:
  130.  
  131. And voila! You now have two FFS drives on your system! Of course, you will
  132. also need to format floppies in FFS mode. To do this, enter a blank disk in
  133. your external drive and type:
  134.    SYS:SYSTEM/FORMAT DRIVE FF1: NAME "FFS Floppy!" NOICONS FFS
  135.  
  136. Once the format operation complete, you can now do a directory of your disk
  137. and copy data onto it. You need to refer to the drive as FF1:, not DF1:. So
  138. to copy something on an FFS floppy in your external drive, type:
  139.    COPY MyFile TO FF1:
  140.  
  141. You can still use your drives with old-style floppies. You just access them
  142. as usual using DF0: and DF1:.
  143.  
  144. When an FFS floppy is in your external drive, the INFO command will report
  145. that the disk in unit DF1: is "Not a DOS Disk", which is true, it's an FFS
  146. disk. The entry for drive FF1: will correctly show the name of your floppy.
  147. If you try to access an FFS floppy using DF1:, you'll get a "Not a DOS Disk"
  148. requester. You can simply click cancel and try again with FF1:. The same
  149. situation will occur if you try to access a non-FFS floppy as FFS.
  150.  
  151. The only way to get rid of FFS and of AutoDiskChange is to reboot the system.
  152.  
  153.  
  154. Formal Instructions
  155. -------------------
  156. AutoDiskChange can accept up to four arguments. These arguments simply
  157. describe the names of the FFS handlers for each of your drives. So as we did
  158. above:
  159.    AutoDiskChange FF0: FF1:
  160. tells the program that your internal floppy will be mounted as FF0: and your
  161. first external floppy will be FF1:. You can specify up to four drives this
  162. way. You must make sure your drives have been previously mounted as FFS
  163. before using AutoDiskChange. You cannot mount your third external drive
  164. without also mounting all drives before it. If you only intend on using FFS
  165. on this drive it will not be a problem. Mounting FFS takes very little
  166. memory, so you can mount on all your drive, but still use it on a single
  167. drive.
  168.  
  169.  
  170. How It All Works
  171. ----------------
  172. AutoDiskChange hooks up in the trackdisk device disk change interrupt.
  173. Whenever this interrupt occurs, the program then sends an ACTION_DISKCHANGE
  174. packet to the related FFS handler.
  175.  
  176.  
  177. Problems
  178. --------
  179. FFS will NOT warn you if you remove a floppy too quickly (when the drive
  180. light is on). When writing, FFS also has a tendancy to turn off the drive
  181. light for a few seconds, and then turns it back on for about a second. This
  182. is because FFS caches information and if there is no activity for awhile,
  183. flushes its buffers to disk.
  184.  
  185. FFS seems to return wierd status information to the INFO command. Simply
  186. don't look at the status info! The problem was confirmed by Steve Beats of
  187. Commodore and is due to the fact thet FFS doesn't know about removable
  188. media.
  189.  
  190.  
  191. I hope you benefit from this program, it was fun to write in any case.
  192.  
  193.                 Martin Taillefer
  194.                 136 Des Frenes
  195.                 Montreal, Quebec
  196.                 CANADA   H1B 1X8
  197.  
  198.                 TEL: 514/645-4083
  199.                 BIX: vertex
  200.  
  201.