Author: Anders Eriksson (1cust87.tnt11.stk3.da.uu.net)
Date: 07-27-2000 01:55
Hello,
there are several things making it difficult to write a wolfgame quick on st.
The major problem isn't the CPU, it's still a problem but the screenmode is not made for texturemap or similar things.
The st screen is made of bitplanes, not byte/pixel or word/pixel. Meaning to plot one point, you need to bitset four places in memory separately. This is really really slow.
The usual trick in demos is to draw the graphics into a psuedobuffer whish simulates a byte/pixel screenmode and then use a conversionloop into bitplane format.
For this conversion to be anywhere near resonable quick, it needs to be 2 pixels wide.
It works this way that you make a table of all combinations ther are of 4 pixels beside eachother (16*16*16*16 combinations) where each combination is 4 bytes (one for each plane).
Then in the conversionloop you read 4 chunky (byte/pixel) pixels and use it as an offset into the precalcbuffer, and yu get 4 bytes out, one for each plane.
move.l (a0,d0.l),d0 ; get the 4 bytes from buffer
movep.l d0,(a1) ; move one byte to each plane
Anyway this is just the simple part, but timeconsuming, for a 160*100 psuedo screen to be mapped into a 320*200 bitplane screen is easily using up 1->1.5 vbl. Meaning there is a starting framrate of
approx 25-30fps before even starting the wolfstuff!
Anyway, now you know everything isn't just about cputype and speed for such a thing to be made.
--
Anders Eriksson
support@atari.org
|