Author: Anders Eriksson (gem.atari.org)
Date: 10-24-2000 10:37
Hello again,
the routine (chunky to planar) is made to convert a byte/pixel
screen into st-bitplanes screen. Texturemapping etc is alot
faster that way.
The original routine got two pixels from the psuedo-chunky
screen, shifted it 4 bits, and or'ed two pixels more to get
an offset to the plane-graphics-table. As you can understand
this complete word-offset cannot be preshifted in beforehand
as it's generated in the loop from other smaller offsets.
My version of the same loop assumed that the texturemapper
or whatever routine was writing to the chunky, wrote in nibbles
instead of bytes. Same trouble here with preshifted offsets
though.
But it was a nice input, good to see some old and grey ( ;-) )
people stopping by!
There is one way more to optimize the routine I wrote, but
it's system-ugly. By saving the table with plane-graphics
from $0 in memory, you can do these changes:
move.l (a1,d0.l),d0
can be changed to:
move.l d0,a1
move.l (a1),d0
4 cycles less, but then the big offset-table has to be
stored from $0 and up, very system-ugly. And you also have to
sacrifice colour 0 from the textures as the lowest memory with
vectors etc has to be untouched from tabledata :)
Phu, I think (hope) I got it right, and I think this covers
about what Olaf Hoemanns article in UCM is taking up as
well.
--
Anders Eriksson
support@atari.org (http://www.dhs.nu/)
|