Subject: Re: [stella] skipDraw explained (I hope) (was: bipolar joustpong) From: Dennis Debro <ddebro@xxxxxxxxxxxxx> Date: Fri, 5 Sep 2003 16:03:21 -0400 |
Hi Kirk, > (Honestly right now I don't really understand skipdraw... > but I'll keep pounding through the stella archive via Google. > Sometimes the examples there are tough because it's not > clear what the variables are...I wish I had a timewarp > to Andrew Davie's AtariAge tutorial on the subject :-) I'll try to explain it. If I miss something please correct it. First of all the original skipDraw posting can be found at: http://www.biglist.com/lists/stella/archives/200102/msg00282.html. The first method does... tya ; y is used to keep track of which scan line ; you're on sec ; this can be avoided if you know the carry state sbc SpriteEnd ; SpriteEnd would be the vertical position of your ; sprite adc #SPRITEHEIGHT ; SPRITEHEIGHT is the height of your sprite so... ; ; take the current scanline and subtract the sprite postion now add back in ; the sprite height. Now the value should be between the height of the ; sprite and it's position. ; bcx .skipDraw ; if not between then don't draw the sprite In the illegal opcode method y again is used to keep track of the scan line. lda #SPRITEHEIGHT ; get the height of the sprite dcp SpriteEnd ; SpriteEnd here would be an offset of the sprite's ; position ; ; what you get here is 2 instructions for the price of one :) SpriteEnd is ; decremented and then compared to the height of the sprite. ; bcx .skipDraw ; if it's out of range then don't draw the sprite I hope this makes since but mostly I hope I got this right. > * does this sound like a reasonable implementation > scheme, with the byte for each player? The bricks > are a little tall, but not too too bad. I'll have to read through your description later. I'm busy counting to 76 at the moment ;) After reading this again I think I might have to use the illegal opcode method. > * What are the cons to using the "illegal opcode" > variant of skipdraw? None I can think of. There was talk about maybe some 2600s not recognizing them. Thrust and Qb use illegal opcodes and no one has reported any problems with them. I guess a con maybe that your game won't run on the present Stella emulator. > and what's the clearest example of how to use it? Hmm...look at Thomas' post where he collaborated with Glenn Saunders on Death Derby. It may be a little different but it's still skipDraw. Just remember DD is a 2LK. I forgot that when I first looked at it. Also I think Gunfight uses the "legal" skipDraw. You could also look at: http://www.biglist.com/lists/stella/archives/200301/msg00295.html. This might help explain the difference in DD. Take care, Dennis ---------------------------------------------------------------------------------------------- Archives (includes files) at http://www.biglist.com/lists/stella/archives/ Unsub & more at http://www.biglist.com/lists/stella/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [stella] bipolar joustpong, KirkIsrael | Thread | Re: [stella] skipDraw explained (I , KirkIsrael |
Re: [stella] bipolar joustpong, ecwilkso | Date | [stella] SID2TIA V1.3 : Bugfix!, Manuel Polik |
Month |