Jump to content
IGNORED

Question about Dan Boris's demo


Allan

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

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...