Jump to content
IGNORED

Where to put the Display List?


xucaen

Recommended Posts

I am looking at the 7800 memory map and I don't see where the Display List goes. I am also looking at Boris's sprite demo, and it looks to me like he is putting his display list in RAM starting at the top $1800. Does Maria automatically look at the top of ram for the display list or am I (most likely) reading his demo wrong?

 

For example, the code that builds the DLL is:

It looks as though $1800 is the start of Maria's DLL, which according to the memory map, is also the start of RAM

;************* Build DLL *******************

; 20 blank lines

    ldx	#$00                   
    lda     #$4F            ;16 lines
    sta     $1800,x  	      
    inx
    lda     #$21		;$2100 = blank DL
    sta	$1800,x
    inx
    lda     #$00
    sta	$1800,x
    inx                   
	lda     #$44            ;4 lines
	sta     $1800,x        
	inx
	lda     #$21
	sta	$1800,x
	inx
	lda     #$00
	sta	$1800,x
    inx

7800_memory_map.png

Link to comment
Share on other sites

You specify where Maria looks for it by writing to the appropriate register.

Maria equates

 

BACKGRND = $20 ;Background Color

P0C1 = $21 ;Palette 0 - Color 1

P0C2 = $22 ;Palette 0 - Color 2

P0C3 = $23 ;Palette 0 - Color 3

WSYNC = $24 ;Wait For Sync

P1C1 = $25 ;Palette 1 - Color 1

P1C2 = $26 ;Palette 1 - Color 2

P1C3 = $27 ;Palette 1 - Color 3

MSTAT = $28 ;Maria Status

P2C1 = $29 ;Palette 2 - Color 1

P2C2 = $2A ;Palette 2 - Color 2

P2C3 = $2B ;Palette 2 - Color 3

DPPH = $2C ;Display List List Pointer High

P3C1 = $2D ;Palette 3 - Color 1

P3C2 = $2E ;Palette 3 - Color 2

P3C3 = $2F ;Palette 3 - Color 3

DPPL = $30 ;Display List List Pointer Low

P4C1 = $31 ;Palette 4 - Color 1

P4C2 = $32 ;Palette 4 - Color 2

P4C3 = $33 ;Palette 4 - Color 3

CHARBASE = $34 ;Character Base Address

P5C1 = $35 ;Palette 5 - Color 1

P5C2 = $36 ;Palette 5 - Color 2

P5C3 = $37 ;Palette 5 - Color 3

OFFSET = $38 ;Unused - Store zero here

P6C1 = $39 ;Palette 6 - Color 1

P6C2 = $3A ;Palette 6 - Color 2

P6C3 = $3B ;Palette 6 - Color 3

CTRL = $3C ;Maria Control Register

P7C1 = $3D ;Palette 7 - Color 1

P7C2 = $3E ;Palette 7 - Color 2

P7C3 = $3F ;Palette 7 - Color 3

 

DPPH & DPPL.

  • Like 1
Link to comment
Share on other sites

This is where 16 years of C# programming fails me. embarrassed_smiley.gif Thanks for pointing me in the right direction!

 

The sprite demo starts the DLL at $1800, and I took a peek inside Asteroids Delux and it starts the DLL at $1F00. Is it just programmer preference or what is the determining factor in deciding where to put it?

Link to comment
Share on other sites

Available for hardware design, there is no RAM there.

 

For instance, my VersaBoard uses $0400-$047F and $0500-$057F to use the POKEY (any linear 16 byte window within that space, will make a POKEY work). This is basically the "magic" that makes BBCQ possible.

 

The HSC cart uses memory at $1000 and $3000 (which is one of the reasons I said the layout is wrong).

 

All of this "memory" or hardware is on the cart and just mapped into that address space. The 7800 has nothing there.

 

One of my five 7800's can actually map data to $2800.

  • Like 5
Link to comment
Share on other sites

The RAM memory map on the 7800 includes some important shadows which have to be worked around:

;	1800-203F	2K + 64 bytes
;	2040-20FF	192 bytes	0040-00FF ZP shadow
;	2100-213F	64 bytes
;	2140-21FF	192 bytes	0140-01FF SP shadow
;	2200-27FF	1.5K

The DLL doesn't take up that much space (93 bytes for a 240 line screen with 8 line zones), but the display lists for each zone can take up considerable space (depending upon the game and how the display lists are allocated). In addition, if you have a character/tile (indirect sprite) list you will probably want that in a contiguous area in RAM.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...