How does sprite 0 hit detection work?
Sprite 0 hit detection is dependent on the contents of the CHR data in the sprite and background. The sprite 0 hit flag in bit 6 of $2002 clears at the end of [or shortly after] VBlank. It remains clear until two conditions are met simultaneously: the scanning beam of the display device has begun drawing [i.e., it has “hit”] sprite #0, and the graphic image in sprite 0 is overlapping with some graphic image in the background. This means that if sprite 0 contains no graphics data [all “0”s], the sprite hit bit of $2002 will not be set. And, if the background underneath sprite 0 contains no graphics data, the sprite hit bit of $2002 will likewise not be set. Sprite 0 hit detection is useful for doing split-screen scrolling. Even Super Mario Bros. uses a sprite 0 hit to scroll the lower portion of the screen [sprite 0 is hidden in the coin image in the status bar at the top of the screen]. To do sprite 0 detection in your demo or game, you have to wait for both bit 6 of $2002 to clear aft