Jump to content

vertical sprite positioning issue at leftmost screen positions


2 replies to this topic

#1  

    Space Invader

  • 20 posts
  • Joined: 27-July 10

Posted Wed Jul 28, 2010 4:35 PM

Hello,

I'm desperate, I attached a stripped-down 2-scanline kernal, that shows a
phenomenon I don't understand.

Here is a little run-down, of what the kernal does:

- In the first scanline the playfield gets drawn as well as sprite GRP1 (only
to trigger GRP0, see below).
- In the second scanline the playfield gets disabled and Sprite GRP0 gets
drawn.
- In order to position Sprite GRP0 vertically accurate I use the VDELP0
register.

By and large this works fairly well, except for the leftmost side of the
screen. The attached kernal shows a sprite at a neuralgic position. The left
side of the sprite is messed up, whereas the right side gets drawn correctly.

Can anybody explain to me, why accurate vertical positioning at the leftmost
side of the screen does not work? Or am I doing something wrong?

kind regards, Jan

Attached Thumbnails

  • Attached Image: Screenshot.gif

Attached Files



#2  

    Star Raider

  • 52 posts
  • Joined: 10-June 10
  • Location:Seattle, WA

Posted Wed Jul 28, 2010 7:18 PM

Looks to me like you are taking too long to store into GRP0:

   sta   WSYNC          
   stx   PF2			;3
   lda   #0				;2
   cpy   heroY			;3
   bcs   .skipDrawHero		;2
   lda   (heroSpritePtr,x)	;6
   beq   .skipDrawHero		;2
   inc   heroSpritePtr		;5
.skipDrawHero		
   sta   GRP0			;3 - 26 total (should be less than 68/3)

Try moving a little work above the WSYNC.

#3  

    Space Invader

  • 20 posts
  • Joined: 27-July 10

Posted Fri Jul 30, 2010 7:42 AM

Thank you very much!

I didn't know about that "GRP0 68/3" timing thing.

Edited by Jan Hermanns, Fri Jul 30, 2010 7:42 AM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users