PSI(1)                                pce                               PSI(1)



NAME
       psi - convert and modify sector image files


SYNOPSIS
       psi [options] [input-file] [options] [output-file]


DESCRIPTION
       psi(1) is used to modify and convert sector images files.


OPTIONS
       -a, --alternate alt1[-alt2]
              Select a range of alternate sectors.

       -c, --cylinder cyl1[-cyl2]
              Select a range of cylinders.

       -e, --edit what val
              For all selected sectors, set sector attribute what to val.  For
              boolean attributes, a value of 0 disables the attribute and  any
              other value enables it.  Recognized attributes are:

              c      The cylinder number in the sector ID.

              crc-id The ID field contains a CRC error.

              crc-data
                     The data field contains a CRC error.

              del-dam
                     The sector has a deleted data address mark.

              data   Initialize the sector data with val.

              fm     The sector uses IBM single density FM encoding.

              gcr    The sector uses Macintosh GCR encoding.

              h      The head number in the sector ID.

              mfm    The sector uses IBM double density MFM encoding.

              mfm-hd The sector uses IBM high density MFM encoding.

              mfm-ed The sector uses IBM extra high density MFM encoding.

              no-dam The sector has a missing data address mark.

              position
                     The  sector  position  in data bits from the start of the
                     track.

              round-time
                     If the sector read time is within val/100 percent of  the
                     normal value, round it to the normal value.

              s      The sector number in the sector ID.

              size   The sector size in bytes.

              tags   If  val is zero, remove sector tags, otherwise add sector
                     tags.

              time   The sector read time, in data bits.

       -f, --info
              Print information about the current  image  or  the  next  image
              loaded.

       -F, --filler val
              Set the fill byte to val. The fill byte is used when sectors are
              created or enlarged.

       -h, --head head1[-head2]
              Select a range of heads.

       -i, --input filename
              Load an image from filename.

       -I, --input-format format
              Set the input file format to format.  Valid formats are:

              ana    The anadisk dump format.

              cp2    The Copy II PC / Snatchit disk image format. Support  for
                     this  format  is experimental. This format is only avail-
                     able as an input format.

              dc42   The Apple Disk Copy 4.2 file format.

              imd    The ImageDisk file format.

              msa    The Magic Shadow Archive image file format.

              pfdc   The PFDC file format. This has been superseded by PSI.

              psi    The native PCE sector image file format.

              raw    A raw sector dump.

              st     The same as raw, but the  auto-detected  disk  geometries
                     are the ones common on the Atari ST.

              stx    The  Pasti STX file format. This format is only supported
                     as an input format and  some  information  will  be  lost
                     because  PSI  does not preserve the track images that may
                     be present in STX files.

              tc     Transcopy dump format. Support for this format is  highly
                     experimental.   This format is only available as an input
                     format.

              td0    The teledisk file  format.  Only  files  that  don't  use
                     advanced compression are supported.

              xdf    IBM XDF disk images.

       -l, --list-tracks
              List  all  tracks  in  the  current  image  or in the next image
              loaded.

       -L, --list-sectors
              List all sectors in the current  image  or  in  the  next  image
              loaded.

       -m, --merge filename
              Load an image from filename and merge it with the current image.
              Sectors that are identical are discarded. Sectors that exist  in
              only  one image are retained. Sectors that exist in both images,
              but differ, are added as alternate sectors.

       -n, --new-dos size
              Create a new DOS image of size size KiB. Valid  sizes  are  160,
              180, 200, 320, 360, 400, 640, 720, 800, 1200, 1440 and 2880.

       -N, --new type size
              Create  a  new image of type type and size size. Valid types are
              dos and mac. Valid sizes for mac images are 800 and 1600.

       -o, --output filename
              Set the output file name. Before exiting, the current image will
              be written to this file.

       -O, --output-format format
              Set  the  output  file format to format. See the -I option for a
              list of valid formats.

       -p, --operation name [arg...]
              Perform an operation on the current image. Valid operations are:

              comment-add text
                     Add text to the image comment.

              comment-load filename
                     Load the image comment from file filename.

              comment-print
                     Print the current image comment.

              comment-save filename
                     Save the current image comment to filename.

              comment-set text
                     Set the image comment to text.

              delete Delete all selected sectors.

              info   Print information about the current image (same as -f).

              interleave n
                     Set the sector interleave on all selected tracks to n.

              load filename
                     Load the contents of all selected sectors from  filename.
                     The  contents  of  the sectors are read sequentially from
                     the file.

              new    Create all selected  sectors,  if  they  do  not  already
                     exist.

              reorder s1,s2,s3,...
                     Reorder  the sectors on all selected tracks. Sectors that
                     are not mentioned in the parameter are moved to  the  end
                     of the track.

              rotate first
                     Rotate the sectors on all selected tracks such that first
                     is the first sector on the track. If first does not exist
                     on a track, the next higher sector will be rotated to the
                     start of the track.

              save filename
                     Save all selected sectors to filename.  The  contents  of
                     the sectors are written sequentially to the file.

              sort   Sort  the  sectors  on  all  selected tracks in ascending
                     order.

              sort-reverse
                     Sort the sectors on all  selected  tracks  in  descending
                     order.

              tags-load filename
                     Load  the sector tags for all selected sectors from file-
                     name.  For each sector 12 bytes are read, in the order in
                     which the sectors appear on the track.

              tags-save filename
                     Save  the  sector  tags for all selected sectors to file-
                     name.  For each sector 12 bytes are written, in the order
                     in which the sectors appear on the track.

       -r, --record cyl1[-cyl2] head1[-head2] sect1[-sect2]
              Select  sectors.  This  is  the  same as using the -c, -h and -s
              options seperately.

       -s, --sector sect1[-sect2]
              Select a range of logical sectors.

       -S, --real-sectors sect1[-sect2]
              Select a range of physical sectors.

       -v, --verbose
              Enable verbose operation.

       -x, --invert
              Invert the selection.

       --help Print usage information.

       --version
              Print version information.


EXAMPLES
       Convert an ImageDisk file to a PSI file:

              $ psi source.imd dest.psi

       Get image information:

              $ psi -f image.psi

       Add sectors 10 and 11 to all tracks on side 0:

              $ psi -i source.psi -r all 0 10-11 -p new -o dest.psi

       Mark the first sector in the image as having a bad data CRC:

              $ psi -i source.psi -r 0 0 1 -e crc-data 1 -o dest.psi

       Set the image comment:

              $ psi -i source.psi -p comment-set "Test image" -o dest.psi


SEE ALSO
       pce-ibmpc(1), pce-macplus(1), pce-img(1)


AUTHOR
       Hampa Hug <hampa@hampa.ch>



HH                                2013-06-09                            PSI(1)
