It is currently Fri Dec 14, 2018 5:59 am

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: Wed Sep 19, 2018 9:48 am 
Offline

Joined: Fri Feb 24, 2012 12:09 pm
Posts: 732
morskoyzmey wrote:
My circuitry.

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

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)

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?!
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 (!)


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

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 7015
Location: Canada
The light reading happens constantly during the frame (a few times per scanline). Why do you think it reads only during vblank? It's doing the opposite. It is interrupted very briefly by NMI during vblank, though it will resume reading before vblank is finished too.


Top
 Profile  
 
 Post subject: Re: NES zapper + LCD
PostPosted: Wed Sep 19, 2018 10:13 am 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7821
Location: Seattle
The schematic of this clone seems to be:

Code:
  +5V      +5V
   |        |      +--- to console
  100k     1M      |
   |        |   | /
   +----C---+---|<
   |            | ↘
 photo             |
 diode             |
   |               |
  gnd             gnd

  +5V---100k---gnd

  +5V---trigger--+--- to console
  gnd----3.9k----+               


edit: I keep on being wishy-washy about the polarity of things. But assuming there's still a pull-up in the console inputs, the transistor has to pull voltage down, not up


Last edited by lidnariq on Thu Sep 20, 2018 1:31 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: NES zapper + LCD
PostPosted: Wed Sep 19, 2018 10:23 am 
Offline

Joined: Fri Feb 24, 2012 12:09 pm
Posts: 732
rainwarrior wrote:
The light reading happens constantly during the frame (a few times per scanline). Why do you think it reads only during vblank?

Oops, sorry, I've misread the code. There is a wait-for-next-frame loop without zapper reading... but that part of code executes only once when (if) it has sensed light.


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

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 7015
Location: Canada
Yes, after detecting any light signal it'll wait until the next frame before resuming. This was partly to keep the audio indicator at 60Hz, but it's also more or less how Duck Hunt and other zapper games work, running a detection loop until there's a positive result and then stopping.


Top
 Profile  
 
 Post subject: Re: NES zapper + LCD
PostPosted: Wed Sep 19, 2018 2:48 pm 
Offline
User avatar

Joined: Sat Sep 15, 2018 2:59 pm
Posts: 13
Sorry, that without a modification Zapper won't work.
But maybe someone will go for it.
BTW I just tested a new game mod!

https://www.youtube.com/watch?v=gbiPH2dXYZ4


Top
 Profile  
 
 Post subject: Re: NES zapper + LCD
PostPosted: Wed Sep 19, 2018 4:13 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 11012
Location: Rio de Janeiro - Brazil
There was a project recently that took care of the 2 mods, the game and the Zapper: https://www.kickstarter.com/projects/me ... rn-mallard

The campaign failed though, since the need for different mod boards for each game made things prohibitively expensive. A Zapper mod to be used in conjunction with Flash carts would probably be much more successful, but you can't propose ROM distribution on Kickstarter...


Top
 Profile  
 
 Post subject: Re: NES zapper + LCD
PostPosted: Wed Sep 19, 2018 4:14 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20870
Location: NE Indiana, USA (NTSC)
Besides, Wii have already seen perhaps the most robust way to adapt the Zapper to modern TV. It's a single-board computer that receives coordinates from a Bluetooth pointing device and relays them to an MCU, which crops the composite signal around the desired location and feeds it back to the Control Deck. This requires zero modification to the Control Deck or Game Paks.


Top
 Profile  
 
 Post subject: Re: NES zapper + LCD
PostPosted: Wed Sep 19, 2018 4:27 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 11012
Location: Rio de Janeiro - Brazil
I agree. It's a little convoluted, but if someone could find a way to pack that in the form of a Zapper that connects to the controller port and to the composite output, that might just work as a product.


Top
 Profile  
 
 Post subject: Re: NES zapper + LCD
PostPosted: Wed Sep 19, 2018 4:35 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 7015
Location: Canada
tokumaru wrote:
I agree. It's a little convoluted, but if someone could find a way to pack that in the form of a Zapper that connects to the controller port and to the composite output, that might just work as a product.
There is a website to buy it, but it's currently sold out. (Sounds like it may take a few months to resupply.)
https://www.lightgunverter.com/


Top
 Profile  
 
 Post subject: Re: NES zapper + LCD
PostPosted: Fri Sep 21, 2018 12:10 pm 
Offline

Joined: Fri Jan 01, 2016 9:11 am
Posts: 3
Seems like it can work with an unmodified zapper?
http://retrorgb.com/neslcdmod-beta.html


Top
 Profile  
 
 Post subject: Re: NES zapper + LCD
PostPosted: Fri Sep 21, 2018 12:53 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 9:28 pm
Posts: 3725
Location: Mountain View, CA
grynold wrote:
Seems like it can work with an unmodified zapper?
http://retrorgb.com/neslcdmod-beta.html

If these guys (specifically the "NESLCDMOD" folks) are in the United States, then they're going to get DMCA notices, sued, or both. I simply can't tell where they reside, country-wise. While the name "Alexey" implies eastern Europe or Russia, it's not a valid assumption.

http://retrorgb.com/neslcdmod-beta.html explains that the way this works is by patching/modifying the actual 6502 code in each game individually, and that the ROMs are available at http://neslcdmod.com/roms/ . If you visit that site, and use the Download links, you'll get complete (but modified) ROMs of copyright Nintendo games (specifically Duck Hunt; Wild Gunman requires you to ask for it via Email). What they should be providing is binary patches for ROMs (ex. IPS patches), and a list of MD5s + filenames of the ROMs each IPS patch can apply to (because there are tons of dumps of carts that have Duck Hunt on it -- all vary/are different).

Dunno what it's going to take for people to learn this... :/


Top
 Profile  
 
 Post subject: Re: NES zapper + LCD
PostPosted: Fri Sep 21, 2018 1:32 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 7015
Location: Canada
Didn't realize I could just download the beta, so I did give it a try. (Doesn't do anything unexpected for me. All zapper shots register as "offscreen".)

I like the auto delay option, when I had experimented with this myself I had added a hard coded delay, but never got around to UI concerns because I discovered quickly after that my zapper just can't see the TV. ;P

Interestingly, while playing with the backlight settings (wondering if I could get some PWM effect) I discovered the signals from the IR remote control get picked up by the zapper quite well. Ha ha.

One more thing on my list of devices that the zapper can't see: Wii U screen.

grynold wrote:
Seems like it can work with an unmodified zapper?
http://retrorgb.com/neslcdmod-beta.html

It might work with some TVs, though it didn't look like it was reliable enough for him to be playable... probably can't solve that issue with software though, unfortunately.


Top
 Profile  
 
 Post subject: Re: NES zapper + LCD
PostPosted: Fri Sep 21, 2018 1:45 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 7015
Location: Canada
Edit: this post appears to have been orphaned by a deleted post immediately above that suggested alternatives to IPS.

Moving data around is not a problem that this particular patch has.


Last edited by rainwarrior on Fri Sep 21, 2018 3:26 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: NES zapper + LCD
PostPosted: Fri Sep 21, 2018 2:51 pm 
Offline

Joined: Sun Jun 12, 2011 12:06 pm
Posts: 447
Location: Poland
Maybe instead of modyfing games, just apply code-injection that triggers after reading $4017?


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