home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 29
/
amigaformatcd29.iso
/
c
/
flick.doc
< prev
next >
Wrap
Text File
|
1997-03-05
|
9KB
|
255 lines
Flick FLI-format Animation Viewer v1.2 19 Feb 1994
--------------------------------------
This program plays FLI/FLC-format bitmapped animation files on any ECS
or AGA Amiga running OS2.04 or higher. FLI/FLC-format files are
produced by Autodesk Animator (Pro) and Autodesk 3D Studio on a PC, as
well as by other programs.
The files in this archive may be distributed anywhere provided they are
unmodified and are not sold for profit.
Ownership and copyright of all files remains with the author:
Peter McGavin, 86 Totara Crescent, Lower Hutt, New Zealand.
e-mail: peterm@maths.grace.cri.nz
FEATURES:
---------
Plays either from ram or directly from disk (e.g, when not enough ram
is available).
Works with any size or resolution FLI/FLC file.
Uses AGA 256-colour mode when AGA is available.
Extra-Half-Brite mode (EHB) allows reasonably good colour
approximation on ECS Amigas.
16-colour mode (COLOUR4) allows reasonably good colour approximation
on ECS Amigas in hires (and it's usually faster than 256-colour).
Falls back to EHB (lores) or COLOUR4 (hires) when AGA is not
available. Falls back to disk play when not enough ram is available.
Uses an Intuition-friendly double-buffered Screen. You can flip it to
the back, or drag it down in the usual way, while an animation is
playing. The latest OS3.0 double-buffering functions are used if
possible.
Uses ASL file-requester.
There is an option to use graphics.library for chunky to planar
conversion. That might speed up animations on Amigas with special
hardware (e.g, CD32's Akiko chip).
Achieves 10 to 50 frames/second on an A4000/030 (from ram) with
a variety of chunky2planar algorithms to choose from.
Source code is included, so if something doesn't work you can fix it.
OPERATION:
----------
I've tried to make it easy to use in many different ways.
Just double-click the Flick icon and select an anim to play from the
requester.
Alternatively you can set up project icons for your anims (e.g, with
IconEdit).
From the SHELL or CLI there are some more options available. The
syntax is:
FLICK FILE/M,DISK/S,RAM/S,COLOUR/S,EHB/S,COLOUR4/S,GREY/S,
ONCE/S,ROM/S,NODBUF/S,NOCOMPARE/S
If you don't specify a file, the file-requester pops up.
You can specify a list of files, separated by spaces. However #?
wildcards don't work.
Options are:
DISK: Plays from disk (i.e, plays while reading).
RAM (default): Plays from RAM (i.e, loads first, then plays).
COLOUR (default): AGA 8-bitplane 256-colour mode.
EHB: Extra-Half-Brite 6-bitplane mode.
COLOUR4: 4-bitplane 16-colour mode (usually faster).
GREY: 4-bitplane 16-grey-scale mode (usually fastest).
ONCE: Play once, then quit. (Default is to loop).
ROM: Uses graphics.library WritePixelArray8().
NODBUF: Don't double-buffer (faster, saves RAM, flickers).
NOCOMPARE: Full c2p (faster when frames differ greatly).
Use the ROM option if you own an Amiga with chunky to planar hardware,
like the Akiko chip in the CD32. The ROM option is also useful if you
run out of Chip memory, because it uses less. This option causes
flick to use the graphics.library WritePixelArray8() function instead
of its own routine. WritePixelArray8() uses the special hardware when
it is available, giving a faster animation. If you don't have special
hardware then the ROM option will probably be slower.
Use the NOCOMPARE option for more speed if consecutive frames differ
greatly (e.g, for digitised video, or full-screen 256-grey-level
weather satellite pictures, or fully ray-traced anims with the camera
moving).
To quit an animation, press ESC, Q, q or CTRL/C.
OTHER FREELY DISTRIBUTABLE FLI PLAYERS FOR THE AMIGA:
-----------------------------------------------------
Other FLI viewers I know about are:
Flit 1.0 by John Bickers.
AmiFlick v1.05 by Garrick Meeker.
Flip 1.50 by Dominik Tonn.
These should all be available on Aminet.
WHY IS IT SO SLOW?
------------------
Well actually I think it's quite fast for what it does.
FLI-format is exactly the wrong format for the Amiga. That is,
everything is stored internally in "chunky" format, but the Amiga has
its graphics video-memory arranged in "planar" format. All known
algorithms to convert between chunky and planar format are very, very
slow.
Flick incorporates several different c2p algorithms optimised for
different situations. The default algorithm is CPU based and updates
only the parts of the screen which change each frame. It is fastest
when only a small part of the display is animating. This routine does
not use the blitter, nor does it attempt to pipeline writes to chip
RAM.
If the animation has large differences between frames, then use the
option NOCOMPARE, especially if your Amiga has a slow CPU. Then Flick
selects one of 2 different c2p algorithms, one optimised for a 68040,
the other for a 68020 or 68030 with fast memory. The latter routine
is a combined blitter+cpu c2p algorithm. That is, the blitter and cpu
work together on different parts of the display at the same time.
Both of these routines use chip RAM pipelining techniques that are not
used in the default routine. I tested the 68040 routine at up to 25
frames/second with full 320x200x8 on a 28MHz Zeus 68040 (which has
only 16-bit chip ram) but I have not had the opportunity to test it on
an A4000/040.
If you manage to improve the algorithms significantly, or find a
faster one, please let me know.
For EHB, COLOUR4 and GREY modes, the program makes an extra
translation for every pixel. In EHB and COLOUR4 modes the program
performs a long calculation to recompute the translation table every
time the colour map changes. (Note: Flick does not recalculate the
currently displayed frame with the new palette, so if the next frame
changes only part of the screen then the part which is unchanged will
appear in the wrong colours. Fortunately this doesn't happen very
often, and it never happens in COLOUR mode on an AGA Amiga.)
If you really want to see a FLI-format or FLC-format file played fast,
convert it to an Amiga anim format first. The shareware program
MainActor is excellent for that. Also AmiFlick can write IFF files,
and some of the commercial anim utilities, like ImageFX, can convert
directly from FLI to anim.
BUGS:
-----
Bugs? What bugs? Oh well, maybe the following can be construed as bugs:
Probably crashes on pre-ECS Agnus Amigas running OS2.04 & up (untested).
Anims with lots of colour map changes don't play correctly in EHB,
GREY or COLOUR4.
Doesn't recognise Tool Types, so options are not available from WB.
Can't select multiple files from file requester.
Can't use #? wildcards on commandline.
Stdio output window is ugly.
Probably fails with RTG due to writing directly into custom BitMap.
Converts all 8 planes from chunky even when only 4 or 6 are used.
Converts the whole display from chunky, even when only small parts change.
Uses heaps of chip ram.
The frame-speed stored in the FLI/FLC file is ignored.
No interactive speed control yet, sorry, but try playing with the
command-line options.
THANKS:
-------
Thanks to James McCoull for his 4-pass blitter c2p routine.
Thanks to Patrick van Logchem for speedup ideas.
Thanks to Dominik Tonn for testing.
DISCLAIMER:
-----------
It seems to work for me.
HISTORY:
--------
v1.0 19 Dec 1993
First release.
v1.1 27 Jan 1994
Fixed some minor bugs (missing "break" statements which fortunately didn't
do any harm apart from wasting some memory).
Fixed bug where some structures could be left allocated and asl.library
left open after certain error conditions.
Use V39 Intuition-friendly double-buffering functions when possible.
Added ROM option to use graphics.library WritePixelArray8().
Significantly sped up the chunky2planar routine.
Got FLC-format support working for 640x480 and 480x300 resolutions.
CTRL/C aborts the whole program, not just return to the file requester.
Added 68040-optimised c2p routine.
Added COLOUR4 mode.
Compiled with SAS/C 6.51.
v1.2 19 Feb 1994
Fixed bug where mode did not fall back to COLOUR4 for FLC files on ECS
Amigas.
Worked around SAS/C 6.51 bug in fseek/fread that caused some disk
anims to fail.
Disk-play now reads a frame at a time instead of a chunk at a time.
Improved c2p routine for Chip-only machines by eliminating a mem copy.
Fixed bug where dbuf messages weren't replied to after strange error
conditions.
Added support for FLI/FLC files of any resolution.
Wrote a much faster routine for when only part of the display changes
each frame (and made it the default). This sped up many anims
by a factor of 2 or more.
Added NOCOMPARE and NODBUF options.