Light Guns and Speccy

For experts to discuss very technical stuff and newbies to ask why the Spectrum they bought off ebay doesn't work.
Post Reply
User avatar
Joefish
Rick Dangerous
Posts: 2058
Joined: Tue Nov 14, 2017 10:26 am

Re: Light Guns and Speccy

Post by Joefish »

Joefish wrote: Mon Sep 16, 2019 6:55 pm Didn't those early light-guns with interfaces just detect one moving bright spot on a dark background, like the old 70s TV game units, rather than try and measure the exact raster position like a lightpen?
What I mean is, something like that could still work with an LCD TV.
User avatar
Guesser
Manic Miner
Posts: 641
Joined: Wed Nov 15, 2017 2:35 pm
Contact:

Re: Light Guns and Speccy

Post by Guesser »

I think Amstrad just weren't very good at Ohm's law ;)
User avatar
Guesser
Manic Miner
Posts: 641
Joined: Wed Nov 15, 2017 2:35 pm
Contact:

Re: Light Guns and Speccy

Post by Guesser »

Joefish wrote: Tue Sep 17, 2019 8:37 am What I mean is, something like that could still work with an LCD TV.
Does an LCD produce bright enough light at a wavelength the gun is sensitive to though. I suspect not.
User avatar
zxbruno
Manic Miner
Posts: 214
Joined: Sun Mar 04, 2018 6:13 am

Re: Light Guns and Speccy

Post by zxbruno »

There was a topic about this on WOS years ago. We were told we'd need something similar to wired motion sensors, like the ones used on the Nintendo Wii and Xbox, to get light guns to work on modern TVs and monitors. We'd probably have to develop new light guns as well.

But for those who still have older CRTs, you can play the old light gun games or do crazy stuff like this:

https://www.youtube.com/watch?v=NsRhU-54Ues

I would've used monochrome graphics instead, but it was an interesting proof of concept.
AndyC
Dynamite Dan
Posts: 1407
Joined: Mon Nov 13, 2017 5:12 am

Re: Light Guns and Speccy

Post by AndyC »

Guesser wrote: Tue Sep 17, 2019 10:38 am
Joefish wrote: Tue Sep 17, 2019 8:37 am What I mean is, something like that could still work with an LCD TV.
Does an LCD produce bright enough light at a wavelength the gun is sensitive to though. I suspect not.
Another problem is the enormous lag on LCD displays, the chances of knowing which frame is being displayed when you actually detect a white spot is fairly slim.
User avatar
Joefish
Rick Dangerous
Posts: 2058
Joined: Tue Nov 14, 2017 10:26 am

Re: Light Guns and Speccy

Post by Joefish »

AndyC wrote: Tue Sep 17, 2019 3:03 pmAnother problem is the enormous lag on LCD displays, the chances of knowing which frame is being displayed when you actually detect a white spot is fairly slim.
I really wasn't expecting even that level of sophistication! My Grandstand TV game was literally just a white square dot, bouncing around like the ball in Pong, on a plain green screen background. Nothing else - not even the score digits were visible (until the end of a round) so as not to confuse the gun. You simply had to set the TV contrast and brightness so it could tell white from green. It wasn't even about the colour wavelength as the green background would trigger a 'hit' every time if the screen was too bright.

NES Duck Hunt worked by flushing the normal graphics screen to black with a white patch for the target for one frame. It wasn't trying to count raster lines, just a hit yes or no during that frame. For multiple targets it would flash them up white one by one on a black background, taking a bit longer.

The Speccy equivalent to the Grandstand would be a single bright yellow duck sprite on a black background. Either the gun is pointing at the bright object or it isn't. There wouldn't need to be any frame-flashing for a single target, so raster or frame timing wouldn't come into it. I actually did it years ago by drawing a graphic target sprite on the Speccy screen, and having the Grandstand switched on next to it, and the console would beep if you shot the target on the Speccy's display with the lightgun plugged into the Grandstand.

Although you could probably calibrate whole-frame timing with the gun beforehand, to then handle two or three flashable targets like Duck Hunt. It should at least be consistent for one mode of the TV. You might have to use two frames of blackout to get round any frame-to-frame smearing, although modern LCD TVs shouldn't have too much of that (particularly now they all use LED backlighting). The timing you'd need to calibrate for is the throughput lag of the analogue-to-digital image processing, which may be two or three frames behind the feed.
User avatar
ZXDunny
Manic Miner
Posts: 498
Joined: Tue Nov 14, 2017 3:45 pm

Re: Light Guns and Speccy

Post by ZXDunny »

The lightguns of the day for the Speccy worked by watching the raster beam. They didn't see a "picture" at all, just a moving dot of light as the picture was built up.
User avatar
1024MAK
Bugaboo
Posts: 3123
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: Light Guns and Speccy

Post by 1024MAK »

Light guns / light pen just see light. ANY suitable light. Most have circuitry to ignore ambient light levels and only to respond to rapid changes in light level. So a flashing LED torch may activate them...

All the clever stuff is done in hardware and software. If there is hardware support in the video circuitry (so not applicable to ZX Spectrums) this can provide the position of the raster at the time of triggering by way of storing the relevant video system counter values in special readable registers.

If there is no hardware support, all the processing must be done by the game software. If the software can track the appropriate position of the raster, then it can compare when the trigger was activated with the appropriate position of the raster. Hence determining if the target was ‘hit’.

Both the above need a 15625Hz horizontal frequency, 50Hz vertical CRT display.

Otherwise the software can only use a much cruder technique of flashing a bright target on screen and seeing if the trigger was pressed during the time the target was displayed. And ignoring the trigger at any other time.

Mark
:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :dance
Looking forward to summer later in the year.
Post Reply