It is currently Sun Dec 09, 2018 3:44 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 61 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject: Re: NES zapper + LCD
PostPosted: Mon Sep 17, 2018 12:26 am 
Offline

Joined: Fri Jan 01, 2016 9:11 am
Posts: 3
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/


Really cool!


Top
 Profile  
 
 Post subject: Re: NES zapper + LCD
PostPosted: Mon Sep 17, 2018 11:21 am 
Offline
User avatar

Joined: Sun Apr 08, 2018 11:45 pm
Posts: 27
Location: Southern California
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/


How did you make this work without requiring hardware modification?


Top
 Profile  
 
 Post subject: Re: NES zapper + LCD
PostPosted: Mon Sep 17, 2018 11:35 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 7004
Location: Canada
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).


Top
 Profile  
 
 Post subject: Re: NES zapper + LCD
PostPosted: Tue Sep 18, 2018 12:04 pm 
Offline
User avatar

Joined: Sat Sep 15, 2018 2:59 pm
Posts: 13
samophlange wrote:
How did you make this work without requiring hardware modification?


Hi, didn't notice, that there is a discussion on a second page.

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.


Attachments:
2018-09-17_04-23-34.png
2018-09-17_04-23-34.png [ 28.3 KiB | Viewed 2622 times ]
Top
 Profile  
 
 Post subject: Re: NES zapper + LCD
PostPosted: Tue Sep 18, 2018 2:17 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 7004
Location: Canada
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?


Top
 Profile  
 
 Post subject: Re: NES zapper + LCD
PostPosted: Tue Sep 18, 2018 3:06 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20848
Location: NE Indiana, USA (NTSC)
Or does the LED backlight PWM run at close enough to 15.7 kHz?


Top
 Profile  
 
 Post subject: Re: NES zapper + LCD
PostPosted: Tue Sep 18, 2018 3:14 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 7004
Location: Canada
tepples wrote:
Or does the LED backlight PWM run at close enough to 15.7 kHz?

I think they're usually an order of magnitude or two lower than that? Not entirely certain though.


Top
 Profile  
 
 Post subject: Re: NES zapper + LCD
PostPosted: Tue Sep 18, 2018 4:15 pm 
Offline
User avatar

Joined: Sat Sep 15, 2018 2:59 pm
Posts: 13
Quote:
The Nintendo NES zapper cannot detect light from most LCD TVs.

Is it confirmed info? Did someone tests with custom testing ROM?
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.


Top
 Profile  
 
 Post subject: Re: NES zapper + LCD
PostPosted: Tue Sep 18, 2018 4:27 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20848
Location: NE Indiana, USA (NTSC)
morskoyzmey wrote:
Never thought that light gun is something more than just a photodiode. Why it needs some specific frequencies from light source?

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.


Top
 Profile  
 
 Post subject: Re: NES zapper + LCD
PostPosted: Tue Sep 18, 2018 6:40 pm 
Online

Joined: Fri Feb 24, 2012 12:09 pm
Posts: 725
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!


Top
 Profile  
 
 Post subject: Re: NES zapper + LCD
PostPosted: Tue Sep 18, 2018 6:54 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 7004
Location: Canada
morskoyzmey wrote:
Did someone tests with custom testing ROM?

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:
http://forums.nesdev.com/viewtopic.php?f=9&t=13021

Nintendo put the filter there with the hope it would ignore most things except a CRT.

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?

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.

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.


Top
 Profile  
 
 Post subject: Re: NES zapper + LCD
PostPosted: Tue Sep 18, 2018 7:11 pm 
Online

Joined: Fri Feb 24, 2012 12:09 pm
Posts: 725
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.

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.
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?


Top
 Profile  
 
 Post subject: Re: NES zapper + LCD
PostPosted: Tue Sep 18, 2018 7:40 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 7004
Location: Canada
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?

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)

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. :(


Top
 Profile  
 
 Post subject: Re: NES zapper + LCD
PostPosted: Wed Sep 19, 2018 1:05 am 
Offline
User avatar

Joined: Sat Sep 15, 2018 2:59 pm
Posts: 13
My circuitry.
And what I've found!
https://hackaday.io/project/9782-nes-za ... dification


Attachments:
P_20180919_123936.jpg
P_20180919_123936.jpg [ 1.42 MiB | Viewed 2501 times ]
P_20180919_123952.jpg
P_20180919_123952.jpg [ 1.32 MiB | Viewed 2501 times ]
Top
 Profile  
 
 Post subject: Re: NES zapper + LCD
PostPosted: Wed Sep 19, 2018 4:17 am 
Offline

Joined: Tue Feb 07, 2017 2:03 am
Posts: 629
yeah that is not "right" a real zapper looks like this https://asreimer.files.wordpress.com/20 ... 863_sm.jpg


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 61 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group