[comp.sys.amiga] Snapshot-screen dump utility

rouaix@inria.UUCP (04/04/87)

           SNAPSHOT

This is a small utility for dumping screens on files. I am sure there is
already a thousand of other versions, but this one is somewhat special.
It uses an interrupt (just like POPCLI -Real thanks to John Toebes).
When you press Ctrl-Esc, SNAPSHOT will try to find any BitMaps in memory.
If you read carefully the RKM and all the include files, you will notice
that bitmaps may be found from ViewPorts only.
So there are two options:
   -g : search memory from GfxBase
   -i : search memory from IntuitionBase.
I can't say at the moment if there is any difference, so I keep the two
options.

SNAPSHOT saves the pictures in IFF format, using the Fish16 library.
It saves the colours too. (yes there is a bug in PutPict which wants a
ColorTable instead of a ColorMap).
It should be okay with dual playfields, but i never tested.

Afterwards, you may edit the picture with DPaint or your favorite paint
program.

SNAPSHOT may be used with many games , assuming the game disk is a system
disk that is approximately standard.

Examples:  Borrowed Time, MindShadow, Defender of the Crown (yes !),
            ChessMaster2000
Not working (yet) with The Pawn that apparently short-circuits all system
functions.


Some Notes:
- the name of the picture file is generated from the ViewPort address
- SNAPSHOT saves the picture(s) in the directory where you runned it. You
may use vd0: if you have it (and paid for it of course...), or any disk.
   IMPORTANT NOTE: after a (re)boot, the current directory in the Initial
Cli is df0: which is different from sys: . As a consequence, if you run
SNAPSHOT, insert your game disk, run the game, df0: will then be the
game disk which is not what you want.
- you cannot stop or kill SNAPSHOT
And last but not least:
   Despite all my efforts, I couldn't get SNAPSHOT working with expansion
memory. Any help for this will be great.
So you may of course use HIDE (this looks like self-advertisement..)
before you run SNAPSHOT and then return to normal when SNAPSHOT is running.

Let's try now: run snapshot -g and Ctrl-Esc when you are ready.

Final Note: considering a screen enhanced with morerows, the resulting
picture may be considered as INTERLACE by seeilbm.



Please send any comments/bugs/suggestions/flames to
      ...{seismo..}!mcvax!inria!rouaix

SNAPSHOT may be freely distributed as long as the Copyright message is not
modified. It may not be sell or used in another product without my written
permission.
I disclaim all responsability in illegal uses of this program or any damage
resulting from silly or inconsiderated or even normal use of this program.

carolyn@cbmvax.UUCP (04/09/87)

In article <434@inria.UUCP> rouaix@inria.UUCP (Francois Rouaix) writes:
>
>           SNAPSHOT

I like Snapshot but I have a few comments:

1. It would not work with FAST memory present.  I had to use a utility
   similar to "Hide" to disable FAST ram allocations before installing
   Snapshot.  With the FAST ram present, all I could get was a small
   (Lattice ?) stack overflow requestor.  Even with a 40,000 stack.
   With my FAST ram hidden, Snapshot installed properly with my normal
   10,000 stack size.

>[]
>SNAPSHOT saves the pictures in IFF format, using the Fish16 library.
>It saves the colours too. (yes there is a bug in PutPict which wants a
>ColorTable instead of a ColorMap).

2. That isn't a bug.  If you look where they define the passed arg called
   "colorMap", you'll see that it is a WORD *, not a struct ColorMap *.
   I'll agree that "colorMap" was a very poor name choice for a pointer
   to the ColorTable, and that it should be documented better, but
   it's not a bug.

>[]
>Final Note: considering a screen enhanced with morerows, the resulting
>picture may be considered as INTERLACE by seeilbm.

3. I wrote SeeILBM before morerows or PAL Amigas existed.  So it uses
   the HIRES flag if the ILBM is >320 wide, and the LACE flag if >200
   high.  In later versions, I look for a CAMG (Amiga ViewModes) chunk.
   If one is present, I use the ViewMode flags in the CAMG chunk.

   If no CAMG is found, then I set the flags based on the BMHD pageWidth
   and pageHeight.  For PAL compatibility, I now only set LACE if 
   the height is > 256.  So my newer viewers should not set LACE for
   a morerows screen.  I still (wrongly I guess) set HIRES if the
   pageWidth is > 320.  I probably should check for something safer
   like > 400.

   Most current Amiga ILBMs DO contain a CAMG chunk, and any screen
   saver should be saving a CAMG chunk so that unusual display modes
   such as HAM may be properly saved and re-displayed.  And any
   current ILBM viewer should be looking for a CAMG chunk.  If a
   CAMG chunk is found, the viewer should use the ViewModes stored
   there when displaying the picture.  If a CAMG chunk is not found,
   then the viewer should fall back on logical decisions based on
   pageWidth ( >400 ?) and pageHeight ( >256) when deciding which
   ViewModes flags should be set.

   I noticed that Snapshot does not save a CAMG chunk and therefore
   would not be capable of properly saving HAM displays.

   See my new ScreenSave.c for an example of the modifications for
   saving a CAMG chunk in the ILBM.  It's on one of the Fish Disks
   and also on the new IFF disk.  My latest ILBM viewer (Display.c)
   is also on the new IFF disk.  It handles CAMG chunks, displays
   HAM ILBMs, and does Graphicraft (1 range) or DPaint (4 range)
   color cycling.

   The new IFF disk will soon be available from Fred Fish.  Or you can
   order "IFF docs and disk" from CBM (includes printed spiral bound
   docs and listings).

   To order "IFF docs and disk" from us, send a check for $20 made
   out to Commodore Business Machines to:

      Kim Montgomery
      Software Tech Support
      CBM
      1200 Wilson Drive
      West Chester, PA.  19380

   Ask for "IFF Docs and Disk".

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Carolyn Scheppner -- CBM   >>Amiga Technical Support<<
                     UUCP  ...{allegra,caip,ihnp4,seismo}!cbmvax!carolyn 
                     PHONE 215-431-9180
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=