Re: [stella] Visual questions

Subject: Re: [stella] Visual questions
From: Glenn Saunders <cybpunks@xxxxxxxxxxxxx>
Date: Tue, 25 Jul 2000 10:42:50 -0700
At 09:52 AM 7/25/2000 -0400, you wrote:
Well, I only use VDEL for the 6-digit score routine.  It's net effect is a
delay in scanline drawing, but I usually use separate scanline counters for
each graphic's vertical positioning.
Are you going to mention what "really" happens with VDEL?  The fact that
there are 2 more pre-loading graphics registers, GRP0A and GRP1A?

Joe Decuir already mentions this in the documentary.


But, as far as VDEL's original intended use (it's net effect), it is
dependent upon where we are drawing in the scanline.

I don't quite grasp how VDEL is used in six digit scoring yet.


Oh, what the heck, here's some rambling:
If we turn on VDEL, we enable caching of GRP0 and GRP1 in their 'A'
registers.  For example, by doing a store to GRP0, we actually are storing
our data into GRP0A (not displayed), and we inadvertantly move whatever was
in GRP1A to GRP1.

By storing to GRP0 it automatically moves GRP1 data from cache to the main register? So it has the opposite effect on the other player or are you illustrating a mode where VDEL is exclusive to a particular sprite?



 GRP0 and GRP1 are what's actually displayed.  Now, if we
do this store in the scanline AFTER the P1 graphic, P1's graphics will
change on the next scanline.  If we do it before, P1's graphic will change
on that very same scanline.

Which is only an issue with sprite copies, I suppose.



 Whatever P0's graphics were should stay the
same.  VDEL only works if on every other scanline, i.e. the odd ones you do
a STA(or STX, or STY) GRP0, and on the other scanlines, i.e. the even ones,
you do a STA(or X orY) GRP1, not both on each scanline, otherwise the data
from both will be changed because the cached copies will be updated into
the regular graphics registers.
Whew!

So you have to interleave your kernel in a way? Doesn't this have the net effect of being like a single line kernel anyway because you are executing player write instructions on every scanline?


This is what the IEEE article says:

"The second player object's graphics are displayed on the screen using vertical delay. This means that the first scan line uses the second register of the pair whose contents were copied from the line above while the second line uses information newly placed in the first register."

So what I was thinking is that in a 2-line kernel you update the player graphics every other line (on the same line) and since the TIA will keep drawing whatever you last put into it each line, this has the net effect of two scanline high sprites. Normally while writing a kernel like this you would only have ~110 pixel accuracy in move routines, then. So in order to get the line pairs positioned with 220 pixel vertical accuracy you can selectively enable VDEL. Here is a diagram:

NORMAL

0 0 0 0 0 0 0 0 LINE PAIR 0 (contains write (all zeros)
0 0 0 0 0 0 0 0 (TIA holds data)

0 X 0 0 0 0 X 0 LINE PAIR 1 (contains write)
0 X 0 0 0 0 X 0 (TIA holds data)

0 0 X X X X 0 0 LINE PAIR 2 (contains write)
0 0 X X X X 0 0 (TIA holds data)

0 0 0 0 0 0 0 0 LINE PAIR 3 (contains write (all zeros)
0 0 0 0 0 0 0 0 (TIA holds data)

VDEL

0 0 0 0 0 0 0 0 LINE PAIR 0 (contains write (all zeros)

0 0 0 0 0 0 0 0 (TIA returns delayed data from last scanline)
0 X 0 0 0 0 X 0 LINE PAIR 1 (contains write)

0 X 0 0 0 0 X 0 (TIA returns delayed data from last scanline)
0 0 X X X X 0 0 LINE PAIR 2 (contains write)

0 0 X X X X 0 0 (TIA returns delayed data from last scanline)
0 0 0 0 0 0 0 0 LINE PAIR 3 (contains write (all zeros)

0 0 0 0 0 0 0 0 (TIA returns delayed data from last scanline)
0 0 0 0 0 0 0 0

The strange thing is, the only way this would work would be if you alternated your kernel to write on odd lines without VDEL and even lines with VDEL. TIA holds whatever you last store to it and automatically redraws the sprite, right? So I'm not sure how much you gain with VDEL when you could very well just update the graphics whenever you needed the sprite's top position and just not update the graphics the next line rather than using VDEL which forces you to refresh after it operates.

In an ideal world, your kernel could remain the same, with writes only on the odd scanlines, and just by toggling VDEL you could bump the sprites down a scanline.


Glenn Saunders - Producer - Cyberpunks Entertainment Personal homepage: http://www.geocities.com/Hollywood/1698 Cyberpunks Entertainment: http://cyberpunks.uni.cc


-- Archives (includes files) at http://www.biglist.com/lists/stella/archives/ Unsub & more at http://www.biglist.com/lists/stella/

Current Thread