+Allan #1 Posted December 19, 2006 This is really for anybody to answer. In Dan's 7800 sprite demo, what exactly is this bit of code doing in relation to the Display List? ;********************** reset DL ends ****************** ldx #$0C lda #$00 dlclearloop dex sta dlend,x bne dlclearloop Is this erasing the previous drawing of the 'sprite', a.k.a. erasing the one (or two zones) the graphics are drawn in? Thanks, Allan Quote Share this post Link to post Share on other sites
DanBoris #2 Posted December 19, 2006 The dlend table is used to store the index of the next available spot in each DL where you can write a DL entry. The piece of code below simple resets all these indexes to 0. When I write to a DL entry this index is added to the starting address of the DL to get the address to write the entry into. Dan This is really for anybody to answer. In Dan's 7800 sprite demo, what exactly is this bit of code doing in relation to the Display List? ;********************** reset DL ends ****************** ldx #$0C lda #$00 dlclearloop dex sta dlend,x bne dlclearloop Is this erasing the previous drawing of the 'sprite', a.k.a. erasing the one (or two zones) the graphics are drawn in? Thanks, Allan Quote Share this post Link to post Share on other sites
+Allan #3 Posted December 20, 2006 The dlend table is used to store the index of the next available spot in each DL where you can write a DL entry. The piece of code below simple resets all these indexes to 0. When I write to a DL entry this index is added to the starting address of the DL to get the address to write the entry into. Dan This is really for anybody to answer. In Dan's 7800 sprite demo, what exactly is this bit of code doing in relation to the Display List? ;********************** reset DL ends ****************** ldx #$0C I get it now. lda #$00 dlclearloop dex sta dlend,x bne dlclearloop Is this erasing the previous drawing of the 'sprite', a.k.a. erasing the one (or two zones) the graphics are drawn in? Thanks, Allan I get now. Thanks Dan for the explanation. And thanks for writing the demo to begin with. It's helped a lot in understanding the 7800. Allan Quote Share this post Link to post Share on other sites