home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d5xx / d542 / pp.lha / PP / PP.DOC < prev    next >
Text File  |  1991-09-19  |  12KB  |  291 lines

  1.  
  2. ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
  3.  
  4.                             Powerpacker Patcher
  5.                                 Version 1.3
  6.  
  7.                      Copyright (C) 1991, Michael Berg
  8.  
  9.                             All Rights Reserved
  10.  
  11.  
  12. ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
  13.  
  14. INTRODUCTION
  15.  
  16.    Ever  got  tired of having to use PPMore or equivalent to view all those
  17. Powerpacked  datafiles  you  have  scattered  everywhere?   Or maybe PPMore
  18. doesn't do exactly what you want?
  19.  
  20.    Well,  this  program  should  solve  your problem.  It makes PowerPacker
  21. datafiles look completely like normal files.  In fact, there is now not one
  22. thing  you  can  do with normal files, which you cannot do with PowerPacker
  23. files.
  24.  
  25.  
  26. ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
  27.  
  28. RUNNING PP
  29.  
  30.    Powerpacker  Patcher  runs from either the Workbench or the CLI.  If you
  31. use  it  from CLI, you need not RUN it, because it detaches itself from the
  32. current CLI process as soon as it is activated.
  33.  
  34.    If  you  run  PP  "as  is", with no arguments, it will use RAM:  for its
  35. background  file  decrunching.   You  may  supply  PP  with  one  argument,
  36. describing  the  path  it  should use instead.  Harddisk users with limited
  37. memory will probably welcome this.
  38.  
  39.    It  is  possible  for  you  to  specify  PP's  temporary  path  from the
  40. Workbench,  too.  Click (down,up) on PP's icon.  Then press and hold either
  41. SHIFT  button, and double-click (2*(down,up)) on the disk or drawer icon to
  42. be  used for background file decrunching.  PP will let you know if you made
  43. a mistake during startup.
  44.  
  45.    Once  Powerpacker  Patcher  has  installed  itself  in AmigaDOS, it will
  46. display a small banner message to show you that everything went all right.
  47.  
  48.    Powerpacker  datafiles will begin to "act" as normal files as soon as PP
  49. has  been  activated.  Most programs, commercial or PD, will be fooled into
  50. thinking  that  a  powerpacked  file  exists  in the form of its decrunched
  51. state.   When  they  attempt to load such a file, the decrunched version of
  52. the file will be passed along to the program.
  53.  
  54.  
  55. ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
  56.  
  57. STOPPING PP
  58.  
  59.    Simple!   Just  re-run  PP  and  the  in-memory  version  will terminate
  60. immediately.   DOS  will be restored to its original state, and Powerpacker
  61. datafiles will again appear as ...  Powerpacker datafiles!
  62.  
  63.  
  64. ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
  65.  
  66. SAMPLE APPLICATIONS
  67.  
  68.    Well,  what  is  it all good for, then?  Here's a small list just to get
  69. your juices flowing:
  70.  
  71.     o Viewing Powerpacker datafiles (text)
  72.  
  73.       Simply use the TYPE command - or bring the text directly into
  74.       your favourite editor (TxEd, CygnusEd)
  75.  
  76.     o Viewing Powerpacker datafiles (pictures)
  77.  
  78.       Crunch a typical IFF picture. Then bring it directly into
  79.       DPaint or equivalent
  80.  
  81.     o Icons
  82.  
  83.       Yes, that's right. Go ahead and crunch all those icons. Workbench
  84.       will never know the difference. Remember to retain the names of
  85.       the icons - DON'T use ".info.pp". Workbench recognizes icons
  86.       as files with a postfix of ".info".
  87.  
  88.     o Include files (header files)
  89.  
  90.       Why not go ahead and crunch all your include files for your
  91.       compiler?
  92.  
  93.     o Much more
  94.  
  95.       There is no end to it. ANY kind of datafile may now be crunched,
  96.       because it will retain its functionality 100% as long as PP is
  97.       up and running. Script files for AmigaDOS, *.config files for
  98.       programs that support config'ing, *.doc files for public domain
  99.       disks, IFF pictures for DPaint, rexx scripts, makefiles, sound
  100.       samples, printer drivers -- YOU NAME IT!
  101.  
  102.  
  103. ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
  104.  
  105. THEORY OF OPERATION
  106.  
  107.    It's simple, really.  PP juggles with a few DOS library vectors, so that
  108. future  calls to certain DOS functions will be rerouted through PP.  When a
  109. file-open  request  arrives,  PP  looks at the file in question in order to
  110. determine  the  filetype.   If it is a special file (e.g.  CON:  or NIL:) a
  111. filehandle  from  the original DOS Open() function is returned.  Otherwise,
  112. the  file  is  decrunched  to  a memory block, which is then flushed into a
  113. temporary  file  on  the  RAM disk or in the directory you supplied PP with
  114. when you started it.  A pointer to this new file is then returned.
  115.  
  116.    You  might think that the path for temporary files would be crowded with
  117. files  in a very short time, but PP is intelligent enough to remove them as
  118. they  are  no  longer  needed.  If PP sees that the temporary file has been
  119. changed between the Open and the Close call, the file is rewritten over the
  120. original file, if possible.
  121.  
  122.    Future attempts to Examine() a powerpacker datafile will return the size
  123. of  the  decrunched  file  in  the  FileInfoBlock,  and not the size of the
  124. Powerpacker datafile itself.  Why?  Imagine an editor trying to load a text
  125. file.  It does an Examine() to get at the filesize.  Then it allocates just
  126. enough  memory  to  hold the file.  It then loads the file into that memory
  127. area.   Well,  that  just  won't  work  if  the  filesize  it receives from
  128. Examine()  is  about 50% too small.  Keep in mind that as soon as an Open()
  129. attempt  is  made,  the file is decrunched, and will thus have a completely
  130. different filesize!
  131.  
  132.    For   further  details  on  the  technique  involved,  please  read  the
  133. sourcecode -- it's included for just that.
  134.  
  135.    You  will  probably  notice  that the program is all in one piece.  I am
  136. profoundly  against  "handlers".   This barbaric dissection of programs can
  137. make  everything much more confusing and your L:  directory a heck of a lot
  138. more  crowded.  Techies will argue, that the reason for splitting your code
  139. in  a startup and a resident (the handler part) module is obvious; this way
  140. only relevant code stays in memory and the startup code terminates at once.
  141.  
  142.    Well,  the  startup  code  part  is rarely much more than a few K, and I
  143. myself  gladly sacrifice that small an amount of memory, if this means that
  144. I  don't  have to copy two files for every executable I have.  Handler code
  145. is   only  for  *exceptional*  programs,  where  NO  OTHER  solution  seems
  146. acceptable.
  147.  
  148.  
  149. ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
  150.  
  151. CAVEATS
  152.  
  153.    Yep,  there are a few of these, too.  First of all, you have to remember
  154. that  PP  is  a  one way street.  This means that loading Powerpacker files
  155. will  work  fine, but saving them again will result in a non-crunched file.
  156. The powerpacker.library sorely lacks a crunch function.
  157.  
  158.    Secondly,  when  working  with  crunched icons (or, for that matter, any
  159. other  type  of  crunched  file),  there is a nominal performance reduction
  160. caused by the decruncher.  Don't expect icons to pop up at the same rate as
  161. they  used  to,  or  include-files to get included as fast as they used to.
  162. Use of B.A.D.  or Addbuffers is recommended.
  163.  
  164.    Thirdly,  the  DOS library patches aren't done according to the textbook
  165. (if  there  is  one  on  this topic!).  If you skim through the source, you
  166. won't  find  any  calls to SumLibrary().  Its presense or absense seemed to
  167. make no difference whatsoever, so I left it out (what does it do, anyway?).
  168.  
  169.    Up  until  version 1.1 of PP, it would crash on a 2.0 machine.  This has
  170. now  been  fixed, and PP should be able to run on *any* Amiga.  The program
  171. was  tested  on an A500 using AmigaDOS 1.2, with .5Mb extra RAM fitted, but
  172. has also undergone testing under AmigaDOS 2.0.
  173.  
  174.    The  overall  effect of this program is quite astonishing.  I use it all
  175. the  time.   Try  it - it is just fantastic to see how *.pp files act as if
  176. they were completely normal files!
  177.  
  178.  
  179. ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
  180.  
  181. KNOWN BUGS
  182.  
  183.    Erm..   none,  as  far as I can tell.  However, don't try to remove PP's
  184. temporary  directory  while  it  is still running (direct invitation to the
  185. Guru dude).
  186.  
  187.    Further,  there  seems  to  be  a  small  bug in the Aztec autodetaching
  188. startup  code.   If  you use PP in your S:Startup-Sequence, it appears that
  189. you  should either RUN or RUNBACK pp, or else the EndCLI will not close the
  190. CLI  window.   I  am  working on this problem, and will probably find a way
  191. around  this  using  an  arp compatible autodetach startup module (if I can
  192. find one!)
  193.  
  194.  
  195. ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
  196.  
  197. REMAKING PP
  198.  
  199.    I've  enclosed  a  makefile  suitable  for  Matt  Dillons  "DMake".  The
  200. makefile  should  be  used "as is" only if you want PP to be autodetaching.
  201. If  you  don't, remove all references in the makefile to the macro STARTUP.
  202. This  means  removing  the  definition  of  the  macro,  and  removing  the
  203. "$(STARTUP)"  from  the  line  that  activates  the linker (the "ln" line).
  204. Also,  you  must  find  the  definition  of  the  C  macro DETACHING in the
  205. sourcecode.   It's  located  somewhere  around  line  53.   A non-detaching
  206. version of PP would have this definition commented out.
  207.  
  208.    That's  really  all  there  is  to  it.  Oh, by the way, remember to set
  209. CCOPTS  to  nothing before issuing the DMake command (the DMakeFile handles
  210. parameters  for  CC  on its own).  PP will then be remade using large code,
  211. large  data  & 32 bit integers.  Large code & data, because other processes
  212. will  be executing internal procedures in PP, which is virtually impossible
  213. using the small memory model. (  Sure it's possible, but I'm lazy! |^)  )
  214.  
  215.  
  216. ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
  217.  
  218. THANKS GO TO...
  219.  
  220.    Well,  who  other  than Nico François.  Nico's powerpacker.library, and,
  221. for  that  matter,  all  the other powerpacker tools, are simply brilliant.
  222. Credit where credit is due!
  223.  
  224.  
  225. ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
  226.  
  227. FUTURE RELEASES
  228.  
  229.     Version  1.0  of  PP  was  pretty  much  a beta release, and 1.1 didn't
  230. support  all  you 2.0 guys & girls.  This version (1.3), however, should be
  231. free  of  nasty  surprises.  There's still a multitude of possibilities for
  232. improving PP.  Some obvious choises:
  233.  
  234.  
  235.     o More control on PP. Switching PP temporarily on and off while it
  236.       is running.
  237.  
  238.     o Option to specify multiple paths for file decrunching, such that
  239.       if one fills up, the next will be used.
  240.  
  241.     o Maybe build in a screen blanking facility or PopCLI style
  242.       hotkeys for starting a new CLI. Will this be useful, or will
  243.       it merely interfere with the real PopCLI? Let me know.
  244.  
  245.     o Patching more DOS functions. DeleteFile() is a good one. This
  246.       would enable to the user to verify the "dangerous" actions of
  247.       a new program (a small autorequester: "ARE YOU SURE (blabla)").
  248.  
  249.     o More on this: Turning PP into a simple virus protector as well.
  250.  
  251.     o Anything else that YOU would find useful!
  252.  
  253.  
  254. ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
  255.  
  256. SHAREWARE
  257.  
  258.    PP is shareware.  If you remember, this means that I would really like a
  259. small  donation  if  you use it alot.  $5+ will get you the next version of
  260. PP, as soon as it is available.
  261.  
  262.  
  263. ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
  264.  
  265. FLAMES
  266.  
  267.    If you find anything you (dis)like, mail me.  You're gonna have to write
  268. to  me  actually  using old-fashioned ink and paper, because I'm not yet in
  269. the  modem  business.   If you can't remember how to hold a pen, get one of
  270. the tribe elders to show it to you.  Anyway, here's my address:
  271.  
  272.                                Michael Berg
  273.                          Sct. Peders Gade 24A, 2th
  274.                                8900  Randers
  275.                                   DENMARK
  276.  
  277. (I  expect  to purchase a modem shortly, so be prepared for some real havoc
  278. on all those BBS's 8^) )
  279.  
  280.                                  Have fun!
  281.  
  282.  
  283. ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
  284.      __
  285.     /// 
  286. __ ///
  287. \\X// AMIGA - Quite Simply the Best Computer Ever.
  288.  ¯¯¯
  289.  
  290. ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
  291.