In my game, I'm only going to have 1 target at any time, so I just want to know whether I found a hit or not.
If I've understood this correctly, it's not enough to just read from the zapper - it needs to be done while the frame is being drawn, because the light sensor turns off after a very short time compared to my eyes, which perceive the white area on the screen as being constantly white.
So how do I do this? One idea was to poll $2002 for vblank to end and then have a loop that polls $2002 for vblank to start and $4017 for a hit, or that polls just $4017 while waiting for nmi... how would you more experienced people do it?
Also, are there other light sources I could use, for debugging and such? What kind of light, specifically, does the zapper detect?
If I've understood this correctly, it's not enough to just read from the zapper - it needs to be done while the frame is being drawn, because the light sensor turns off after a very short time compared to my eyes, which perceive the white area on the screen as being constantly white.
So how do I do this? One idea was to poll $2002 for vblank to end and then have a loop that polls $2002 for vblank to start and $4017 for a hit, or that polls just $4017 while waiting for nmi... how would you more experienced people do it?
Also, are there other light sources I could use, for debugging and such? What kind of light, specifically, does the zapper detect?