home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Best of Mecomp Multimedia 1
/
Mecomp-CD.iso
/
amiga
/
grafic
/
cyberanim
/
cyberanim.doc
< prev
next >
Wrap
Text File
|
1997-05-31
|
9KB
|
295 lines
CYBERANIM IFF/ANIM-format Animation Player v1.2 1 Jun 1997
-----------------------------------------------
This program plays IFF ANIM3/5/7/8-format bitmapped animation files on
any Amiga+GfxCard with OS3.0 or higher and CyberGraphX V2.18 (40.89)
or higher.
In general, it can play any IFF ANIM3/5/7/8-format animation in a
different screen mode than intended. It is most useful for playing
AGA 256-colour animations on an ECS Amiga with a gfx-card.
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: p.mcgavin@irl.cri.nz
FEATURES:
---------
Uses an Intuition-friendly Screen. You can flip it to the back with
left-Amiga M, while an animation is playing.
Plays either from ram or directly from disk. Falls back to disk play
when not enough ram is available.
Uses an ASL ScreenMode requester.
Supports Extra-Half-Brite (EHB) animations.
Uses a double-height Screen and ScrollVPort() for double-buffering.
Dragging the Screen up and down (left Amiga left mouse button drag)
will reveal both buffers. Note that this method of double-buffering
mightn't work properly before CyberGraphX V2.18 (40.89). Make sure
you have an up to date version of CyberGraphX or you might see only
every second frame.
Optionally uses ChangeScreenBuffer() for double-buffering in
non-CyberGraphX modes.
Renders to fastmem bitplanes, then blits to the Screen using gfx-card
friendly BltBitMapRastPort(). Blits only the parts of each frame that
changed since the previous frame (actually the 2nd-previous frame).
Runs from either icon or shell. Uses icon tooltypes for options (i.e,
WorkBench Icons/Information... menu item).
Playback speed can be controlled with F-keys.
Optionally loops animations without loop frames with no garbage or
jitter.
Source code is included, so if something doesn't work you can fix it.
LIMITATIONS:
------------
Does not support HAM or HAM8 in CyberGraphX modes (although they can
be played in the wrong colours).
Double-buffering is not synchronised with the gfx-card video beam in
CyberGraphX modes. There seems to be no supported way of doing this.
My experiments seem to indicate that WaitTOF() still uses the native
chipset vblank, which is out of step with the gfx-card vblank. If
flicker is a problem, as it is with certain animations on my GVP
Spectrum gfx-card, try using the WAITTOF option or try "setenv
CYBERGRAPHICS/CPUP2C 1". However these will slow down animations and
other graphics operations.
Palette changes are not synchronised with the CyberGraphX video beam
either, so animations with palette changes may flicker too.
CYBERANIM doesn't cope with all anim7/8-format files, e.g, if the
first frame is a DLTA chunk instead of a BODY chunk. CYBERANIM
expects anim7/8-format files to have a width that is a multiple of 32
pixels.
CYBERANIM does not support masks, colour ranges or sound. CYBERANIM
ignores unrecognised IFF chunks.
CYBERANIM doesn't seem to work properly for all AnimBrush animations.
Some corrupt anim files may crash CYBERANIM (although most won't).
OPERATION:
----------
I've tried to make CYBERANIM easy to use in many different ways.
Just double-click the CYBERANIM icon and select an anim to play from the
requester.
Alternatively you can set up project icons for your anims (e.g, with
IconEdit).
Options can be specified either on the commandline or in icon
tooltypes. You can set default tooltypes in the program icon and
override them temporarily with tooltypes in any project icon.
From the SHELL or CLI, the syntax is:
CYBERANIM FILE/M,DISK/S,RAM/S,ONCE/S,WARP/S,NOMODEREQ/S,WAITTOF/S,
WAITBOVP/S,CH=CHANGESCREENBUFFER/S,NOLOOPFRAMES/S,SC=SCREENMODE/K
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).
ONCE Play once, then quit. (Default is to loop).
WARP Plays real fast. Default speed is what anim says.
WAITTOF Attempt to avoid flicker.
WAITBOVP Another attempt to avoid flicker.
CHANGESCREENBUFFER Use ChangeScreenBuffer() --- non CyberGraphX modes only.
NOMODEREQ Tries to guess the best Screen mode to use.
SCREENMODE=modeid Use the specified Screen mode.
NOLOOPFRAMES Use this when an animation has no loop frames.
SCREENMODE
----------
There are 3 ways to specify the ScreenMode with the SCREENMODE option.
hexadecimal e.g, SCREENMODE=$21000 or SCREENMODE=0x21000
decimal e.g, SCREENMODE=135168
by name e.g, SCREENMODE="PAL:Low Res" --- must be exact
KEYBOARD AND MOUSE CONTROLS
---------------------------
To quit an animation, press ESC or Q or click the right mouse button.
CYBERANIM also stops when it receives a CTRL/C break signal, e.g, by
typing CTRL/C in the Shell window or by using the AmigaDOS BREAK
command.
Keys F1 through F10 can be used to change animation speed as follows:
F1 as fast as possible
F2 60 frames per second
F3 30 frames per second
F4 24 frames per second
F5 15 frames per second
F6 12 frames per second
F7 10 frames per second
F8 5 frames per second
F9 1 frame per second
F10 at the speed specified in the anim file
Key L toggles between loop frames and no loop frames.
LOOP FRAMES
-----------
Loop frames are 2 extra frames added to the end of an animation that
restore the first 2 frames respectively. Deluxe Paint always makes
animations with loop frames. By default, CYBERANIM assumes every
animation has loop frames.
Some utilities create animations without loop frames. Then CYBERANIM
may jitter and/or garbage may appear on the display the 2nd and
subsequent times around. If this happens, try the NOLOOPFRAMES option
or press L once during play.
WHY IS CYBERANIM SO SLOW?
-------------------------
Have you tried the WARP option or pressed F1 yet? The default is to
play at the speed defined in the anim file, which is often quite slow.
What kind of Amiga do you have? CYBERANIM is significantly faster on
faster Amigas. Fast memory helps a lot too.
What resolution is the anim file? 320x200 is up to 5 times faster
than 640x512.
In CyberGraphX modes, CYBERANIM unpacks each frame to a temporary
buffer in fastmem then blits that buffer to the Screen. Since
BltBitMapRastPort() blits only rectangles (BltMaskBitMapRastPort()
seems to be slower), CYBERANIM generally blits more than the parts
that changed since the previous frame.
Other animation players (and CYBERANIM using native modes) unpack each
frame directly to the Screen. The latter method is faster but it is
not compatible with gfx-cards. On the other hand, CYBERANIM does not
use slow chipmem at all in CyberGraphX modes.
Anim-format is exactly the wrong format for chunky gfx-cards. That
is, everything is stored internally in "planar" format, but the
gfx-card has its graphics video-memory arranged in "chunky" format.
Algorithms to convert between chunky and planar format are slow.
CYBERANIM uses the conversion algorithms built in to CyberGraphX to
convert from planar to chunky. CyberGraphX uses the gfx-card's
hardware for this if the environment variable CYBERGRAPHICS/CPUP2C is
set to 0, otherwise it uses a software algorithm.
Note also that animations with less than 8 bitplanes play faster than
8 bitplane animations in native modes, but not necessarily in
CyberGraphX modes. That's because there is less memory to move around
with less bitplanes in planar modes. This is an advantage planar has
over chunky and one of the reasons Amigas have always been so good at
animation.
BUGS:
-----
None that I know of in v1.2.
THANKS:
-------
Thanks to Frank Mariak and the rest of the CyberGraphX team for
CyberGraphX. (By the way, I am not associated with CyberGraphX
development, just a satisfied user...)
DISCLAIMER:
-----------
It seems to work for me. Tested on:
A3000 + 40MHz Warp engine + GVP Spectrum EGS & CyberGraphX
A4000/040 + CyberVision64 & CyberGraphX
HISTORY:
--------
v1.0 8 Sep 1996
First release.
v1.1 8 Oct 1996
Added anim8 support.
Use OpenScreenTags() instead of OpenScreen() to work around problem described
above.
Timer device was initialised with UNIT_MICROHZ instead of UNIT_ECLOCK --- oops.
Rewrote some more unpacking code in assembly instead of C.
Tried to speed up the existing assembly code (unpack.s).
v1.2 1 Jun 1997
Fixed bug with 16-bit anim-7 files.
Many errors are no longer fatal --- now returns to file requester.
Now plays (most?) animbrush files.
Added CHANGESCREENBUFFER option (non-CyberGraphX modes only).
No longer flickers (much) in native modes when using CHANGESCREENBUFFER.
Added SCREENMODE option.
Added NOLOOPFRAMES option and L control.