home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 458.lha / zapdh0_v1.3 / zapdh0.doc < prev    next >
Text File  |  1990-12-12  |  8KB  |  199 lines

  1. ZapDH0
  2. ------
  3. By John Davis, 
  4.  
  5. Version 1   October 1989
  6. Version 1.1 April 1990
  7. Version 1.2 24 June  1990
  8. Version 1.3 26 June  1990 ( 1.2 didn't last long did it :-)
  9.  
  10. What it does
  11. ------------
  12. All  you  2090  owners  ....   ever  get _really_ annoyed with that forced
  13. OldFileSystem  DH0 partition?  It's bad enough that you hvae to waste 400k
  14. of  disk  space with the OFS partition, but what is really inconvenient is
  15. that  you can't cancel the device ( <assign dh0:  remove> sends you off to
  16. meet  the guru ), and therefore means you can't assign DH0:  to be the FFS
  17. partition.
  18.  
  19. This  in  turn  means that all those _nice_ programs with install programs
  20. that  want  to  install to DH0, or those equally _nice_ programs that give
  21. you  file requester gadgets only for DH0 aren't much fun at all ( okay ...
  22. call  me lazy, but newzapping three zillion programs so as DH0->FH0 is not
  23. my  idea  of  fun  ...   at this point I should say a big thank you to all
  24. _real_  programmers  whose  filereq's  know  what the _current_ dir is and
  25. start  there, or even better those that know how to scan a device list for
  26. available  devices  <  not  hard  ...   see  the included example code for
  27. ListDevs > )
  28.  
  29. Well this program is just for you.  What it does is munge it's way through
  30. the  DOS  device list, looking for that 'orrible DH0 node .  When it finds
  31. it, it alters the DeviceNodeName so as it's name is now ZH0.  You are then
  32. free to assign DH0:  onto your real main partition.
  33.  
  34. On  top  of  this,  if it detects that you have a df2:  floppy disk but no
  35. df1:   it will create a 'clone' drive called df1:.  This is linked (arghhh
  36. ...   creeping unix terminology :-)) to df2:, and helps with programs that
  37. only have gadgets for df0:  and df1:, or if you (like me) have got used to
  38. typing 'df1:' when referring to the second drive (old a500 traits die hard
  39. it seems)
  40.  
  41. Usage
  42. -----
  43.  
  44. Pretty    simple   really,   just   chuck   ZAPDh0   somewhere   in   your
  45. startup-sequence.
  46.  
  47. It  is  _probably_ safer if you do it once you've assigned everything over
  48. to the FFS partition, but it seems that it's pretty safe to put just about
  49. anywhere  (as  any  existing dos locks to dh0:blah will still point to the
  50. _old_  DH0:   ...  it's just any new references that will get the assigned
  51. DH0).
  52.  
  53. eg .. in your startup-sequence
  54.  
  55.      ZAPDh0
  56.      assign DH0: fh0:
  57.  
  58. From  now  on  all references to DH0:  will refer to FH0:.  If you want to
  59. acces the OFS partition, you still can (unlike if you use assigndev), it's
  60. just  now called ZH0:  ( and you can still access it via workbench).  Plus
  61. (  if  you  had a df2:  but no df1:  ) you'll find you've grown a df1:  as
  62. well.
  63.  
  64. Incidentally,  should you want to STOP the floppy rename ( due to problems
  65. or  if  you  just  don't like the idea ) then just add these lines to your
  66. startup-sequence instead of the above :
  67.  
  68.     ASSIGN DF1: sys:
  69.     ZapDH0:
  70.     ASSIGN DF1:
  71.     ASSIGN DH0: fh0:
  72.  
  73. ( I don't check to see if an existing DF1 is really a device or just a 
  74. dir, so the assigned df1: will fool me into not touching the floppies )
  75.  
  76. Warning
  77. -------
  78.  
  79. This  program  is what CBM tech support would probably describe as 'wildly
  80. illegal'  ...   I  access structures in a manner I've got no right to.  As
  81. such  I cannot guarantee it will work on any given setup, nor that it will
  82. work  in  future  releases  of  the  OS.   I have tested it on 2000's with
  83. 2090's,on  500's with A590s and on C-Ltd drives, and it's worked ok on all
  84. of them.
  85.  
  86. BUT  -  there  is now warranty implied or express on this package!!  If it
  87. causes your hard disk to explode, killing your cat and causing you to have
  88. a  nervous  breakdown,  it is NOT MY FAULT.  However, if you do experience
  89. any  strange  side  effects  or  any  other  problems  with or due to this
  90. program, get in touch so as I can see about remedying them.
  91.  
  92.  
  93.  
  94. Revision History and Tech Notes
  95. -------------------------------
  96.  
  97. v 1.3 
  98. -----
  99.  
  100. Time  for  a total rethink of how the df2:  floppy is renamed to be df1:!!
  101. Plus a general code cleanup ( was starting to look a tad loosed in there).
  102.  
  103. Previous versions just altered the name field of the df1:  devicelist node
  104. in  place,  this worked great for the 99% of the programs that went by the
  105. rules for working out what the host device was ( by host device I mean the
  106. underlying block structured device the filesystem level device sits on e.g
  107. for  df0:   the host device is trackdisk.device unit 0), but it turned out
  108. that  some  programs  were  wrongly  assuming that there would ALWAYS be a
  109. correspondence  between the devname and the trackdisk devce unit acting as
  110. host  (  that  is df1:  is unit 1, df2:  unit 2 etc ...  which is normally
  111. true, but assuming this is NOT an officially supported practice ).
  112.  
  113.  !  Included in this archive is ListDevs, a small example program that
  114.  !  shows how to LEGALLY work out what the host device for a given dos
  115.  !  device is, plus it shows how to extract a lot of other info on the
  116.  !  host-dev  -  based  in  part  on  code posted to UseNet by Patrick
  117.  !  Horgan.
  118.  
  119.  !  You  should NEVER assume a connection between device name and host
  120.  !  device  and/or  it's  parameters  ..   cos sooner or later CBM are
  121.  !  likely to change them ( to support higher densities or the like ).
  122.  !  REMEMBER  ..   if they don't state it in the RKM, it's NOT safe to
  123.  !  assume it!!!!
  124.  
  125. This  release gets around this problem by instead 'cloning' the devicelist
  126. node  for  df2:  back into the devicelist as df1:.  This effectively makes
  127. df1:  an alias for df2:, and still costs <100 bytes of memory.
  128.  
  129. This allows ill-behaved programs (Virusx4 and the ARP install were notable
  130. offenders)  to work ( like why is it that two of my favourite programs, by
  131. some  of  the programmers I respect the most, have to be the one's that do
  132. things illegally :-( :-) ).
  133.  
  134. I've  tested the cloned drives fairly extensively, and everything seems to
  135. work  as  it  should  with  them.   This  includes  correct operation thru
  136. WorkBench, and with format and diskcopy ( format df1:  puts a lock on BOTH
  137. df1:   and  df2:, diskcopy df1:  to df2:  is the same as diskcopy df1:  to
  138. df1:  in that it will prompt you to do disk-swaps ). 
  139.  
  140. However,  the  df2:   clone/rename  is  still  basically illegal operation
  141. (a.k.a  a  neat  hack  :-),  and it is possible some programs may not like
  142. having a drive clone done.  Hence, if anyone experiences any anomalies due
  143. to  using  Zapdh0_1.3, could they please contact me ( stating what program
  144. had difficulties ).
  145.  
  146. v 1.2 
  147. -----
  148.  
  149. My  conscience got the better of me, the floppy rename is now handled in a
  150. safer  manner  (unlike  1.1).   ZapDH0  now  first looks to see if there's
  151. already  a  DF1  in  the  system  ( an internal 3.5 floppy ).  If there is
  152. already  a  df1:   it  leaves  the floppies alone (otherwise if you had an
  153. external  as  well  you'd  end up having two DF1:'s !!  having this happen
  154. wasn't much fun).  If it can't find a df1:, it looks to see if it can find
  155. a df2:  and renames it if possible.
  156.  
  157. v 1.1
  158. -----
  159.  
  160. Nothing  mind-blowing  I'm  afraid ( boy, what I'd give to get rid of that
  161. slowfilesystem partition altogether, guess I'll just have to buy a 2091 ).
  162.  
  163. All  that's  changed  is  that ZapDH0's output is now cleaner, PLUS it now
  164. also  renames  Df2:  to be df1:  (for people like me with one internal and
  165. one external floppy, but who are too used to df1:  being the second drive)
  166.  
  167. It still renames DH0 ( if found ) to be ZH0 (it simply traverses down the
  168. DOS devicelist and changes the name field in devicelist node for dh0: ->
  169. zh0:  and for df2: -> df1:). To see exactly how this is done ( I smell
  170. BPTRs :-) refer to the source code
  171.  
  172.  
  173. Licence Agreement
  174. -----------------
  175.  
  176. There  is  none  !!   ZapDH0  is  absolutely  100%  Public  Domain (and is
  177. dedicated  to  all  the  other  PD authors who help make the Amiga a great
  178. machine).
  179.  
  180. If  this  program  makes  you  happy, and makes your life a little easier,
  181. that's  good.   If  you  feel  obliged to thank me, then that's alright, I
  182. always  enjoy  getting  letters  from fellow amiga users.  If it makes you
  183. unhappy  (  i.e.   it's got some bug I haven't found ), then also write to
  184. me.
  185.  
  186. My contact adress is .....
  187.  
  188.    John Davis
  189.    31 Clarence St
  190.    Christchurch 2
  191.    New Zealand
  192.  
  193. or you can find me on AmigaINFO BBS 
  194.                       NZ +3-371-531 1200/2400 Baud 24hrs a day 
  195.                       "home of the midnight coders"
  196.  
  197. or you can reach me via Internet/UseNet as CHEM194@canterbury.ac.nz
  198.  
  199.