Jump to content



1

Question about Dan Boris's demo


2 replies to this topic

#1 Allan OFFLINE  

Allan

    River Patroller

  • 4,249 posts
  • Location:Wallingford, CT

Posted Tue Dec 19, 2006 9:50 AM

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

#2 DanBoris OFFLINE  

DanBoris

    Dragonstomper

  • 930 posts
  • Location:New Jersey, USA

Posted Tue Dec 19, 2006 11:42 AM

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


View PostAllan, on Tue Dec 19, 2006 10:50 AM, said:

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


#3 Allan OFFLINE  

Allan

    River Patroller

  • 4,249 posts
  • Location:Wallingford, CT

Posted Tue Dec 19, 2006 10:05 PM

View PostDanBoris, on Tue Dec 19, 2006 2:42 PM, said:

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


View PostAllan, on Tue Dec 19, 2006 10:50 AM, said:

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




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users