+Allan Posted December 19, 2006 Share 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 Link to comment Share on other sites More sharing options...
DanBoris Posted December 19, 2006 Share 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 Link to comment Share on other sites More sharing options...
+Allan Posted December 20, 2006 Author Share 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 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.