NES zapper + LCD

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

User avatar
Punch
Posts: 362
Joined: Sat Feb 16, 2013 11:52 am

Re: NES zapper + LCD

Post by Punch » Sun Jan 05, 2020 3:57 pm

It's a shame that LCD support implies variable lag, I actually changed my mind and I honestly think it's not good enough. I really wish you could have a gun usable on the NES that accepted any screen but I guess it's not to be.
This is a block of text that can be added to posts you make. There is a 255 character limit.

User avatar
rainwarrior
Posts: 7812
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: NES zapper + LCD

Post by rainwarrior » Sun Jan 05, 2020 7:06 pm

Punch wrote:
Sun Jan 05, 2020 3:57 pm
It's a shame that LCD support implies variable lag, I actually changed my mind and I honestly think it's not good enough. I really wish you could have a gun usable on the NES that accepted any screen but I guess it's not to be.
You can automatically detect the lag by having the user point at the screen and fire. This works somewhat, though the way a lot of TVs convert the composite 240p 60fps into 480i 30fps ends up grouping frames in pairs which throws some annoying jitter into the detection effort. HD output mods or a suitable upscaler can get rid of that problem, at least.

An additional manual setting would be helpful, but best would be some sort of interactive calibration where you could test it easily to find the optimal delay setting for your system. That might be out of scope for a small Duck Hunt patch, but could be worthwhile in a homebrew.

Otherwise, aside from just determining lag time, you probably want to give extra frames of off and on, to compensate for the slower rise times as well as the jitter. The flashing effect of the games become a bit more severe as you do this, but it doesn't look too bad in reasonable cases, I think.

calima
Posts: 1125
Joined: Tue Oct 06, 2015 10:16 am

Re: NES zapper + LCD

Post by calima » Mon Jan 06, 2020 2:03 am

MegaCat sent me one for future dev, but I don't have a setup to test it currently. The gun has a three-step lighting level switch for different rooms and TVs, and the manual says the Duck Hunt patch works like the lcdmod patches, aka you manually tune the delay on the title and pause screens.

I was thinking of the user doing the calibration like Rainwarrior says, shoot at the screen and when the gun sees white that's the TV lag. Add 1 for jitter, and subtract 1 for the "show the white squares but don't poll yet" frames. The latter would be required to avoid accidental detection of bright areas in the still-shown real game picture.

calima
Posts: 1125
Joined: Tue Oct 06, 2015 10:16 am

Re: NES zapper + LCD

Post by calima » Tue Mar 17, 2020 11:47 am

Sample ROM with the calibration screens I imagined would work with the Hyperkin zapper. Unfortunately they showed the light sensor is not very good (shows lit if you shake the gun, or if too close to the TV even though pointing at black). The shooting part also showed some inaccuracies both ways (some missed shots registered as hits, hits as misses), while my lcdmod-patched Duck Hunt seemed stable.

The trigger in it has two transitions from 1 to 0, once when pulling in and once when pulling out. I read the orig zapper had only one transition, when pulling in, but that some other clones also have two.
Attachments
hyperzapper.nes.gz
(5.54 KiB) Downloaded 29 times

User avatar
dougeff
Posts: 2680
Joined: Fri May 08, 2015 7:17 pm
Location: DIGDUG
Contact:

Re: NES zapper + LCD

Post by dougeff » Tue Mar 17, 2020 12:15 pm

I tried to make this work with Falling Tiles, but it was just so damn inconsistent. I tried every possible combination of lag frames, and couldn't get it to work for more than a few shots. It was no fun. And I was, maybe, 2 feet away from the screen. All bets off at 5-6 feet.

Possibly, I just needed to turn the screen brightness up, or use a bigger screen TV. IDK.
nesdoug.com -- blog/tutorial on programming for the NES

knight0fdragon
Posts: 25
Joined: Wed Sep 25, 2019 9:11 am

Re: NES zapper + LCD

Post by knight0fdragon » Tue Mar 17, 2020 12:41 pm

Many of us have tried using the NES zapper, to no avail.

The problem in today market is that TVs are too different and there are way to many variables we need to consider.

At the bare minimum, a new style zapper has to be created. The hyperkin light gun I believe removes the 15hz light filter (or at the very least, increased the range of acceptable frequencies), which is why it is able to detect light. The problem of course is the lag. Different sets have different lag times based on different conditions and experiences, making it really hard to come up with a way to universally patch it.


A good solution would be the camera based light guns that tries to calculate the position with placing white blocks in the corners of your tv, similar to how the wii remote works. This requires patching the current games (But the previous method would also need patching because of the lag). The camera based light guns could also remove the flicker effect, since you are sending the position on the screen.

Probably the best solution which would be extremely expensive is to capture the video output before it hits your tv, and then use a camera approach to overlay over the existing tv screen. you can then determine if you are looking at white or black, and no patch to a game would be necessary.

You could probably get away with a cheaper camera though, since you just need to figure out how the plane your screen lies in 3d space, so it may not be that expensive.

Post Reply