Re: [stella] RE: Illegal opcodes...another question

Subject: Re: [stella] RE: Illegal opcodes...another question
From: "Eckhard Stolberg" <Eckhard_Stolberg@xxxxxx>
Date: Tue, 14 Jan 2003 16:14:18 +0100
Hello Denis,

> BTW, how does VDELPx work? From what I understood from the manual it
> doesn't give you players with the resolution of a 1LK but you can move
> them 1 scanline at a time. Is that right?

It has been discussed a couple of times on this list already,
but anyway ...

There are actually two graphics registers per player, GRP0-A,
GRP0-B, GRP1-A and GRP1-B. The VDELPx register selects which
of the two graphics registers gets used for output for this
player. The tricky part is how to get data into the "B"

If you do "STA GRP0", then the contents of the accumulator will
be copied into GRP0-A. At the same the contents of GRP1-A will
be copied into GRP1-B. The other register works just like this,
only the other way around. If you do "STA GRP1", the contents
of the accumulator will be copied into GRP1-A. At the same time
the contents of GRP0-A will be copied to GRP0-B.

This is meant to allow you single line positioning for double
line resolution players. If you always write to GRP0 at the start
of the first scanline and to GRP1 at the start the second, you
will get double line resolution with the players always being
positioned one scanline apart. But by turning on VDEL for one of
the players at the start of the frame, you are able to have
both players being updated at the same scanline and are
therefore able to position them with single line precission.

This table might make things a bit clearer.

Line Write     GRP0-A GRP0-B GRP1-A GRP1-B
1    GRP0=01    01     0b     1a     1a
2    GRP1=02    01     01     02     1a
3    GRP0=03    03     01     02     02
4    GRP1=04    03     03     04     02

As you can see, you can position both players in either scanline
by carefully chosing which player need to have it's VDEL turned
on and in which double scanline the drawing has to start.

> The 6-digit display is a 1LK, right? Is that only possible because they
> are loading GRPx twice during a scanline?

The trick in the 6-digit display is that they are using both,
the A and the B register, for preloading graphics. That way
you only need to do three updates during the actual display,
which can be donewith the three processor registers. For copying
the last data from the A to the B register any write would do,
so there is no problem with having to read the graphics data at
the right time anymore.

Ciao, Eckhard Stolberg

Archives (includes files) at
Unsub & more at

Current Thread