[atari7800] Re: Questions about character/indirect mode

  • From: "Eric Ball" <ek-ball@xxxxxxxxxx>
  • To: <atari7800@xxxxxxxxxxxxx>
  • Date: Fri, 29 Apr 2005 22:56:09 -0400

From: "Dennis Debro"
> I understand that for direct mode your graphics must be stored upside down
> and separated by a page. Does character mode act the same way? I did a
> disassembly on Ms. Pac-man and the characters in this game are not stored
> upside down and they are stored similarly to the 2600 or A8.

Weird.  No, the graphic data for indirect mode is handled the exact same way
as for direct mode (one line per page, bottom line first).  See my paddle
demo (which uses indirect mode for the digits in a very, uh, interesting
manner).  The address in the display list entry points to the first
tile/character.  The value of each tile is used as the LSB part of the
sprite address, and the CHARBASE register is the MSB.  It's then handled
exactly the same as a normal direct mode sprite (including Holey DMA).

> I also assume you can combine character and direct modes in the same zone.
> I get this from the programming doc where it states..."Indirect mode, when
> selected, only lasts as long as the corresponding header is being
> processed." Is this a correct assumption? I'd think one would do this so
> character mode could be used for a background (i.e. the dots and maze in
> Ms. Pac-man) and direct mode for your sprites.

Correct.  Indirect for background, direct for motion sprites.

As suggested, they must copy the graphics data to RAM for use.  (This also
explains why there isn't any recognizable graphics when I look at the ROM
with my a78sprite tool.)  Note: according to the docs Holey DMA doesn't
apply for addresses < $8000, so they must adjust the graphics data for
vertical motion - ick.

One possible reason they did it this way is to squeeze the game onto a 16K
ROM; so they don't have to waste 4K of ROM space for less than 256 sprites
of graphics data.

Other related posts: