Reverse engineering "Stack Light Rifle"

Whether it's Mire Mare or a BASIC tape you found in the attic, it needs to be preserved digitally. Post here and experts can help to do so.
Boojakascha
Berk
Posts: 7
Joined: Thu May 17, 2018 2:44 pm

Reverse engineering "Stack Light Rifle"

Post by Boojakascha » Thu May 17, 2018 2:48 pm

Hello

I would like to reverse engineer the electronics inside the connector in the "Stack Light Rifle" to build adapters which can be used with more common guns such as Magnum Light Phasers, Sega Light Phasers, and Cheetah Defenders.

Has anyone that gun? Could a picture be posted of the contents inside the connector? If that would be too big of the hassle I would buy one if somebody is willing to sell. I even take a defect unit, I don't mind about its condition, as long as the connector is on it.
0 x

User avatar
RMartins
Manic Miner
Posts: 331
Joined: Thu Nov 16, 2017 3:26 pm

Re: Reverse engineering "Stack Light Rifle"

Post by RMartins » Thu May 17, 2018 11:53 pm

According to Wikipedia the principle is the same of any other gun or light pen from the 80 s.
https://en.m.wikipedia.org/wiki/Stack_Light_Rifle
The electronics inside the pistol consist of a light detector or photo-diode and a small amplifier and buffer.
I'm convinced the circuit will be very similar to the one on the Magnum Light Phaser.

The most important thing is to make sure that the lens is centered and doing the correct job.
The rest like documented in wikipedia is just a light sensor, a transistor as an amplifier, and a logic buffer to convert to typical TTL levels.

I have several Magnum Light Phaser, in my storage room, but never opened one, because if I remember correctly they are glued and have no screws to open.

Note: keep in mind that these devices only work with a CRT TV, due to how they work, since they are triggered by the CRT beam.
0 x

User avatar
Nomad
Manic Miner
Posts: 600
Joined: Thu Dec 28, 2017 12:38 pm

Re: Reverse engineering "Stack Light Rifle"

Post by Nomad » Fri May 18, 2018 3:48 am

RMartins wrote:
Thu May 17, 2018 11:53 pm
Note: keep in mind that these devices only work with a CRT TV, due to how they work, since they are triggered by the CRT beam.
I figure a lot of these devices are going to fall into obscurity for this very reason. People are not going to be able to actually use them when the final crt tubes go to the junk yard in the sky. :lol:

Makes you wonder about the future value of these widgets - if nobody can actually use them, beyond the nostalgia/completion factor why own it?
0 x

Boojakascha
Berk
Posts: 7
Joined: Thu May 17, 2018 2:44 pm

Re: Reverse engineering "Stack Light Rifle"

Post by Boojakascha » Fri May 18, 2018 5:20 am

RMartins wrote:
Thu May 17, 2018 11:53 pm

I'm convinced the circuit will be very similar to the one on the Magnum Light Phaser.
They are. The interior of the gun is well documented. I just need the interior/pinout of the connector.

Yes, I am aware they just work with CRTs. You guys would be surprised to know how many of us still have one of these...
0 x

dfzx
Dizzy
Posts: 84
Joined: Mon Nov 13, 2017 6:55 pm
Location: New Forest, UK
Contact:

Re: Reverse engineering "Stack Light Rifle"

Post by dfzx » Fri May 18, 2018 6:55 am

Boojakascha wrote:
Fri May 18, 2018 5:20 am
You guys would be surprised to know how many of us still have one of these...
Are they just collectables? Or have you found a way to use and play with them with modern technologies?
0 x

Boojakascha
Berk
Posts: 7
Joined: Thu May 17, 2018 2:44 pm

Re: Reverse engineering "Stack Light Rifle"

Post by Boojakascha » Fri May 18, 2018 9:15 am

dfzx wrote:
Fri May 18, 2018 6:55 am
Are they just collectables? Or have you found a way to use and play with them with modern technologies?
First: Rarely stuff doesn't have analogue output anymore.

Second: Even it the output is digital only, you can buy converters for less than 10 USD.

Third: People of course mainly use them in conjunction with old tech.
0 x

User avatar
RMartins
Manic Miner
Posts: 331
Joined: Thu Nov 16, 2017 3:26 pm

Re: Reverse engineering "Stack Light Rifle"

Post by RMartins » Fri May 18, 2018 3:02 pm

Boojakascha wrote:
Fri May 18, 2018 5:20 am
RMartins wrote:
Thu May 17, 2018 11:53 pm

I'm convinced the circuit will be very similar to the one on the Magnum Light Phaser.
They are. The interior of the gun is well documented. I just need the interior/pinout of the connector.

Yes, I am aware they just work with CRTs. You guys would be surprised to know how many of us still have one of these...
I also have a light pen, and it has a specific interface to connect to the expansion port.
The Magnum, if I remember correctly, connected to a keyboard or serial socket.
The "Stack Light Rifle" I have no idea.

Anyway, if you know where it used to connect, you can open that device and check the connector connections to the PCB trace, and follow them along, if they are not identified.
0 x

Joefish
Manic Miner
Posts: 267
Joined: Tue Nov 14, 2017 10:26 am

Re: Reverse engineering "Stack Light Rifle"

Post by Joefish » Fri May 18, 2018 3:41 pm

I think the stack came with its own interface, as it needed power.

It's very old technology - it's not doing raster counting to work out where the gun is pointing. It's simply detecting whether the gun is pointed at a light or dark spot on the picture. Games would have a single bright (white or yellow) target on a dark (black or blue) background. When you pull the trigger, the computer checks if you have a bright spot in your sights. Not sure if it can detect the trigger and the brightness independently, or if it only returns the brightness (high/low) signal when the trigger is pulled.

It's a clone of one that shipped with earlier TV games like the Grandstand. They'd just have a bouncing dot on the screen. It was up to you to set the brightness of your TV so that the gun could tell the dot from the background. Too high and it would register a hit off the plain green background. Oddly enough you could set the game to 'Tennis' and if you shot the ball it would temporarily vanish!
Image

Don't see why it wouldn't still work on an LCD TV, so long as it could display good enough contrast. A Plasma, OLED or LED TV (colour LCD with individual LED lights behind it instead of a single light source) should be fine.

It might benefit from a trim pot built into the gun. We used to build a light-sensor amplifying project in GCSE technology, with an LDR and a couple of transistors, and a potentiometer to tweak the sensitivity. You could drive a circuit like that off any joystick port that supplies +5V. You could build it into any of the various light gun models. So you might be able to make something that works with LCD TVs, if only for a single fast-moving target. Might be worth a try replacing the circuit in a Sinclair light gun. If you really want to be clever, you could try building a circuit that can detect two or three levels of brightness and report them on the joystick directions. Or flicker the screen between targets so you can test one at a time (that might not work if the LCD lag is bad though).

Later guns that could sense the onset of the TV raster beam needed a much faster light sensor - the sort that would respond in microseconds, like the receiver of an IR remote control. Those would only work with a CRT TV, but were frankly a bit beyond the ability of the Spectrum to detect where they were pointing with any accuracy. Even on 16-bit machines with per-line counters like the ST and Amiga their accuracy was questionable. You have to look to something like the G-Con 45 and Time Crisis on the first Playstation for any accurate tracking.
0 x

Boojakascha
Berk
Posts: 7
Joined: Thu May 17, 2018 2:44 pm

Re: Reverse engineering "Stack Light Rifle"

Post by Boojakascha » Fri May 18, 2018 4:46 pm

Joefish, I think the SLR just shares the shell with those pong console guns. The C64 and VIC20 ones work like proper raster light guns for sure, their internals are well documented.

Building the earlier kind you mentioned is indeed easy. I did a "Pistoltronix" for the Magnavox Odyssey:


RMartins wrote:
Fri May 18, 2018 3:02 pm
I also have a light pen, and it has a specific interface to connect to the expansion port.
That's an excellent lead, thank you very much. I am going to buy & slaughter one to find out its pinout. They usually work similar. And stack did some themselves.
0 x

Joefish
Manic Miner
Posts: 267
Joined: Tue Nov 14, 2017 10:26 am

Re: Reverse engineering "Stack Light Rifle"

Post by Joefish » Fri May 18, 2018 5:10 pm

OK, looking at this, I see it's arranged so that there's only one target on each row of the screen.
That would suggest it's accurate enough to at least work out which row of the raster-scan it's pointing at, then use the brightness of the target to determine whether you've hit the target on that row (rather than calculate the horizontal position accurately).



Even so, the only chance you have of making a lightgun work with an LCD display is using the single bright target scheme of those old TV games. If you can make a Sinclair light gun (or any of that era) actually have a slower and broader target response and work like that then you can at least do a crude Duck Hunt.

Can you point me to where the internals of the C64 one are documented? I can't find anything.
Never mind:
http://home.kpn.nl/bderogee1980/project ... Rifle.html
Last edited by Joefish on Fri May 18, 2018 5:22 pm, edited 2 times in total.
0 x

Post Reply