Product specifications
Sprite Generator Table
4.3
The sprite generator table holds a library of potential sprite patterns. It is a maximum
of 2048 bytes long and starts on a 2K boundary (see section 2.2 Register 6). It is split
into 256 blocks of 8 bytes each.
When 8 times 8 bit sprites are being used there are 256 different possible patterns
available for use at any one time. If however, 16 times 16 sprites are in use, each
sprite pattern will take four 8 times 8 bit blocks to make a complete shape, and
therefore only 64 patterns are available for use.
An important point to realise from this is that when you are using 8 times 8 bit sprites
you can access them sequentially by displaying pattern numbers
0,1,2,3,4........253,254,255 etc. But when accessing 16 bit by 16 bit sprites you need
to count in blocks of four so that the pattern numbers will be something like
0,4,8,12,16......244,248,252 etc.
The diagram below shows how 16 times 16 bit sprite patterns held in the sprite
generator table are mapped onto the screen.
Screen display.
^(Illus 8 – Quadrant diagram)
Start of Sprite generator table Bytes 0,1,2,3,4,5,6,7
= Quadrant A
Bytes 8,9,10,11,12,13,14,15
= Quadrant B
Bytes 16,17,18,19,20,21,22,23
= Quadrant C
Bytes 24,25,26,27,28,29,30,31
= Quadrant D
The most important point is that patterns within this table are assigned a pattern
number on the basis of position. The actual manipulation of the sprite patterns has
been discussed in the previous section 4.2.
Animating Sprites (Assembler)
4.4
As has been discussed in section 4.1, animating sprites on the MTX is a matter of
changing one byte within the sprite attribute table to display a sequence of patterns
already resident in VRAM and held in the sprite pattern generator table.
The most difficult part of animating sprites is to get the timing right between displaying
each sequential pattern. The best solution, which unfortunately is the most complex, is
to perform this operation under interrupts. This has been separately described in
section 3.