Jump to content

Photo

Light Guns and LCDs

Light Gun LCD

56 replies to this topic

#26 Thomas Jentzsch OFFLINE  

Thomas Jentzsch

    Thrust, Jammed, SWOOPS!, Boulder Dash, THREE·S, Star Castle

  • Topic Starter
  • 23,942 posts
  • Always left from right here!
  • Location:Düsseldorf, Germany, Europe, Earth

Posted Thu Feb 9, 2017 4:07 PM

 

Kevin Horton tried to get an nes zapper to work with an LCD but failed\gave up. Maybe you could talk to him? Together you might be able to find a solution?

Do you have a link?

 

If even Kevtris fails, then there is very little hope, I am afraid.



#27 Kosmic Stardust OFFLINE  

Kosmic Stardust

    Princess Rescuer

  • 18,392 posts
  • Location:Milky Way Galaxy

Posted Thu Feb 9, 2017 4:14 PM

You tested with original Light Gun games, correct?

Depending on the sideways direction it either reacts faster or slower than expected by the developers.

all five games that support it including sentenel. Two different crts. I forgot if i had to shoot left or right to compensate as its been a while since i played them. Not hard to adjust my shot but it breaks the realism.

#28 Kosmic Stardust OFFLINE  

Kosmic Stardust

    Princess Rescuer

  • 18,392 posts
  • Location:Milky Way Galaxy

Posted Thu Feb 9, 2017 4:29 PM

 
Kevin Horton tried to get an nes zapper to work with an LCD but failed\gave up. Maybe you could talk to him? Together you might be able to find a solution?

it would require extensive modding. Remove the 15khz filter and increase the gain on the phototransistor by at least a factor of ten. Reprogram any games that use the modified zapper to wait several frames to compensate for lag.

#29 Thomas Jentzsch OFFLINE  

Thomas Jentzsch

    Thrust, Jammed, SWOOPS!, Boulder Dash, THREE·S, Star Castle

  • Topic Starter
  • 23,942 posts
  • Always left from right here!
  • Location:Düsseldorf, Germany, Europe, Earth

Posted Thu Feb 9, 2017 4:40 PM

So there is a filter in there? That sucks!

#30 Kosmic Stardust OFFLINE  

Kosmic Stardust

    Princess Rescuer

  • 18,392 posts
  • Location:Milky Way Galaxy

Posted Thu Feb 9, 2017 5:02 PM

So there is a filter in there? That sucks!

only the nes zapper has the filter. It was to prevent kids from cheating at duck hunt by pointing at a lightbulb. Its also why nes games had to draw boxes instead of having pinpoint accuracy. Homebrew apps like zapper pong can detect y-coordinate though.

#31 alex_79 OFFLINE  

alex_79

    Stargunner

  • 1,195 posts
  • Location:Italy

Posted Thu Feb 9, 2017 5:07 PM

If you set the "latch" for TIA input ports (VBLANK bit 6), then it works in the entire screen:

Attached File  TestLG_1_latchINPT4.bin   2KB   57 downloads

Maybe the test rom isn't polling the sensor often enough and it misses when it triggers?



#32 Shawn OFFLINE  

Shawn

    As Above

  • 18,781 posts
  • So Below

Posted Thu Feb 9, 2017 5:15 PM

Do you have a link?

 

If even Kevtris fails, then there is very little hope, I am afraid.



#33 Kosmic Stardust OFFLINE  

Kosmic Stardust

    Princess Rescuer

  • 18,392 posts
  • Location:Milky Way Galaxy

Posted Thu Feb 9, 2017 11:16 PM

Skip to 32:00 for the zapper discussion. Kevin and Game Tech (I forget his name) really need to edit their videos and get to the point...



#34 Thomas Jentzsch OFFLINE  

Thomas Jentzsch

    Thrust, Jammed, SWOOPS!, Boulder Dash, THREE·S, Star Castle

  • Topic Starter
  • 23,942 posts
  • Always left from right here!
  • Location:Düsseldorf, Germany, Europe, Earth

Posted Fri Feb 10, 2017 2:10 AM

If you set the "latch" for TIA input ports (VBLANK bit 6), then it works in the entire screen:
attachicon.gifTestLG_1_latchINPT4.bin

That fixes it! Thanks a lot!

The original light gun games don't have to use that, because they poll all over the scanline.
 

Maybe the test rom isn't polling the sensor often enough and it misses when it triggers?

During the kernel, it is polled once every scan line. Without the latch enabled, testing only once per scanline is definitely not sufficient. When I poll the light gun a bit earlier on the scanline, then the detection area moves left too. So it seems, that INPT4 reacts to the racing beam and not what the human eye sees.

 

Now its time to check what it sees on an LCD...


Edited by Thomas Jentzsch, Fri Feb 10, 2017 2:48 AM.


#35 Thomas Jentzsch OFFLINE  

Thomas Jentzsch

    Thrust, Jammed, SWOOPS!, Boulder Dash, THREE·S, Star Castle

  • Topic Starter
  • 23,942 posts
  • Always left from right here!
  • Location:Düsseldorf, Germany, Europe, Earth

Posted Fri Feb 10, 2017 3:32 AM

only the nes zapper has the filter.

Are you 100% sure?

 

Why does the Sega not react to constant bright light at all? Neither from an LCD nor from a really bright flashlight? 

 

That sounds like there is a filter, doesn't it? Or what else could it be?



#36 Keatah OFFLINE  

Keatah

    Missile Commander

  • 21,853 posts

Posted Fri Feb 10, 2017 3:55 AM

Wavelength of light? Is the gun actually seeing light from the TV? Some older phototransistors or Cadmium Sulfide (Cds photo cell) sensors may not see LED or Fluorescent light.

 

The wife's older conventional CRT based TV will not auto-adjust brightness with LED room lighting. But it will with incandescent. You can shine a 5 watt LED light into the sensor and nothing happens. But a single AAA cell incandescent flashlight makes go bright as if sensing daylight!



#37 Thomas Jentzsch OFFLINE  

Thomas Jentzsch

    Thrust, Jammed, SWOOPS!, Boulder Dash, THREE·S, Star Castle

  • Topic Starter
  • 23,942 posts
  • Always left from right here!
  • Location:Düsseldorf, Germany, Europe, Earth

Posted Fri Feb 10, 2017 4:55 AM

Wavelength of light? Is the gun actually seeing light from the TV? Some older phototransistors or Cadmium Sulfide (Cds photo cell) sensors may not see LED or Fluorescent light.

I tried with several light sources:

  • incandescent light bulb
  • halogen lamp
  • compact fluorescent lamp
  • LED
  • even a candle light

No reaction at all. So I guess that eliminates the wavelength theory more or less, doesn't it?

 

Then the only thing I can think about left is that the light must be strobing. Any other idea?



#38 Keatah OFFLINE  

Keatah

    Missile Commander

  • 21,853 posts

Posted Fri Feb 10, 2017 11:30 AM

Just a thought, if you use a DSLR or slow-mo camera to reveal what the screen is doing, rendering - would that help? And an LED can be placed at various points in a lightgun circuit to indicate activation, or trigger, or state of something.

 

Put the LED next to the screen when you film it. It's how I test lag from fire button to on-screen activity.

 

While this won't fix any problem it may give an insight as to exactly what's going on.


Edited by Keatah, Fri Feb 10, 2017 11:32 AM.


#39 Thomas Jentzsch OFFLINE  

Thomas Jentzsch

    Thrust, Jammed, SWOOPS!, Boulder Dash, THREE·S, Star Castle

  • Topic Starter
  • 23,942 posts
  • Always left from right here!
  • Location:Düsseldorf, Germany, Europe, Earth

Posted Fri Feb 10, 2017 12:05 PM

We know what the screens are doing, don't we? I cannot modify the light gun myself, but maybe someone else can? Also tests with e.g. a Atari light gun and a LCD would help.

 

By now, I am pretty sure that the sensor reacts only to a very fast change of light. Much faster than a LCD can do, unfortunately.



#40 alex_79 OFFLINE  

alex_79

    Stargunner

  • 1,195 posts
  • Location:Italy

Posted Fri Feb 10, 2017 12:09 PM

I tried with several light sources:

  • incandescent light bulb
  • halogen lamp
  • compact fluorescent lamp
  • LED
  • even a candle light

No reaction at all. So I guess that eliminates the wavelength theory more or less, doesn't it?

 

Then the only thing I can think about left is that the light must be strobing. Any other idea?

Tested my XG-1 lightgun and it seems to behave slightly differently.

 

it does react to:

 

fluorescent lamps

led flashlight

infrared led (of remote controls)

 

it does not react to:

 

"standby" leds on various devices (common red/amber/green leds)

incandescent lamps

halogen lamps

lcd TV (a small Telesystem 22")

 

 

P.S.

here there is a schematic of the sega lightphaser:

http://www.smspower....8b66cbd3e045a7e

I didn't find the schematic for the Atari XG-1, only some pictures of the board:

http://www.the-liber...e-light-gun.htm



#41 Thomas Jentzsch OFFLINE  

Thomas Jentzsch

    Thrust, Jammed, SWOOPS!, Boulder Dash, THREE·S, Star Castle

  • Topic Starter
  • 23,942 posts
  • Always left from right here!
  • Location:Düsseldorf, Germany, Europe, Earth

Posted Fri Feb 10, 2017 12:27 PM

Many thanks, Alex!

 

I didn't think about remote controls. My Sega indeed reacts to them! And I repeated my fluorescent lamp tests, and all but one (Murphy's Law strikes again: the one I tested before) cause a reaction too. No luck with LEDs though.

 

I am not too surprised by the remote control, because the infrared flickers for sure. Also the flash light makes sense. And fluorescent lamps create a power frequency of up to 40 kHz. So the plot thickens.

 

The schematics look quite detailed. Unfortunately I have no clue how to read schematics. icon_smile.gif Can you get some useful information from it?



#42 alex_79 OFFLINE  

alex_79

    Stargunner

  • 1,195 posts
  • Location:Italy

Posted Fri Feb 10, 2017 2:30 PM

Can you get some useful information from it?


Not really. I posted links to the schematics in the hope that someone more tech savvy can shed some light (no pun intended!).



#43 Kosmic Stardust OFFLINE  

Kosmic Stardust

    Princess Rescuer

  • 18,392 posts
  • Location:Milky Way Galaxy

Posted Fri Feb 10, 2017 3:45 PM

What range of light frequencies do the photodiodes in the light guns respond to? I was under the impression that they responded to red phosphors. A photodiode is basically a reverse-biased LED piggybacked on a transistor. The LED creates a very tiny amount of leakage current which the transistor amplifies. You can also build a photo detector circuit with a standard LED (lens must be clear epoxy and not diffused) wired to a bipolar transistor, however a store bought photodiode will have better performance.

During the 80s console era, all CRTs used RGB phosphors, but LEDs of the era were limited to red, yellow, green, and IR. Red LEDs were cheapest and a red photodiode would respond to the red phosphors on the CRT. I'm not sure the sensitivity curve of LEDs but I would assume given it's narrow band emitter band, the sensitivity would be similar. They weren't full spectrum like CDS cells, but had an instant response time, perfect for strobing CRT tubes.

"white" LEDs have a semitranslucent layer of yellow phosphor over a blue emitter. LED flashlights are often steady beam on full brightness and pulsed on low, so you might try the low brightness mode if it has one.

#44 Thomas Jentzsch OFFLINE  

Thomas Jentzsch

    Thrust, Jammed, SWOOPS!, Boulder Dash, THREE·S, Star Castle

  • Topic Starter
  • 23,942 posts
  • Always left from right here!
  • Location:Düsseldorf, Germany, Europe, Earth

Posted Sat Feb 11, 2017 3:23 AM

I did some internet research.

 

Many light guns ignore red light, because the red phosphors decay much slower than green and blue ones. But since the Atari and Sega light guns react to the infrared of remote controls, I suppose your theory is correct.

 

Usually infrared diodes have a wavelength of about 900nm. I found that the NES Zapper uses a silicon based Sharp PD43PI photo diode, which has (according to this document) a peak detection at 900 nm, which is in the infrared area already. The photo diode detects between 400 - 1200 nm, which covers the whole spectrum of visible light (380 nm: violett - 780 nm: red) , but it reacts not very well to green and especially blue.

 

I suppose other light guns of that time used about the same type of photo diodes.

 

But how does that help us with LCDs?

 

 

 

 



#45 Thomas Jentzsch OFFLINE  

Thomas Jentzsch

    Thrust, Jammed, SWOOPS!, Boulder Dash, THREE·S, Star Castle

  • Topic Starter
  • 23,942 posts
  • Always left from right here!
  • Location:Düsseldorf, Germany, Europe, Earth

Posted Wed Feb 15, 2017 3:10 AM

After a few more experiments with my own LCD TV and monitor, I am afraid that this is the end of my experiment regarding LCDs. :sad:

 

IMO there must be some kind of signal filtering happening, which prevents more static light sources from causing the light gun to trigger. Any experiments with other Atari 2600 compatible light guns and other LCDs display are still welcome, but unless someone finds a working combination, for me the LCD story ends right here.

 

Now that I own a light gun, what else could I do with it? Doing an all new game seems not worth it with less and less CRTs around. Are any games really worth hacking them for light gun use (CTR only again)? Remember the targeting is not very precise! 



#46 Kosmic Stardust OFFLINE  

Kosmic Stardust

    Princess Rescuer

  • 18,392 posts
  • Location:Milky Way Galaxy

Posted Wed Feb 15, 2017 3:38 AM

Yeah targeting of the Atari light gun is poor, but Sega Phasor is spot on (in SMS games). Interesting about lightguns detecting IR light. I assumed the diode emission wavelength needed to match hut I guess not.



#47 Keatah OFFLINE  

Keatah

    Missile Commander

  • 21,853 posts

Posted Wed Feb 15, 2017 3:53 AM

No, it's not the end, its just the beginning of Project LightGun.

 

I don't expect anyone to give up on this. Bear with me while I make one more suggestion for the old ones before getting to the good stuff. Could the frequency of the backlight be resonating or interfering with detection or the processing of detection. Not the frequency of the light itself but the PWM supply energizing the LED/bulb.

 

Furthermore, has a thorough side-by-side vetting of how these things work been done with CRT and LCD? I'm talking side-by-side, real-time, two systems, dual trace.. That sort of thing. Surely there is a difference somewhere in the chain that would show on a 'scope and analyzer.

 

---

 

There's always the option to build a smart light gun, one that has a camera and can understand what's going on in the game. All it would need for calibration would be a white screen or something to indicate size. And the object it detects could be assigned to a simple variable-sized grid. It need not know the difference between X and O, just that something is there in arbitrary block number #300 (out 512 detection points arranged in a grid). It could even calibrate itself everytime you fire, all it has to do is see 4 dots in the 4 corners.

 

It could even tap into the RF/Composite signal for sync - not unlike the shift-key mod on the Apple II. This could reduce the amount of intelligence needed onboard the gun.

 

Another advantage of the smart light gun would be compatibility with many systems, including emulators. And the accuracy would be pixel perfect every shot. A premium edition would sport multiple connectors and a USB port for configuration. You could even program in lag and less accuracy, rapid-fire, sound effects, recharge/reload time. There's really a lot possibilities. I even envision different firing patterns to lay down suppressing fire, do a shotgun, a pinpoint laser, or all out BFG9000.

 

If you tell it the screen size and dimensions it could even measure distance to target and adjust accuracy as you see fit. Come with a sighting scope that works.. I could go on but will stop here in order to keep within practicality.

 

I don't see any obstacle here other than time and dedication for making it happen.


Edited by Keatah, Wed Feb 15, 2017 3:57 AM.


#48 Keatah OFFLINE  

Keatah

    Missile Commander

  • 21,853 posts

Posted Wed Feb 15, 2017 4:11 AM

Yeah targeting of the Atari light gun is poor, but Sega Phasor is spot on (in SMS games). Interesting about lightguns detecting IR light. I assumed the diode emission wavelength needed to match hut I guess not.

 

A lot of semiconductors like to detect infra-red. That's why all digital photography sensors have an infra-red filter on them. I'm sure you could "tune" that problem out during doping in manufacturing, but at what cost to sensitivity? Best filter it out and keep the sensitivity high.

 

And that's how you can modify a camcorder for basic night-vision, remove the heat filter. Astronomy buffs get their dslr camera modded so it can see Hydrogen-Alpha wavelength and this means the opposite like beefing up the UV/IR filter.

 

Which reminds me, a CRT surface is rather cold. But most flat panels are hot across their whole array. Wonder if that's saturating things. Definitely time to do a side-by-side comparison. Begin at the sensor and work back into the system. There *WILL* be an observable difference somewhere along the way. I promise you that.


Edited by Keatah, Wed Feb 15, 2017 4:19 AM.


#49 Thomas Jentzsch OFFLINE  

Thomas Jentzsch

    Thrust, Jammed, SWOOPS!, Boulder Dash, THREE·S, Star Castle

  • Topic Starter
  • 23,942 posts
  • Always left from right here!
  • Location:Düsseldorf, Germany, Europe, Earth

Posted Wed Feb 15, 2017 5:08 AM

Even if you are right, I am not the right person to do that. I am only capable doing software.



#50 Keatah OFFLINE  

Keatah

    Missile Commander

  • 21,853 posts

Posted Wed Feb 15, 2017 10:40 AM

If I ever get a long block of time it's a project I've wanted to do since forever.

 

Look at it this way, the whole 1970's style video system is being swapped out when a modern tv is used. And now we need a different solution.


Edited by Keatah, Wed Feb 15, 2017 10:42 AM.






Also tagged with one or more of these keywords: Light Gun, LCD

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users