Really cool!morskoyzmey wrote:Good news everyone!
I'm working on light gun games modification (I call it lcdmod), which brings back our childhood (for those who lost their CRTs years ago). Duck Hunt is at release candidate state. Wild Gunman is underway.
Cheers!
http://neslcdmod.com/
NES zapper + LCD
Moderator: Moderators
Re: NES zapper + LCD
- samophlange
- Posts: 50
- Joined: Sun Apr 08, 2018 11:45 pm
- Location: Southern California
Re: NES zapper + LCD
How did you make this work without requiring hardware modification?morskoyzmey wrote:Good news everyone!
I'm working on light gun games modification (I call it lcdmod), which brings back our childhood (for those who lost their CRTs years ago). Duck Hunt is at release candidate state. Wild Gunman is underway.
Cheers!
http://neslcdmod.com/
- rainwarrior
- Posts: 8734
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: NES zapper + LCD
My wild guess is that the Dendy version of the light gun doesn't filter out LCD light like the NES Zapper does?
There was this solution to mod the zapper a while ago, but I don't think it took off because of the high cost (was also tied to a patch board solution for the games; I would have gladly bought the zapper mod alone).
There was this solution to mod the zapper a while ago, but I don't think it took off because of the high cost (was also tied to a patch board solution for the games; I would have gladly bought the zapper mod alone).
- morskoyzmey
- Posts: 13
- Joined: Sat Sep 15, 2018 2:59 pm
Re: NES zapper + LCD
Hi, didn't notice, that there is a discussion on a second page.samophlange wrote:How did you make this work without requiring hardware modification?
The algorithm of current version looks like this:
On menu screen you're shooting with max delay (to cover almost all devices).
It means, that black screen, which is appearing after you pushed the trigger, staying on the screen not for one frame, but for Delay+1 frame.
So it gives to your TV enough time to show that black screen, while the game logic is still in dark screen loop.
After that, it is time for the white screen. In game logic there is counter, that (obviously) counts how much frames the white screen is on, but light is not registered yet. And this count is our Delay! Which is necessary to make the game work.
The in-game algorithm is on the image. Hope it is self explainable. Although I know it is not. But sorry, it is hard for me to write about complex things in English.
- rainwarrior
- Posts: 8734
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: NES zapper + LCD
morskoyzmey: I think the question is not about the software delay, but how the zapper works without hardware modification.
The Nintendo NES zapper cannot detect light from most LCD TVs. It requires the light source to turn on and off at 15kHz like a CRT's scanlines.
In your videos it looks like some different kind of light gun, not made by Nintendo?
The Nintendo NES zapper cannot detect light from most LCD TVs. It requires the light source to turn on and off at 15kHz like a CRT's scanlines.
In your videos it looks like some different kind of light gun, not made by Nintendo?
Re: NES zapper + LCD
Or does the LED backlight PWM run at close enough to 15.7 kHz?
- rainwarrior
- Posts: 8734
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: NES zapper + LCD
I think they're usually an order of magnitude or two lower than that? Not entirely certain though.tepples wrote:Or does the LED backlight PWM run at close enough to 15.7 kHz?
- morskoyzmey
- Posts: 13
- Joined: Sat Sep 15, 2018 2:59 pm
Re: NES zapper + LCD
Is it confirmed info? Did someone tests with custom testing ROM?The Nintendo NES zapper cannot detect light from most LCD TVs.
Never thought that light gun is something more than just a photodiode. Why it needs some specific frequencies from light source?
My light gun is a sort of chinese thing from the box with famiclone. Am I just lucky?
Anyway I have majority of positive reports (not sure for now that there are some for NES). I hope Zapper can be used also.
Re: NES zapper + LCD
The authentic Zapper's photodiode feeds into a demodulator chip that rejects light from a light bulb while detecting light at the horizontal scan frequency of SDTV. Clones may lack this.morskoyzmey wrote:Never thought that light gun is something more than just a photodiode. Why it needs some specific frequencies from light source?
Re: NES zapper + LCD
There is also a datasheet for "Sharp IR3T24/IR3T24N/IR3T26/IR3T26N", that might resemble the IR3T07A a bit closer than the GL3274 datasheet mentioned earlier. But they are somewhat similar, and both filtering 40kHz, and the zapper might filter 16kHz instead...
On the other hand, several people have confirmed that it does also work with a single light "off-on" transition, and doesn't strictly require "off-on-off-on-off-on" signal pulsed at 16kHz. Though I guess the single transistion might work only if it's bright enough, and repeated pulses might work even if they aren't that bright?
Having light transistions is important as the hardware should try to filter out constant ambient light. Ie. sunlight should be ignored because it doesn't flicker. A 60Hz light bulb would flimmer at 120Hz (glow on +/- voltage), but that does't have sharp transitions like a square wave, so the zapper might ignore it for that reason. Backlight PWM might work in theory, but might vary from display to display (depending on if there's PWM at all, on it's frequency, and on whether it's producing sharp or smoothened transitions).
And a flicker-free TFT screen won't be visible to the zapper if it outputs a series of white frames (I guess some people might not be aware of that when testing zappers).
Though Duck Hunt does output a black frame, and then a frame with white rectangle, so the zapper should see one transition in that case (though it might fail if the brightness isn't enough, or if the TFT is resampling/delaying the picture output).
If the zapper really needs multiple pulses, and if should also accept something like 8kHz or 64kHz, one idea would be to use black/white striped sprites instead of the white rectangle. And it might be best to combine that with gray background (and a fully gray picture in previous frame).
* If it's horizontally striped (each second scanline white, each other scanline black) then zapper should see 8kHz.
* If it's vertically striped (left half white, right half black, and the light sensor aimed at the middle), then the composite signal should carry nice 16kHz spikes - but most TFT's are having higher vertical resolution, so it would become 64kHz if each composite line occupies four TFT lines.
The idea with gray background is that the zapper would see, say, a 12x12 pixel window (including gray pixels from previous frame). So brightness goes up when drawing new white pixels, and goes back down when drawing black pixels (on the formerly gray background). Doing the same on black background would cause the brightness to go up-and-up-and-up on white pixels (but stay unchanged when drawing black pixels on black background).
If that ideas don't work out...
Anybody ever thought of placing a camera in front of the TFT screen, and then forwarding the camera output to a CRT screen? No, I know that that won't work well, forget about it, please!
On the other hand, several people have confirmed that it does also work with a single light "off-on" transition, and doesn't strictly require "off-on-off-on-off-on" signal pulsed at 16kHz. Though I guess the single transistion might work only if it's bright enough, and repeated pulses might work even if they aren't that bright?
Having light transistions is important as the hardware should try to filter out constant ambient light. Ie. sunlight should be ignored because it doesn't flicker. A 60Hz light bulb would flimmer at 120Hz (glow on +/- voltage), but that does't have sharp transitions like a square wave, so the zapper might ignore it for that reason. Backlight PWM might work in theory, but might vary from display to display (depending on if there's PWM at all, on it's frequency, and on whether it's producing sharp or smoothened transitions).
And a flicker-free TFT screen won't be visible to the zapper if it outputs a series of white frames (I guess some people might not be aware of that when testing zappers).
Though Duck Hunt does output a black frame, and then a frame with white rectangle, so the zapper should see one transition in that case (though it might fail if the brightness isn't enough, or if the TFT is resampling/delaying the picture output).
If the zapper really needs multiple pulses, and if should also accept something like 8kHz or 64kHz, one idea would be to use black/white striped sprites instead of the white rectangle. And it might be best to combine that with gray background (and a fully gray picture in previous frame).
* If it's horizontally striped (each second scanline white, each other scanline black) then zapper should see 8kHz.
* If it's vertically striped (left half white, right half black, and the light sensor aimed at the middle), then the composite signal should carry nice 16kHz spikes - but most TFT's are having higher vertical resolution, so it would become 64kHz if each composite line occupies four TFT lines.
The idea with gray background is that the zapper would see, say, a 12x12 pixel window (including gray pixels from previous frame). So brightness goes up when drawing new white pixels, and goes back down when drawing black pixels (on the formerly gray background). Doing the same on black background would cause the brightness to go up-and-up-and-up on white pixels (but stay unchanged when drawing black pixels on black background).
If that ideas don't work out...
Anybody ever thought of placing a camera in front of the TFT screen, and then forwarding the camera output to a CRT screen? No, I know that that won't work well, forget about it, please!
- rainwarrior
- Posts: 8734
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: NES zapper + LCD
Yes, I linked some test ROMs on the first page of this thread that just put a light square on the screen and constantly check for light:morskoyzmey wrote:Did someone tests with custom testing ROM?
viewtopic.php?f=9&t=13021
Nintendo put the filter there with the hope it would ignore most things except a CRT.
I could get it to ring with an LED flashlight being switched on. I think at one point I had a CFL lightbulb it could pick up.nocash wrote:several people have confirmed that it does also work with a single light "off-on" transition, and doesn't strictly require "off-on-off-on-off-on" signal pulsed at 16kHz. Though I guess the single transistion might work only if it's bright enough, and repeated pulses might work even if they aren't that bright?
So yes, I believe a sharp enough transition is good enough but only if you're detecting at the time it switches on. A CRT is giving you continual and very bright pulses, though.
My TV definitely can't make a sharp enough transition, though. A black to white frame is not enough here, it has to go from one to the other fast.
Re: NES zapper + LCD
Hmmm, yeah, CRT pixels might be very bright for a short moment, and human eyes might just don't realize that because it happening too fast.rainwarrior wrote:So yes, I believe a sharp enough transition is good enough but only if you're detecting at the time it switches on. A CRT is giving you continual and very bright pulses, though.
Does somebody have scope pictures showing the voltage at the photodiode, and using CRTs and TFTs as light source?
In your tests, did you try to provoke extrme transistions, and still got no signal at all? Like blinking black/screen screens. Or gray screen, then black/write scanlines in next frame?
- rainwarrior
- Posts: 8734
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: NES zapper + LCD
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)nocash wrote:In your tests, did you try to provoke extrme transistions, and still got no signal at all? Like blinking black/screen screens. Or gray screen, then black/write scanlines in next frame?
Results were the same as what I said before, though. Can't get anything out of my LCD TV. Also can't get anything out of my LCD computer monitor. Can get a signal from a CFL lightbulb (contact range). Can get a blip from turning on an LED flashlight (contact range).
To be honest though I wish I had been wrong. Would have been nice if it worked.
- morskoyzmey
- Posts: 13
- Joined: Sat Sep 15, 2018 2:59 pm
-
- Posts: 1565
- Joined: Tue Feb 07, 2017 2:03 am
Re: NES zapper + LCD
yeah that is not "right" a real zapper looks like this https://asreimer.files.wordpress.com/20 ... 863_sm.jpg