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

  • From: "Eckhard Stolberg" <Eckhard_Stolberg@xxxxxx>
  • To: <atari7800@xxxxxxxxxxxxx>
  • Date: Wed, 3 Nov 2004 15:59:18 +0100

I attached it. Sorry I can't try it out myself - I don't have a 7800...

I tried it on my NTSC 7800, and I basically got the same result as in the emulator. So I had another look at your code and here is what I found:

The last 5 bits in the 4th byte of each 5-byte DL header are supposed
to contain the width in "bytes of graphics data". Since you have
2 pixels per byte and you are spacing your objects in steps of 32 pixels,
you need to set a width of 16 here. The width has to be specified in
2's complement form.

In your DL headers you always use 01001, which is the 2's complement
of 23. This is the length of the textstring in my backdoor example
code, which you obviously used for inspiration. This means that you
are actually writing out 46 pixels for each DL header. So if for
example the snakes mouth was to be transparent, that would explain
why there is some other graphics showing through. If you change
those 5 bits in each DL header to 10000, these graphics problems
should go away

Also your DLL is only set up for 240 scanlines, while you need
to set it up for at least 243 for a NTSC display. If there aren't
enough lines, the MARIA chip will read the data after you DLL and
try to interpret that. This can cause problem, as you might
accidentally trigger an interrupt for example. Lines over 243 will
just be ignored by the MARIA, so it's save to have some extra
lines in your DLL.

The blank zones in your DLL should be spread evenly before and
after the display zones for your title screen. That way the picture
will be nicely centered on the screen. Otherwise it might not
show up completely on some TVs.

And to get a blank zone, you can just have a DL header that contains
nothing but the two $00 stop bytes. The one you currently use will
show some garbage on the screen, because it was designed for the
textdisplay in my backdoor example as well. ;-)

Ciao, Eckhard Stolberg

Other related posts: