Okay, that's simplier than the official zapper. At least it does confirm that the TFT does emit enough light to trigger photo diodes (though it may have troubles to pass through the IR3T07A chip on official zappers). But I guess there might be a bunch of "zapper-compatible" NES guns with similar simple circuitry, so your software patch might still work for a lot of people.morskoyzmey wrote:My circuitry.
Might be also worth to share your patch with somebody having an official zapper, maybe it does work fine after all. Is there anybody here having a zapper + flashcart + one or more TFT screens?
Just checked what the code is doing... it flips black/white when pulling the trigger... and the light reading seems to continue regardless of the screen color (which is good)... but the light reading itself does take place only during vblank?!rainwarrior wrote:I was sure I had tested it, but there wasn't a specific test for this in the ROM set I linked above, so I added one just now and retested it to be sure. (see zapper_flip.nes)
I think that can't work, neither on CRT nor TFT. There's no light during vblank on CRTs (except some afterglow). A TFT might have light during vblank (as far as I know all pixels will "afterglow" until they get changed in next frame). In both cases, the afterglow doesn't include light transitions, so the zapper won't see anything.
For CRTs, one should read the zapper signal at least every handful of scanlines during rendering.
For TFTs, to be sure that you don't miss distorted signals or delayed frames: Best read the zapper every 3-6 opcodes, and be sure to keep reading during vblank (!) and keep reading during next couple of frames (!)