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

Subject: Re: RE: [stella] RE: Illegal opcodes...another question
From: Thomas Jentzsch <tjentzsch@xxxxxx>
Date: Tue, 14 Jan 2003 16:12:03 +0100
Dennis wrote
> 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?

That's the result yes. But that doesn't happen automatically.

> I originally thought it would let you load the graphics registers and
> just not display them until the next scanline. I quickly found out that
> wasn't true unless I did something wrong.

VDELPx works quite simple:
If you enable VDELP0 and then write something into GRP0, this is not written into the visible register but into a "shadow" register. The content of the shadow register is copied into the visible register when you write something into GRP1. So the number of delay lines is not hardware dependent but only depends on the coding, if you write to GRP1 e.g. 10 lines later, the new content of GRP0 is also delayed by 10 lines.

I think originally this was planned so that the programmer didn't have to update *both* GRPx registers at the same time. Instead he e.g. could update a VDELed GPR0 anwhere he wanted and just concentrate on the correct timing of GRP1.

But VDEL also offers a lot of extra possibilities which weren't planned when they designed the hardware. :-)

> If VDELPx could give me single line graphic resolution it would really
> save me some headaches with kernel timing. That way I wouldn't be
> restricted to HBLANK for loading player graphics and colors.

In the DD kernel it doesn't give you 1LK graphic *resolution* but 1LK vertical graphic *position*.

The rules for this effect are:
- update one of the two GRPx registers in every scanline
- alternate updating between both GRPx registers
- both GRPx writes *must* happen during HBLANK (more exact: outside the area where the player graphics can be positioned) else you will have some bad looking tearing effects
- fine tune the vertical position with VDELPx

For single line graphic *resolution* you have to update the GRPx register every scanline (Hm, maybe constantly switching VDEL on and off might offer some new possibilities...).

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

While the 6-disgit display routine also needs VDELPx it's used quite different. For details check here:

The ball also has it own register VDELBL. IIRC it delays ENABL until a write to GRP1 happens.


Die vCard -  Ihr neues Kennzeichen  -  bei WEB.DE FreeMail!

Archives (includes files) at
Unsub & more at

Current Thread