Thread: Plasma
View Single Post
Old 13 January 2008, 04:40   #9
AGN
Registered User
 
Join Date: Aug 2004
Location: Poland
Posts: 142
Quote:
Originally Posted by pmc View Post
What are they actually doing there? At a basic level I think it's done with simple bitplane patterns and then using the copper to change the colour registers for the colours that make up the patterns...? What I don't understand is how the copper is used to interact with the patterns and how the patterns are altered (if they're altered?) to get the plasma effect.
Background:
Due to limit in dma/whatever in amigas You can change color (by copperlist) at every 8 pixels in lores.

Many plasmas uses following copperlist:
wait, move, wait, move, wait, move....

This works fine when Your plasma area is a static block of copper "pixels" (8x1).

If You try to move horizontally whole plasma-area (or just one line of it) by 1 pixel left/right We hit another problem.

Wait instruction from coper have low horizontal resolution - 4 pixels in lores. So scroll won't be smooth enough.

Solution in this intro is to align plasma by using bitplanes.

One bitplane is "FF FF FF FF ...." and second "00 FF 00 FF 00 FF ...." so we got only 2 colors (02 and 03).
Look at copperlist from this intro. There is one wait at beginning of plasma line and then:
move clolor02, move color03, move color02.....

You can move bitplanes by 1px by hardware so whole plasma will move smooth.

Why 2 bitplanes instead of one?
One bitplane (filled with 00 FF 00 FF) means color00 and color01.
Color00 is background, so You will get garbage at right and left borders of plasma area.
AGN is offline  
 
Page generated in 0.07481 seconds with 11 queries