Re: [stella] Visual questions

Subject: Re: [stella] Visual questions
From: Eckhard Stolberg <Eckhard_Stolberg@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 25 Jul 2000 21:45:53 +0200
At 11:03 25.07.2000 -0700, you wrote:

>Because of the calculation times for horizontal positioning, and I'm 
>assuming the need for other housekeeping on the scanline like reading 
>paddles, most games update only one sprite per scanline (in the old days).

It's vertical positioning. You have to check if you have to display a
player in this scanline and which line of graphics you would have to write
out for it. If you want to allow your players to move over the complete
scanline, you have only the vertical blanking period to update the graphics
registers for them. This might not be enough time to do it for two players.
Therefore alternating the players on two scanlines might be a solution.

>So if you have two sprites, you really are doing writes to at least one 
>player on each line, but alternating or interleaving.

You are writing to exactly one player in each scanline. Even if one player
isn't supposed to be displayed you have to write $00 into it's graphics
register in every other scanline for VDEL to work.

>Without VDEL, this would have the effect of having not only two sprites 
>that have to have 2-pixel-high pixels, but not being able to align them on 
>the same scanline (the line pairs for each sprite would be naturally offset 
>by one scanline).

Correct.

>So I'm thinking that you'd have to position the second player up a line 
>pair and enable VDEL on it to bump it down to line up with the first player.

This is one of the four possible cases. For the other three you can position
both players for the same pair of scanlines and just change the state of
the VDEL registers accordingly.

>Can anyone point me to the commented combat source?

I think it's at Nick's site. I believe you have a link to it on your
own cyberpunks website.

>This is getting very confusing to the point where I'm not sure how detailed 
>I can get in explaining it...

It's not that complicated. Take a look at the drawing in the stella manual
on page 30. There are actually two graphics registers for each player and
all that VDEL does is to set which one of those gets used for display.

The tricky part is: the writing to a GRPx register not only stores the
graphics data for a player in it's first graphics register it also copies
the graphics data from the first register of the other player into the
second register of the other player.

                      GRP0   GRP0D   GRP1   GRP1D
                      00     00      00     00

write FF to GRP0      FF     00      00     00
write EE to GRP1      FF     FF      EE     00

write DD to GRP0      DD     FF      EE     EE
write CC to GRP1      DD     DD      CC     EE

By setting VDELx to either use GRPx or GRPxD for display, you can move both
players in single scanline steps and align them in the same scanline even
in a double scanline kernel.

That you have two graphics register per player is the trick behind the six
digit score routine BTW. Normally you would only be able to preset the
graphics for the two players and preload the three register in the 6507.
This would only allow you to display five digits, as they are so close
together that you can't reload the processer registers during the score
display.

By using VDEL you can preload four graphics registers and the three processor
registers. To get the data for the last two digits into the delay graphics
register (which are used for display), you can write any data into the 
main graphics registers as this data will not be displayed. Therefore you
can just write the data that you already have in the processor registers
again, which can be done right in time to have the displayed graphics register
changed before the last two digits are to be displayed.


Ciao, Eckhard Stolberg



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

Current Thread