Guest Book

Added by Your name on Sun Nov 26 14:02:50 2017

About the backgrounds ...

When running the game, every time before playing a level, everything that is needed for this level is
decompressed and placed in the memory. The backgrounds are in the sqz format. To modify them
decompress the files with DIET to the origional size. The background w x h is 320 x 200 pixels.
After decompressing the file size is 32000 bytes. 0h - 7CFFh or 0d - 31999d.

The visible area of the background is 176 lines. The scorebar takes 24 lines. The first line of the scorebar
creates a border separation and takes a light color from the active colortable. The last line is always a
black one. While running the game there is always one colortable active and everything shown on the
screen in a typical level is based on that one colortable.

About the color of the pixel ...

The pixelcolor is based on the planar methode. However the result of the calculation per pixel is a pointer
to the colortable and not a direct RGB color. A colortable in Prehistorik2 is based to output 16 colors so
there are only four bits needed to address a color. The colortable itself creates a 24 bit output that
can address a full RGB color for a pixel.

The four bits that are needed to address the pointer to the colortable comes from the uncompressed
background file. The file is a sommage of four parts that represents the 320 x 200 pixel image.

Plane0 0h - 1F39h. Totally 8000bytes. Every bit from the byte is used to address one pixel color.
So 8000 * 8 = 64000 pixels > W x H 320 x 200 = 64000 pixels.The first pixel is
Top-left oriented. The value found on address 0h is the first bit ( of /4 )
that is used to address the pixelcolor.

Plane1 1F40h - 3E7Fh. Again 8000 bytes for a complete image. Address 1F40h contains the
second bit ( of /4 ) that is needed to address the pointer to the colortable.

Plane2 3E80h - 5DB7h. Address 3E80h the third bit.
Plane3 5DC0h - 7CFFh. Address 5DC0h the fourth bit. etc. etc.

Thus at the moment prehistorik2 launches a level it shoots a colortable into the memory
that is used for that level. So even with the same background the colors can be different.

Look at my movie that I posted here :

The first three levels have the same background just with a little bit different colors.

Thanks for reading.

Leave a reply: