[atari7800] Re: Odp: 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:57:23 -0500

> One more thing, though, has been floating through my mind: how MARIA does
> know whether a DL is 4 or 5 bytes long? How does she know that it's 'mode
> byte', not 'palette+width'? Maybe I'm not reading carefully, but I didn't
> find anything about this anywhere.

A 5 byte header has the low 5 bits clear and the second highest bit set.
(If the second highest bit is cleared, then it's a 2 byte end of list
header.)  This is why the width of a 4 byte header cannot be 32, because
then all the width bits would be cleared.  (Remember that the width is the
two's complement, so 32-32 = 0.)

Other related posts: