[atari7800] Re: Lost.... (A7800 basics 2/2)

In part one I described how graphics are generated by the MARIA GPU: DPP
registers -> DLL -> display list -> sprites.  Now let's try to think of it
from the CPU perspective.

First, you need to break down the picture into zones of 1-16 lines,
typically 8 or 16 lines.  The height of the zone should match the height of
the sprites.  (It is possible to have sprites taller than 16 lines, or the
height of the zone, but you have to treat them as two sprites.)

To place the sprite on the screen, the game has to determine, based on the
vertical position of the sprite, which zones (and therefore which display
lists) it goes in.  AND or LSR and a lookup table is an easy way to do this.
Then add the sprite header to the end of the display list.  Horizontal
position and sprite width are easy because they are simply parts of the
sprite header.  See
http://www.freelists.org/archives/atari7800/01-2004/msg00002.html for more
info on vertical motion.

Then there's all the usual non-graphics stuff like player input, collision
detection, game logic, enemy AI, scoring...  But much of that code can be
ported (with only some modification) from the 2600 or 5200.


Other related posts: