Are there any Zapper demos with public source code that have been tested on hardware?
There's one I wrote, I could dig it up if you're interested.
But all it does is show a white screen and play a tone while the zapper is pointed at the screen, with the scanline being aimed at controlling the pitch. Doesn't use the trigger at all.
More demos covering more peripherals makes the site more useful.
bump:
There isn't much to the
existing document about the Zapper. I'm willing to write test programs to settle the following uncertainties, unless somebody else has already done so:
- Does the target have to be pure white (color $30) as in Nintendulator, or can it be any other non-black color as in FCE Ultra? To which hues is the Zapper's light sensor most sensitive? (The Super NES Super Scope is sensitive only to blue and green light because red phosphors are so slow.)
- TV phosphors that decay more quickly would seem to require a tighter polling loop to pick up the light. About how long, in CPU cycles or in scanlines, does it take for the phosphor to decay to where the Zapper reads no light instead?
- How large does the target have to be for the sensor to pick it up?
- If I hold the trigger button, does the trigger bit ($4017 D4) stay set, or does it automatically clear after a few frames as in FCE Ultra?
The bit will stay set if you pull the trigger only a little bit, when you pull the trigger to it's end it releases the switch.