It is currently Wed Sep 19, 2018 5:06 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Sprite 0 Hit Question
PostPosted: Sat Apr 21, 2018 2:25 pm 
Offline

Joined: Tue Apr 17, 2018 3:40 am
Posts: 14
I have a question with how sprite 0 hits work in. My emulator currently fails with error code #6 on blargg's test 05.left_clip. Looking at the readme, it says that the flag should not be set:
Code:
lda   #upper_left_tile
sta   sprite_tile
lda   #7
sta   sprite_x
lda   #6;) Should miss; sprite pixel covered by left-edge clip
ldx   #$18
jsr   sprite_should_miss

But looking at the code (and my emulator's logs), isn't the sprite x set to 7? And doesn't that mean that if there is an opaque pixel after the first pixel, the flag should be set?
Am I misunderstanding something?


Top
 Profile  
 
PostPosted: Sat Apr 21, 2018 2:30 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20562
Location: NE Indiana, USA (NTSC)
The window function can disable sprites, background, or both at x=0 through 7. When background is disabled in this region, the pixel pipeline treats those background pixels as transparent. When sprites are disabled in this region, the pixel pipeline treats those sprite pixels as transparent. And transparent pixels never cause a sprite 0 hit.


Top
 Profile  
 
PostPosted: Sat Apr 21, 2018 2:45 pm 
Offline

Joined: Tue Apr 17, 2018 3:40 am
Posts: 14
Thanks, that clarified my doubt. My logic was correct but I got the color incorrectly, so that gave me false positives and negatives.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group