Display Lists

Eric Ball wrote (on AA):

The MARIA DPPH/DPPL registers form a 16 bit address pointer to the start of the "Display List List" which is loaded at the start of every frame. The DLL is a series of 3 byte entries stored in RAM. Each DLL entry contains a 16 bit address pointer to the Display List, some flags, and the number of lines (1-16) to display using this Display List. (This is often called a zone.)

Each Display List is a series of 4 and 5 byte entries stored in RAM. Each Display List entry contains a 16 bit address pointer to either bitmap or tile list, 1 byte horizontal position, width (1-32 bytes), and palette (1 of 8).

So to put a sprite on the screen, the program adds the appropriate entry to the display list(s) based on the vertical position. 

The display list is a list of every graphical object (sprite) that needs to be drawn on that scanline. Each object is declared in it's own header - a sequence of headers makes up a display list.

The information in each header provides a pointer to the graphic data, the horizontal position, width, and what color format to use.

gdement wrote (on AA):

The 7800 is not pixel oriented. The display list is a list of every graphical object (sprite) that needs to be drawn on that scanline. Each object is declared in it's own header - a sequence of headers makes up a display list.  The information in each header provides a pointer to the graphic data, the horizontal position, width, and what color format to use.

You (via the 6502) fill in these parameters in a properly formatted data structure. When Maria tries to render a scanline, it will read the information you filled in and render the line RAM. Line RAM is an internal function of the Maria - the 6502 doesn't touch it. There are some Maria registers that you can adjust, controlling things like what screen resolution to use, or to configure the color palette. Those are mapped into the memory space at particular addresses. But nobody touches line RAM - that's maria's internal memory for screen rendering. 

The DLL is a data structure that tells the Maria which display list to use for what scanlines. Maria will then only look at *1* display list for the duration of the scanline.  That display list contains headers for every object that will appear on that scanline. So if you have a display list with headers that point to 5 bitmaps of Pac-Man, then you'll end up seeing all 5 of those Pac-Man images rendered together on the same scanline.  If you just want 1 ghost and 1 pacman on the same scanline, then your display list would have 1 header pointing to a ghost bitmap, and 1 header pointing to a Pac-Man bitmap. Animation would be accomplished by changing the graphics pointers between frames.