home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / diskutil / flip / man.c < prev    next >
Encoding:
Text File  |  1989-03-22  |  9.4 KB  |  249 lines

  1. /* FLIP HISTORY & MANUAL */
  2.  
  3. /* HISTORY:
  4.  *=========
  5.  *   2.6b tells when copies an executable boot to detect virii
  6.  *   2.6a bug de 'r' repaired
  7.  *        No checksum done if no previous checksum
  8.  *        option 's' for single instead of double (double=default)
  9.  * v 2.6  27 fevrier 88
  10.  *   2.5c re-designing of command parsing
  11.  *      formats disk ('f' command)
  12.  *      randomization of serial # at each copy
  13.  *   2.5b t can override disk
  14.  *      ESC aborts without confirm
  15.  *   2.5a no ESC to another disk, BS!
  16.  *      aborts on key even in format
  17.  *      man in another C file
  18.  * v 2.5  released
  19.  *  2.4.5 write-protect detected
  20.  *  2.4.3 option v to verify source only
  21.  *      multipass copies possible
  22.  *  2.4.2 all sects# outputted on any kind of error.
  23.  *        twister modified to accept starttrack parameter
  24.  *      track_map to know what to copy
  25.  *      t option to specify track
  26.  *      r takes options fvV
  27.  *  2.4.1 i for interactive: default no stop
  28.  *      V verify after format (case-sensitive options)
  29.  *      bug of verify reading into main buffer repaired
  30.  * v 2.4: Jan 15 88
  31.  *  2.3.2 If esc on insert abort
  32.  *      track_read first
  33.  *      no more skip opt
  34.  *       # of sect printed
  35.  *  2.3.1 Drive B presence is really tested
  36.  * v 2.3: Dec 28 87
  37.  *  2.2.3 comparisons were not done!!! -- repaired
  38.  *       copy by 3 sectors
  39.  *        stops if copy sector only by 1
  40.  *  2.2.2 bug de a1a1 repare
  41.  *  2.2.1 no verify by default
  42.  *        r for re-copy
  43.  * v 2.2: Dec 19 87
  44.  *  2.1.1 prints buffer size on start
  45.  *      sector_read done 4 times with comparison!
  46.  *      RETURN repeats last command
  47.  * v 2.1: Nov 28 87
  48.  *  2.0.1 retrys in writes and verify work now.
  49.  *      verify there is a drive B before copying
  50.  * v 2.0: Nov 22 87
  51.  *  1.6.3 verify is another pass
  52.  *  1.6.2 format does not verify anymore
  53.  *      format outputs a char
  54.  *  1.6.1 uses TWISTER's code mmtwst.c to format
  55.  * v 1.6: Nov 11 87
  56.  *  1.5.4 abort on ESC
  57.  *        option "2" for 2-sided.
  58.  *  1.5.3 abort on key with confirm
  59.  *  1.5.2 track, sectors begin at 1 instead of 0
  60.  *        retrys on writes retry format-write-verify loop
  61.  *      on write errors, ESC to go to another disk
  62.  *  1.5.1 port to megamax
  63.  *      uses all memory
  64.  * v 1.5: more checking of entry syntax.
  65.  *        on-line help
  66.  *        fills bad sectors with 0s before writing
  67.  *      more sensible memory allocation
  68.  *      s option for auto skip
  69.  * v 1.4: one automatic retry without prompting. If skips, copies good
  70.  *       sectors anyway.
  71.  * v 1.3: when error on a track, asks for retrys, which are done sector 
  72.  *        by sector.
  73.  * v 1.2: when double sided, copy the two sides
  74.  * v 1.1: whole side in memory for one drive use.
  75.  * v 1.0: original one in mark williams. quick and really dirty.
  76.  */
  77.  
  78. /* ON_LINE_MANUAL:
  79.  *================
  80.  */
  81.  
  82. char           *help_text[] = {
  83. "",
  84. "                FLIP 2.6 manual",
  85. "                 Colas Nahaboo",
  86. "",
  87. "    flip - disk copier with error-recovery, on either sides.",
  88. "           with FAST formatting as TWISTER or DCFORMAT",
  89. "",
  90. "SYNTAX",
  91. "  the commands are given as: (items in [] are optional)",
  92. "",
  93. "      <source-drive>[<dest-drive>][fvVtios9]                  : copy disks",
  94. "      f[<drive>][fvVtis9]                                     : format disk",
  95. "      v[<drive>][tios9]                                       : verify disk",
  96. "      r[<drive>][fvVi]                            : re-write disk in memory",
  97. "      q                                                       : quits",
  98. "      ?                                                       : help",
  99. "",
  100. "  A drive is specified by the letter \"a\" or \"b\", followed optionally by",
  101. "  \"1\" or \"2\" to indicate the side. (default drive is \"a\", side is \"1\")",
  102. "",
  103. "OPTIONS",
  104. "     f - to format destination side",
  105. "     V - verify disk by re-reading track just after being formatted.",
  106. "     v - verify copy by re-reading track just after being written",
  107. "     t - to specify what track(s) to copy (used with \"z\" to give the",
  108. "           number of tracks of the new disk, default 80)",
  109. "     i - interactive: ask user in case of error (default don't)",
  110. "     o - override: do not look at the source disk boot sector to determine",
  111. "           its type, take 10 sectors, 1 sided, 80 tracks, unless told",
  112. "           otherwise by options \"9\", \"d\" or \"t\"",
  113. "     9 - disk is 9 sectors per track (default 10). Used with \"z\" or \"o\"",
  114. "     s - disk is single-sided (default double). Used with \"z\" or \"o\"",
  115. "",
  116. "EXAMPLES",
  117. "  ab2fv - to copy a non-protected SS disk in drive A on the unformatted",
  118. "          back of a SS disk in drive B, verifying the copy.",
  119. "  afv   - (or fv) to copy ANY disk with format and verify, in drive A.",
  120. "  rfv   - to re-write last copy into drive A",
  121. "  ffv   - to format a double-sided disk in drive A",
  122. "  fs    - to erase all files of a previously formatted single sided disk",
  123. "",
  124. "OPERATION",
  125. "  During copy, flip prints for each track, a:",
  126. "  ,    for reading track without problem",
  127. "  ;    for reading track successfully after 4 retrys sector-by-sector",
  128. "  -    for formatting a track (in FAST format)",
  129. "  v    for verifying a track",
  130. "",
  131. "  You can pause during the copy at any time by pressing a key, but pressing",
  132. "  ESC will abort. ^C always quits.",
  133. "",
  134. "  Without i option, on read error, it retries 4 times to read the track,",
  135. "  then reads sector by sector. With option i, it prompts you for what to do:",
  136. "  (the track and sector number given start at 1, but sector number at 0)",
  137. "    - RETURN or SPACE retries. You'd better try to extract, then re-insert",
  138. "      the disk to try to re-center it. (or try on another drive later)",
  139. "    - \"s\" skips the bad sectors, going on with the rest of the copy.",
  140. "      the bad sectors will be filled with 0s on the copy",
  141. "      (but all that could be read is kept, of course!)",
  142. "    - if it is writing the copy, you can press BACKSPACE if you want to try",
  143. "      to write to another disk.",
  144. "    - any other key aborts the copy.",
  145. "  Experience shows that you can recover most of your damaged disks this way.",
  146. "  If it cannot read the track, it reads it sector by sector, but tells you so",
  147. "  because due to a bug in the TOS, a sector can be read incorrectly without",
  148. "  giving an error. So FLIP does 4 reads of the same sector and compares",
  149. "  them to be sure, but even if reads are equals, it warns you because the",
  150. "  risk subsists, due to the bug in old TOS roms...",
  151. "",
  152. "DESCRIPTION",
  153. "  The program copies TOS disks as a whole, and only non-protected",
  154. "  ones. It can consider the back side of a single-sided disk as another disk",
  155. "  so, it is very useful to use the back sides of protected disks, or",
  156. "  single sided disks, such as MAGIC! ones. (with a two-side drive, of",
  157. "  course!)",
  158. "",
  159. "  But it also reads disks with care, being able to read CORRECTLY most disks",
  160. "  causing a read error to copiers or the GEM desktop. Thus, if you get a",
  161. "  read error on a disk, copy it with FLIP!. Moreover, if it cannot read a",
  162. "  sector, it tells you so! (Unlike the HELP program)",
  163. "",
  164. "  Version 2.6 can format and changes randomly the serial # of the disk",
  165. "  when copying, (without the override option). It copies also executable",
  166. "  boot sectors, but tells you so (in 2.6b) so that you can check for a VIRUS.",
  167. "  it gives you the values at $3A offset to identify the virus",
  168. "  Known virus values are: 41,FA,FF                                         ",
  169. "                                                                           ",
  170. "  When it reads a disk, it first tries to read the boot sector in order",
  171. "  to know the size (tracks and sectors per track) of the disk. If it",
  172. "  can't make sense out of it, it uses 80 tracks by 9 sector, unless you",
  173. "  used the \"o\" option",
  174. "  Thus you don't have to tell him the type of the disk you want to copy.",
  175. "  It will recognize double sided disks automatically, but you can only",
  176. "  copy double sided disks, without flipping their faces!",
  177. "",
  178. "  So, NEVER COPY A DISK WICH GIVES READ ERRORS WITH A BIT-COPIER (procopy)",
  179. "  use FLIP instead!",
  180. "",
  181. "  From version 2.0 on, FLIP format in FAST format, all disks accesses on",
  182. "  this disk will be twice faster compared to a normal disk!. It ALWAYS ",
  183. "  formats disks in 10 sectors, even if only to store 9 sectors.",
  184. "  Be aware that I didn't test the validy of the formatting code on the",
  185. "  new roms, so make some tests if you have them.",
  186. "",
  187. "COPYRIGHT",
  188. "  This program is PUBLIC DOMAIN, and should be given with its sources",
  189. "  Feel free to improve it!, but please mention my name.",
  190. "  I would be very glad if you send me back any improved version, such as",
  191. "  a GEM port",
  192. "  CREDIT: It uses code from TWISTER from Dave SMALL & Dan MOORE.",
  193. "",
  194. "BUGS",
  195. "  Not under GEM - yet!",
  196. "  Cannot copy IBM boot sectors (use DCFORMAT)",
  197. "",
  198. "AUTHOR",
  199. "  Colas NAHABOO",
  200. "  383 ch du clos d'Embertrand",
  201. "  06250 MOUGINS",
  202. "  FRANCE.",
  203. "  Personal phone: 93 75 68 29, give me a call...",
  204. "  Electronic mail address:    colas@mirsa.inria.fr",
  205. 0L
  206. };
  207.  
  208. #include "osbind.h"
  209. #include "stdio.h"
  210.  
  211. more(text)
  212. char          **text;
  213. {
  214.     char          **p = text, c;
  215.     int             line = 0;
  216.  
  217.     while (*p) {
  218.     printf("%s\n", *p++);
  219.     line++;
  220.     if (line > 22) {
  221.         printf("%cp more (SP, CR, BS or ESC) %cq", 27, 27);
  222.         fflush(stdout);
  223.         while (!Cconis());
  224.         c = Cnecin();
  225.         printf("%cM", 27);
  226.         fflush(stdout);
  227.         switch (c) {
  228.         case 27:
  229.         case 'q':
  230.         printf("\n");
  231.         return;
  232.         break;
  233.         case ' ':
  234.         line = 0;
  235.         break;
  236.         case 8:
  237.         line = 0;
  238.         p -= 48;
  239.         if (p < text)
  240.             p = text;
  241.         printf("%cp...Backing 1 page...%cq\n", 27, 27);
  242.         break;
  243.         }
  244.     }
  245.     }
  246.     printf("\n");
  247. }
  248.  
  249.