[atari7800] Re: Odp: Re: Aw: Re: Mode 160B don't works for me...

  • From: "Eric Ball" <ek-ball@xxxxxxxxxx>
  • To: <atari7800@xxxxxxxxxxxxx>
  • Date: Wed, 3 Nov 2004 18:35:58 -0500

> Ehhh... may I ask something? (forgive me my stupid questions) I don't
quite
> understand it: in the software guide I read that 5 byte DLs are for
> "indirect", aka "character" mode, and 'width' here means how many
characters
> should be displayed. And here you say something different. Where lies the
> truth?

(Although Eckhard has answered this, I believe he incorrectly suggested that
4 byte headers can be used for indirect mode.)

5 byte headers are used for two main purposes:
1. Set the Write Mode bit, which affects how bits are translated to pixel
data.
2. Indirect mode graphics.

5 byte headers may be used for direct mode graphics, but the Write Mode bit
is still significant.

The Write Mode bit needs to be set at least once per frame, and it affects
all sprites after it in the display list.  So even if indirect sprites are
not required, there needs to be at least on 5 byte header in the display
list to set the Write Mode.  I typically point one of the offscreen DLs to a
display list which contains the one 5 byte header which describes a 1 byte
direct sprite positioned offscreen.

It is conceivable to use 5 byte headers change the Write Mode (and thus the
number of colors per sprite) on the fly.  Just make sure you either use all
5 byte headers or be very careful in changing appropriately before the next
4 byte header.

For direct mode sprites the address pointer points to the left bottom byte
of the sprite and the width is the number of bytes (not pixels) the sprite
is wide.

For indirect mode the address pointer points to the first character/tile in
the character string/tile list and the width is the number of
characters/tiles.  There is a bit in the CTRL register which sets whether
each character/tile sprite is one or two bytes wide.  The byte value of the
character/tile is then the LSB of the sprite address pointer and the
CHARBASE is the MSB.

5 byte headers do require an additional 2 MARIA clock cycles per line.


Other related posts: