[stella] VDEL problems again

Subject: [stella] VDEL problems again
From: Glenn Saunders <cybpunks2@xxxxxxxxxxxxx>
Date: Tue, 19 Mar 2002 00:15:26 -0800

After several months I spent a bit of time going over the DD code again and I have to admit I'm a little rusty.

I still can't understand how to properly implement VDEL. (Here we go again).

I really am trying, though.

I took a look at the Combat disassembly and I aligned my sprite writes similarly:

GRP0 is written right after the WSYNC on the first of the two line-pairs. GRP1 written close to the end of the 2nd line-pair. I'm assuming that the GRP1 write timing is not critical, just GRP0.

I'm also assuming that regardless of the desired Y position of GRP0 or GRP1 that I can leave it like this, or am I going to have to have a separate kernel where GRP1 is written first, and then GRP0? I didn't see that sort of thing in Combat.

Now, as long as I set both sprites to the same Y position, enable VDEL for P0 and disable VDEL for P1, the cars line up properly even though I'm writing on alternate lines.

However, when I use the code below to automate the settings for VDEL, I can no longer get the cars to align at 1-scanline accuracy:

        LDA P0_YFullres         ;vertical delay becomes
        EOR #1
        STA VDELP0      ;least significant bit

        LDA P1_YFullres         ;of player position
        EOR #1          ;(thoughtfully placed in bit 0
        STA VDELP1      ;by Stella's designers)

Even if I experiment with hardcoded values I can't seem to figure out how this should be working.

Anybody know what I'm doing wrong?

I can't wait to get this behind me so I can try to wedge the missiles in and then start working on animation routines.

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

Attachment: dd16.zip
Description: Zip archive

Current Thread