xucaen Posted October 24, 2015 Share Posted October 24, 2015 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 Quote Link to comment Share on other sites More sharing options...
Roy Posted October 24, 2015 Share Posted October 24, 2015 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. 1 Quote Link to comment Share on other sites More sharing options...
CPUWIZ Posted October 24, 2015 Share Posted October 24, 2015 That memory layout image is incorrect. Quote Link to comment Share on other sites More sharing options...
xucaen Posted October 24, 2015 Author Share Posted October 24, 2015 This is where 16 years of C# programming fails me. 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? Quote Link to comment Share on other sites More sharing options...
xucaen Posted October 24, 2015 Author Share Posted October 24, 2015 That memory layout image is incorrect. I got it from 7800 Software Guide updated.pdf . Can you point me to a corrected document? I am attaching the 7800 Software Guide updated.pdf that I have. I found it here on AA in another thread. 7800 Software Guide updated.pdf Quote Link to comment Share on other sites More sharing options...
CPUWIZ Posted October 24, 2015 Share Posted October 24, 2015 I doesn't really affect you, it's more a note for hardware designers. Just never ever rely on, or use, mirrors! 2 Quote Link to comment Share on other sites More sharing options...
xucaen Posted October 25, 2015 Author Share Posted October 25, 2015 BTW, in that memory layout does "available" mean RAM or does it mean available for expansion? Quote Link to comment Share on other sites More sharing options...
CPUWIZ Posted October 25, 2015 Share Posted October 25, 2015 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. 5 Quote Link to comment Share on other sites More sharing options...
PacManPlus Posted October 25, 2015 Share Posted October 25, 2015 Late to the party again. I sat the post and was coming here to answer. Damn you guys are fast! 1 Quote Link to comment Share on other sites More sharing options...
EricBall Posted October 26, 2015 Share Posted October 26, 2015 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.