HAM8 chunky graphics
HAM8 chunky graphics was invented by Equalizer/TBL in late '95. He tried C2P
to a HAM8 screen and - 'lo and behold! 18 bit truecolour on stock Amigas! (He
may even have tried it in HAM6 on his A600 first!) TBL showed off the new method
at The Gathering'96 with their demo "TINT".
By Mikael Kalms (Scout / C-Lous)
HAM8 truecolour is very useful for effects with many colours, multiple effects
and mixing effects. It should not be used for standard envmap (almost all envmaps
stand the conversion from 24bit to 256col better than from 24bit to 18bit).
Maximum resolution is 2x1 (1x1 can be achieved but that is exceedingly slow due
to the SHRES screen taking more than 80% of the CHIP bus), though 2x2 looks
almost as good and therefore is the common resolution.
It is achieved by doing 1x1 C2P conversion to the lowest 6 bitplanes (bpl 7 being
filled with $7777 and bpl 8 with $CCCC). One 18-bit truecolour pixel is represented
with four normal pixels, having R, G, B, B contents. The two blue pixels should
have the same colour. Blue number 2 is only a "pad" pixel - anyone who has
experienced 24-bit tc modes on PC know why these tc-pixels are padded to 32-bit...
The bpl 7 and bpl 8 contents specify RGBB order of the pixels. In order to compress
the data to 2xn LORES size, the screen is set to HIRES. Normal scanline doubling is
used for 2x2 size. This method needs a lot of C2P conversion -- a 2x2 tc screen
takes as much as a 1x1 6bpl LORES one! However, drawing algorithms run at the same
speed since FASTmem is 32bit and most demos today require FASTmem. Remember not to
C2P convert the upper 2 bitplanes since they always contain the same data...
A black/white pattern of narrow vertical stripes will of course not look good using
this technique, but how often do you display such patterns in demos?
Note that the AGADOC textfile describes HAM8 wrongly: It says that the 2 control
bitplanes have changed (from HAM6) to be the lowest two. The example HAM8 copperlist
has the BPLxPT rotated! If you have a normal HAM8 copperlist, bpl 7 and bpl 8 are
the control bitplanes. (They are in Intuition HAM8 screens as well.)
Tc is excellent for motion blur and such effects, but if it isn't necessary that
the bits in your textures are in the correct order and position you could always
use a special scrambled C2P routine. It speeds things up a bit. 1-, 2- and 4-bit
scrambling is possible while still retaining a linear chunkybuffer.
Most old effects can be given quite a new touch using this technique, but don't
forget bitplane techniques completely. "The Gate" is a good example of what can
be accomplished using only 64 colours, so:
256 colours should be enough for everyone! Naaahh...