There's also different type of lightgun, that was used in arcade shooters: it flashes whole white frame, and measures exact delay of scanning beam determining arbitrary X-Y position. This doesn't work at all on LCD, but I wonder whether it be done by drawing rainbow frame that encodes pixel position as equation of pixel color values, and using RGB sensor in the gun.
The IBM EGA had a "light pen" feature which functioned similarly (the CRTC had registers dedicated to this), but it seems to have been little-used and disappeared with the VGA.
There's a way to play lightgun games on modern TVs. It's called the Sinden, and it has a camera in the gun that looks at your TV, and figures out where you were pointing when you pulled the trigger. It draws a white border around the screen (to determined aim), and needs to roll back the emulator to register the shot.
It's a pain to set up (there's linux images that have the drivers, emulators, and roms), but it supposedly works.
> The problem is, a CRT TV draws frames in real time. The Nintendo knows that when it draws a frame, that frame drawing is corresponding with the moving electron beam of the television in real time. In fact, NESdev claims that the photodiodes use have their signal die in as short as 10 scanlines, so the game needs to check more frequently than the 60Hz clock that usually governs an NES game.
Hell, my solar panel (which reacts slower than a photodiode) has its response to green/blue phosphors die in 1-2 480p scanlines (which last half as long as 240p scanlines)! Though if hooked up to a high series resistance, it takes a looot longer for the charge to dissipate.
I suspect the difference in switch-off times between a Zapper and Light Phaser is related to the support circuitry (https://hackaday.io/project/9782-nes-zapper-video-synth-ther..., capacitors? transistors?!) translating the photodiode's signal to the controller pin. Series capacitors will block continuous light, and higher resistances will make a short signal last longer before dissipating.
> This would take a lot of frames to check every single letter if this worked the same way as the Zapper.
You could binary-search to find which letter was shot, though this would obviously fail if the user is moving the light gun between letters. It would probably be more reliable if the lit-up region wasn't just a small box but the entire grid cell.
> But look at what we’ve done here: the Master System is literally reading in-line with the electron beam. This means that for this to work, you really do need an electron beam that moves in sync with the VDP. An LCD just won’t give you that moving dot, no matter how much delay you add.
What's the latency of CRT composite chroma decoding? (EDIT: http://www.hawestv.com/mtv_color/delayline.htm says luma is delayed by 1.3 us to match chroma. Compare to the total scanline duration of 63.7 us, or visible duration of around 51 us.)
How many pixels does that shift the light gun? (1.3 / 51) * 256 px = around 6.5 pixels. It's possible that Master System games compensate for this delay using an empirically tuned horizontal offset.
Using today's technology, wouldn't it be possible to equip lightgun with a mini camera, process the image to determine corners of the screen it's looking at, and from that calculate its position/direction?
Kind of like how QR codes are scanned using phone camera.
If needed, one could even upload a display frame (current or near-future one) to the lightgun for use as reference.
Probably this would take some calibration, and sure the image processing would take some cpu/specialized processing hardware, but this being 2023 sounds doable, no? (if not done already)
That's pretty much what a WiiMote does, except it's not looking at corners of the screen, it's looking at infra-red lights on the "sensor bar". That's how the lightgunverter linked at the bottom of the article does it. https://www.lightgunverter.com/features.html
I dismantled one of these as a kid. Ok, technically it was my friend's Commodore 64 light pen, but it worked on the same principle.
To my surprise the only active component in it was a LM741 Opamp, and I was like: "That's what I know!". So I rebuilt one, without understanding much how it functioned. Because I didn't have much money and housings were expensive I built it into a matchbox, whose frontside fits a 9 pin D-sub connector quite nicely. The photodiode lived in a ballpoint pen and both were connected by a homemade coiled cable. It looked sweet and I must still have it somewhere.
The precision was terrible and I couldn't paint with it, but it was no worse than the original. So next time you play one of these old shooting games and you miss a lot, it's maybe not your bad aim even.
I see that I not was the only person that thought about putting a delay to make lightguns work with LCDs.
I would like to know what kind of technique uses the Amstrad's lightgun for ZX Spectrum +2+/3 (I had one as child). I had good memories of playing Operation Wolf for Spectrum using a lightgun.
My first thought upon seeing comments mention delays in LCDs was the lag compensation feature that retroarch has. (or negative input delay, whatever they call it)
It works by reading your input, rewinding some number of frames, sending that input into the game, and fast-forwarding to the frame you should be on. Probably more reliable than patching individual games. I assume it should work for most NES games, if dialled in correctly. (assuming the light meter value gets handled correctly.)
I approached Nicole recently with a mostly complete project I felt might be appropriate for her blog, and I thought she’d have the connections to get it across the finish line. And the response was a polite “why would anyone bother with this?”
> Pretty much all analog video signals, RGB or otherwise, are imitating the raster of a television.
> That is to say, it assumes there is only a dot being drawn on screen at a time, and it provides signals that are timed as that dot moves across the screen.
I found it difficult to understand what all this meant for a long time. This is the best video I've ever found about the matter, just in case it helps others:
I built a projector with a ripped apart 15" LCD monitor and overhead projector decades ago, and we could not have been more excited to do some shooter games. We had had a PS2 and light guns all rigged up ready to go, before we noticed the fine print: does not work on projectors, does not work on LCD. And we were running via a tv-input card on a computer. It did not work for us. Delighted to see someone who made it further than we did.
> Why does it only check two? It thinks it figured out who I shot. And there’s the problem; I was pointing the gun at an LCD TV; a small widescreen monitor I keep next to my desktop alongside a CRT as a test setup.
> By the time the screen shows the white frames, the game already thinks you lost and went out to do something else.
Just so I understand correctly, did the game think the author shot the middle character? Just because it checked the middle character first and light was detected (due to the delay)?
I used to enjoy playing lightgun games with my SO on the PS2, so was devastated when new consoles seemingly no longer had light gun games. Thankfully, the oculus quest 2 has pistol whip etc. Would be interesting to see how those are processed/calculated in terms of target acquisition; do they use the little cameras in front to extrapolate positioning?
So, there used to be these 3D TVs and monitors that had pixels with different polarization on different scanlines. So with polarized glasses, it was possible to see the 3D image.
I wonder if we could do the same with the lightgun, have it perceive polarized light differently, and then turn up the polarized pixels properly.
[+] [-] garaetjjte|2 years ago|reply
[+] [-] userbinator|2 years ago|reply
[+] [-] jdiff|2 years ago|reply
[+] [-] jonny_eh|2 years ago|reply
It's a pain to set up (there's linux images that have the drivers, emulators, and roms), but it supposedly works.
https://sindenlightgun.com/
[+] [-] kwanbix|2 years ago|reply
The price of the guns is ok, it costs about a dualsense, but the pedal is crazy expensive, and I really don't get why it costs 220 euros.
https://www.sindenshop.com/products/sinden-arcade-pedal
[+] [-] TheSecondMouse|2 years ago|reply
[+] [-] notpushkin|2 years ago|reply
[+] [-] nyanpasu64|2 years ago|reply
Hell, my solar panel (which reacts slower than a photodiode) has its response to green/blue phosphors die in 1-2 480p scanlines (which last half as long as 240p scanlines)! Though if hooked up to a high series resistance, it takes a looot longer for the charge to dissipate.
I suspect the difference in switch-off times between a Zapper and Light Phaser is related to the support circuitry (https://hackaday.io/project/9782-nes-zapper-video-synth-ther..., capacitors? transistors?!) translating the photodiode's signal to the controller pin. Series capacitors will block continuous light, and higher resistances will make a short signal last longer before dissipating.
> This would take a lot of frames to check every single letter if this worked the same way as the Zapper.
You could binary-search to find which letter was shot, though this would obviously fail if the user is moving the light gun between letters. It would probably be more reliable if the lit-up region wasn't just a small box but the entire grid cell.
> But look at what we’ve done here: the Master System is literally reading in-line with the electron beam. This means that for this to work, you really do need an electron beam that moves in sync with the VDP. An LCD just won’t give you that moving dot, no matter how much delay you add.
What's the latency of CRT composite chroma decoding? (EDIT: http://www.hawestv.com/mtv_color/delayline.htm says luma is delayed by 1.3 us to match chroma. Compare to the total scanline duration of 63.7 us, or visible duration of around 51 us.)
How many pixels does that shift the light gun? (1.3 / 51) * 256 px = around 6.5 pixels. It's possible that Master System games compensate for this delay using an empirically tuned horizontal offset.
[+] [-] RetroTechie|2 years ago|reply
Kind of like how QR codes are scanned using phone camera.
If needed, one could even upload a display frame (current or near-future one) to the lightgun for use as reference.
Probably this would take some calibration, and sure the image processing would take some cpu/specialized processing hardware, but this being 2023 sounds doable, no? (if not done already)
[+] [-] rjmunro|2 years ago|reply
[+] [-] Inityx|2 years ago|reply
[+] [-] cosmojg|2 years ago|reply
[+] [-] amelius|2 years ago|reply
[+] [-] weinzierl|2 years ago|reply
To my surprise the only active component in it was a LM741 Opamp, and I was like: "That's what I know!". So I rebuilt one, without understanding much how it functioned. Because I didn't have much money and housings were expensive I built it into a matchbox, whose frontside fits a 9 pin D-sub connector quite nicely. The photodiode lived in a ballpoint pen and both were connected by a homemade coiled cable. It looked sweet and I must still have it somewhere.
The precision was terrible and I couldn't paint with it, but it was no worse than the original. So next time you play one of these old shooting games and you miss a lot, it's maybe not your bad aim even.
[+] [-] Zardoz84|2 years ago|reply
I would like to know what kind of technique uses the Amstrad's lightgun for ZX Spectrum +2+/3 (I had one as child). I had good memories of playing Operation Wolf for Spectrum using a lightgun.
[+] [-] extraduder_ire|2 years ago|reply
It works by reading your input, rewinding some number of frames, sending that input into the game, and fast-forwarding to the frame you should be on. Probably more reliable than patching individual games. I assume it should work for most NES games, if dialled in correctly. (assuming the light meter value gets handled correctly.)
[+] [-] pbj1968|2 years ago|reply
And here we are… playing duck hunt on an LCD.
Keep on keeping on, Nicole.
[+] [-] codetrotter|2 years ago|reply
[+] [-] matheusmoreira|2 years ago|reply
> That is to say, it assumes there is only a dot being drawn on screen at a time, and it provides signals that are timed as that dot moves across the screen.
I found it difficult to understand what all this meant for a long time. This is the best video I've ever found about the matter, just in case it helps others:
https://youtu.be/Q8ph2OVqZeM
[+] [-] rjmunro|2 years ago|reply
[+] [-] olig15|2 years ago|reply
[+] [-] jauntywundrkind|2 years ago|reply
[+] [-] cyrnel|2 years ago|reply
> By the time the screen shows the white frames, the game already thinks you lost and went out to do something else.
Just so I understand correctly, did the game think the author shot the middle character? Just because it checked the middle character first and light was detected (due to the delay)?
[+] [-] xarope|2 years ago|reply
[+] [-] js8|2 years ago|reply
I wonder if we could do the same with the lightgun, have it perceive polarized light differently, and then turn up the polarized pixels properly.
[+] [-] syntaxing|2 years ago|reply
[+] [-] tadfisher|2 years ago|reply