charcole / LCDZapper

Device for making light gun games playable on LCD TVs
Other
155 stars 18 forks source link

Question: Understanding light detection #24

Open abishur opened 2 years ago

abishur commented 2 years ago

Hi I was trying to better understand how the NES handles light detection.

When you pull the trigger on the zapper, electrically that's a 1. The NES then provides 1 frame of a black screen and looks to make sure the zapper detects that (D3 = 1) during the vertical blanking period (hence the need to have your RCA cable plugged in?) After vertical blanking it will display a white square and check that the zapper detects that (D3 = 0)

So to make this work you use the v sync find when you need to hold D3 high but how do you actually decide when to set D3 low?