PRINT SHOP GRAPHICS UPGRADER -- 16 December 1987

     This Applesoft program is a quick and dirty method of moving
all of your DOS 3.3 PrintShop graphics to ProDOS disks for use by
Print Shop GS. Any improvements or suggestions are welcome.

REQUIREMENTS:
    CAT.TXT
    A program to convert DOS 3.3 files to ProDOS (such as Copy II+)
    At least two ProDOS subdirectories online -- one with over
      310 sectors free, and one with over 510 sectors. These can be
      different directories on a 3.5" disk, or one on a RAM or ROM
      disk, or parts of your hard disk, etc.
    The Applesoft program PS.UPGRADER

PROCEDURE:
   1. CREATE THE SOURCE AND DESTINATION SUBDIRECTORIES. Since ProDOS
root directories are limited in file size, and most Print Shop disks
have 100+ files, you must store them in a subdirectory. I usually
make a /TEMP in my RAMdisk, and an appropriate name on my final disk
(such as /PS.GRAPH/VOL1).

   2. MOVE THE DOS 3.3 FILES TO THE SOURCE DIRECTORY. Copy II+ comes
in handy here. The files will be type BIN, but will NOT be recognized
by Print Shop GS.

   3. MAKE A TEXT FILE FROM THE DIRECTORY. Using CAT.TEXT, make a text
file that contains the path, filename, type, size and mod date of all
the files in your source directory. I suggest you store this text file
in the root directory of your source device. CAT.TEXT expects you to
take this to Appleworks, but we can use it just as it is for our
conversion.

   4. BACKUP YOUR SOURCE AND DESTINATION DISKS if there is anything
besides these graphics on them. I don't >think< there are any bugs
in this program, but I don't want this program trashing 15MB of your
hard work, either.

   5. RUN PS.UPGRADER. It will prompt you for the complete pathname
of the textfile you created with CAT.TEXT, as well as the directory
pathname for the destination of the converted files. The ending / in
the destination path is optional.

   6. Go away for about 5 minutes, and when you come back, if you
see "All done!" on the screen, you've done it! If you see "EEK!"
instead, something went wrong. Write down the error codes following
the "EEK!", and if you can't figure out the problem, write me a note.

TECHNICAL EXPLANATION
     Print Shop GS files are not BIN files, but a user-defined file
of Type $F8 and Auxtype $C323. To allow for color graphics, they
consist of three graphics planes, representing red, blue, and yellow.
If a bit is 0 in all three planes, the pixel is white; if they are
all 1, the pixel is black. This program loads the BIN file in three
times, end-to-end, then creates a file of the appropriate type and
auxtype, then BSAVEs the triple-length image.

EXPLANATION OF PROGRAM LOGIC
  Variables:
   TF$=textfile pathname            DD$=destination directory
   PT$=path for file to convert     FL$=filename to convert
   BK$=blocksize of convert file    TY$=type of convert file
   MD$=mod date of convert file     PS$=complete pathname to convert
   A=holds error code (if any)      EL=holds line# of error (if any)

  Program Logic:
  Line  Explanation
  5-15     Make sure program doesn't crash our workspace
  17       Calls line 400, a routine to set up an MLI CREATE call
             at $4800 and a Param block at $4900. The MLI is needed
             because you can't specify an auxtype using the ProDOS
             BASIC CREATE command.
  20-140   Say Hello and find out where all the stuff is
  145      Make sure the destination path ends in /
  150      ONERR will tell us when we're out of data in the textfile
  170      Start reading file information, one entry at a time
  183-185  Make sure the source path begins and ends with /
  190-200  If the entry isn't a BIN file of 3 blocks, skip it --
             It's not a PrintShop DOS 3.3 Graphic
  220-240  Load 3 copies of the old graphic into memory
  245      Calls line 500, which pokes the pathname into memory and
             makes the CREATE call to make the new file of the
             proper type.
  250      Save the new file image
  260      Loop back to get another name
  300-310  An Error occurred. Was it "OUT OF DATA" (Code 5)? If so,
             we're done. If not, crash!
  320-350  Well, crash gracefully.
  400      Subroutine to poke MLI interface into memory
  500      Subroutine to make MLI call
  1000     Wonderful, positive ending message.

FINAL NOTES:
   Bob Bishop would not be proud of this program. It uses 33 bytes
at $4800, 12 bytes at $4900, 16 bytes at $4A00, and 1716 bytes at $6000.
In other words, it walks all over bank 00. However, as I said at the
start, this is a quick and dirty program. There are many ways that
this program could be speeded up, but since you only need to use it once
per graphic library conversion, it should not be a major problem.
..........Brad Martin CServe 72426,3446

