Main > Main Forum

Optical Guns question

(1/4) > >>

shadowdrak:
This might sound jumbled, can't think of a good way to say it.  Does anyone know how Arcade optical guns(like the ones from happ) send their data?  I don't just mean the pinout.  I assume it is some sort of digital pulse, but I don't rightly know.  I've done a search on google and turned up nothing useful.  I also don't have access to an oscilloscope.  I'd like to hack together some sort of interface (serial, parallel doesn't matter)  but I can't find any info.  I found a premade interface by a company called ror3 but their distributor, happ, doesn't seem to have them in their catalog.
I can't say I care much for the idea of using the act labs guns (I have heard they don't work well on some arcade monitors) because they are not arcade real.  I could probably put the PCB in new gun halves but I am still wary.  Any input is welcome.

u_rebelscum:
I would be interested, too.  What data is sent where, when, and why; and how the different boards process and output the different types of data.


As for happs (guess):  they might be making ror3's interface under their own brand, like "dell" brand printers are now made by lexmark. [shrug]

mairsil:
Such a simple device, yet no one has managed to set up a USB interface for a Happs gun yet. I have an ActLabs gun, and I just do not think it even comes close to the accuracy (and feel) of my pair of Happs. I tried contacting the R0R3 people several times to try to get more information on how their device worked, but they never responded to my emails. Personally, I think that their price for such a device is ludicrous considering all it should be is a simple USB interface and a driver. If I had the knowledge to write a device driver, I would do it myself.

As far as I have ever been able to tell, squeezing the trigger causes the gun board to send a single "Trigger Signal" pulse to the game PCB telling it to paint the screen. Assuming that you are not playing Duck Hunt, the game PCB paints the screen horizontally until the gun's optical sensor sees the white horizontal line. As soon as that occurs, the gun board sends an "Optic Signal" pulse to the game PCB letting it know the current position. The game PCB then paints the vertical lines until the optical sensor sees the line and sends a second "Optic Signal" pulse to the game PCB. If their are no "Optic Signal" pulses recorded, the game PCB assumes that the gun was pointed off screen (usually to signal a reload).

Specifically, from Happ's optical gun data sheet (http://www.happcontrols.com/images/pdf/opticalgun.pdf):

"The gun is powered by +5 vdc. The optical output signal is a negative going pulse from a LM311 voltage comparator pulled up with a 4.7k resistor. This output is given at the horizontal frequency and is present whenever the gun is aimed at the screen. The trigger signal is a single negative going pulse pulled up with a 4.7k resistor and is active as long as the trigger is pulled."

I hope this information is what you were looking for. If you ever get a working interface, I would be interested in hearing about it.

u_rebelscum:
From the happs info, sounds like the gun does almost nothing.  (Which is what many of us thought it did.)  And sounds like all your "how it works" is done by the PCB (or like how the actlab gun works).  Either way it's a little exaggerated (all normal monitors draw lines horizontally only).  

Anyway, so the gun sends two things: a trigger pull on one wire, and a "timed" pulse on the other (other two wires being pwr and gnd).  Notice no X,Y location is sent by the gun; all that is processed on the game's PCB.


But one part of happs info is confusing to me.

"This (optical) output is given at the horizontal frequency and is present whenever the gun is aimed at the screen."

This makes it sound like the gun optical output signal pulses once per line drawn if the gun is pointing at the screen?  I guess the pulse is sent when the optical sensor sees the quick brightening of the new line scan, which might be seen over a couple consequetive lines?

Good thing about this is that the gun sounds to be able to track real time, and the trigger can be held down.  (For the acrade game to track real time, however, the PCB needs to be able to also.)


Sounds to me like the hardware you need to get these signals working on a PC is a circuit more complicated than what's in the box the actlab guns have, not a just a simple USB driver.  The added circuit needs to do everything the actlabs' box does*, plus track real time and allow held down buttons.  Calibration would be a ---smurfette---, unless you have a calibration switch on the added circuit.

*I'm assuming the actlabs gun is much like the arcade gun except it has extra wires for button 2 and calibration.
FWIW (I'm guessing) the actlabs box can time things at least to within ~ 1/20,000,000 of a sec (or ~20mHz: horizontal refresh ~55kHz * 1024 horizontal res / 3 horizontal pixel accuracy).  That fine timing accuracy can't be done over USB 1.1 (max 10 megabit), let alone the slower mouse USB (~1 megabit) or a multiple device loaded USB root hub..


Maybe "just" hack the actlab's box and attach the arcade gun?  You'd be limited to the actlab limits though: no real time track, no "machine gunning".

shadowdrak:
ok.  so the optical signal is timed based on which pixel it is pointing at.  The data file seems kind of vague.  I would assume that the gun's PCB can sense the refresh rate(if not where does it get the sync?).

But per my understanding of this I conclude it would require:

A PCB to decode the tracking info and accept trigger signals. the board would receive the trigger, optionally flash the screen, then pass the tracking info on to the computer as a mouse click at the co-ordinates.  I guess it could also have an adjustable auto repeat interval until the trigger debounces(but that wouldn't be in the first prototype).

My understanding is still lacking on the timing of the optical signal.  I would probably have to buy one to mess with it.  But I still run into the problem of not having any data analysis tools at my disposal.  If I had defined specs, I could probably design a circuit for it, but that seems like it might be impossible unless we could convince someone to "take one for the team" and buy one to analyze it.  That would be a lot to ask of relative strangers.  Any takers though?
Would I be right in the assumption that the data rate on all standard Pc buses would be too slow to write an acurate virtual waveform analyzer for a computer?  Cause if it is possible, I would personally offer to waste my time to try to hack one together.
I guess I could try to talk to Happ to get some more specific answers about their output signals.  Are the tech support ppl that knowlegable anyway?
If I made a device it would probably be a serial interface so I hopefully wouldn't have to use eeproms -- might not be able to avoid this    :-\
I will try to post updates to the situation, I was hoping this would have any easy solution.  Might be easier to hack a console gun to work on a pc.  Do they have better accuracy than act labs guns?

Navigation

[0] Message Index

[#] Next page

Go to full version