Main > Lightguns
Light Gun Interface
<< < (9/15) > >>
u_rebelscum:

--- Quote from: Billkwando on October 13, 2004, 05:05:03 pm ---If MAME drivers hadn't been written with the mouse in mind,
--- End quote ---

Although the answer to the true question you ask isn't effected by the incorrectness of this setup supposition, I should point out the supposition is not true.

Mame can use analog joysticks for lightgun game, as well as lightguns and trackballs and mice.  And keyboards and digital sticks.  Some people here have made mounted positional gun (aka joysticks) cabs just to play these games, and play them to their satisfaction.

So the "If" should be followed with "MAME hadn't been written with mice, lightguns, analog joysticks, keyboards and digital stick in mind,..."

Again, this doesn't effect the answer, but early posts in this thread make it sound like lightguns have to be mice type inputs.  Not true.  (It's just that past joystick lightguns had low accuracy, and the current mouse lightguns work, and the "if it ain't broke..." thinking that make it falsely seem that all lightguns need to be mice to work well.)


--- Quote ---what would stop one from interfacing a console gun with the PC? .... What I'm wondering is since lightgun games are made to work with "raw" lightguns, if we had a "raw" mame driver (read: non mousified), shouldn't you be able to calibrate the gun and use it as normal?? (I should mention I use TV-Out here I think)

I mean, assuming that there's not a contact in the PSX controller port that's only used by lightguns, the data from the sensor has to be going somewhere, right? I suppose the question would be where?
--- End quote ---

Accuracy, compatabilty, accuracy, and compatibilty.  And did I mention accuracy?

First, PSX "raw" lightgun data is different from "raw" arcade data, both which are probably different from "raw" xbox lightgun data.  Mame translates standard PC inputs into emulated "raw" arcade lightgun data.  So the best way is for the lightgun to be translated to either a mouse type input or an analog joystick type input, and for the accuracy and precision to be high.

Second, I noticed you didn't say the lightgun position (where you shot) calibrated in windows.  If it did, mame could see it.  That takes both a compatable windows driver and the lightgun sensor properly working.  Neither which is a mame issue (mame should stay out of running input devices).

Third, the data is "going" somewhere, but either the adapter doesn't understand, or can't translate it, or translates it poorly to the computer.  "Lost in Translation".  Again, not a mame thing.

Fourth, past PC joystick lightguns sucked in accuracy.  Not sure if it was old tech or bad drivers or what, but it will take a lot to get past the preconception that joystick lightguns don't work.  Oh, and that most games (but not mame, hopefully: see note in first half of this reply) would need to be rewritten to work with the joystick guns.




After that ramble, it raises a question for the guys thinking of writing the interface driver.

Would it be easier to write a joystick driver for the interface board?  If the precision is above 3200 per axis, it should work fine in mame.  (Even though most analog joysticks output only 256 values, directX directInput's max precision is >64000 (0xffff in hex), and mame's internal precision is twice that.)  Hmm, deadzone needs to be zero, and I guess calibration would change the movement saturation level.

Just a thought.
Billkwando:
Ok....so barring all the stuff about "joystick lightguns" (which aren't my particular concern at the moment) how much of this post applies to my own post?


--- Quote ---First, PSX "raw" lightgun data is different from "raw" arcade data, both which are probably different from "raw" xbox lightgun data.  Mame translates standard PC inputs into emulated "raw" arcade lightgun data.  So the best way is for the lightgun to be translated to either a mouse type input or an analog joystick type input, and for the accuracy and precision to be high.

--- End quote ---

I've already read (here I thought) that console lightguns can function just fine in actual arcade machines.... so what creates such an accuracy/connectivity concern in MAME specifically, besides the drivers? Also, when you say MAME was written to work with lightguns, do you mean the actlabs gun?

Perhaps I should try my idea on a PSX emulator first to see if the basic idea is even possible....as I was a bit confused by your post so I'm not sure if you answered my question or not.


--- Quote ---Second, I noticed you didn't say the lightgun position (where you shot) calibrated in windows.  If it did, mame could see it.  That takes both a compatable windows driver and the lightgun sensor properly working.  Neither which is a mame issue (mame should stay out of running input devices).

Third, the data is "going" somewhere, but either the adapter doesn't understand, or can't translate it, or translates it poorly to the computer.  "Lost in Translation".  Again, not a mame thing.

--- End quote ---

??? Calibrated? I went into Game Controllers in Control Panel and into the controller menu, where it shows that when I pull the trigger, it registers as "Button 9" on the controller screen and the little red #9 flashes to show I've pushed the button. I'm wondering how I might test to send signals to the gun that make it "think" it's shooting at a target to see if that translates in Control panel as a thumbstick movement or if it has no effect at all, but since I have no was of hooking it up to a gun game (thanks to MAME thinking everything is an actlabs gun) there's no way to even test it. Maybe the problem IS with the adaptor, after all it thinks it's a thumbstick, but still....

Does anyone know where I can find a pinout for a NON NegCon PSX gun? (The old style you just plug into the controller port) Or if it's possible to use REAL lightguns with any PSX emulator?
Bgnome:
i dont think any of the psx emulators have psx light gun support, especially since there is a lack of drivers..
Billkwando:
Could Rebel (or someone) put the following in context for me in regards to how it relates to his post? (from http://www.arcadecontrols.com/arcade_consoles.shtml#lightguns)



--- Quote --- Lightguns
 Console lightgun games work very nicely inside arcade cabinets (and look much better than anything Mame has to offer IMHO).  They work perfectly on Arcade monitors using the RGB/SCART or 480i Transcoder options mentioned above.  Contrary to belief, console lightgun games can also work on VGA monitors (even when upscanned) at 640x480@60hz.  They will not work however on LCD monitors/projectors, or HDTVs with 100hz refresh rates.  In most cases, you will have to make sure to have your Brightness and Contrast controls cranked to their highest levels for the gun to calibrate correctly.  
[I have confirmed the Dreamcast lightgun works on a VGA monitor (via the DC VGA box), and that the Playstation2 GunCon2 works when upscanned using the X-RGB2.]
 

--- End quote ---

Is it simply a matter of not having the right drivers to "marry" the lightgun to MAME? Keep in mind my lightgun is a Saturn/PSX dual gun so I have a feeling the types of signals passed probably are pretty similar for all standard lightguns. I mean....they're pretty simple technology right? Duck Hunt baby!

Thanks!
u_rebelscum:

--- Quote from: Billkwando on October 14, 2004, 12:55:10 pm ---Could Rebel (or someone) put the following in context for me in regards to how it relates to his post? (from http://www.arcadecontrols.com/arcade_consoles.shtml#lightguns)


--- Quote --- Lightguns
 Console lightgun games work very nicely inside arcade cabinets (and look much better than anything Mame has to offer IMHO).  They work perfectly on Arcade monitors using the RGB/SCART or 480i Transcoder options mentioned above.  
Contrary to belief, console lightgun games can also work on VGA monitors (even when upscanned) at 640x480@60hz.  They will not work however on LCD monitors/projectors, or HDTVs with 100hz refresh rates.  In most cases, you will have to make sure to have your Brightness and Contrast controls cranked to their highest levels for the gun to calibrate correctly.  
[I have confirmed the Dreamcast lightgun works on a VGA monitor (via the DC VGA box), and that the Playstation2 GunCon2 works when upscanned using the X-RGB2.]
--- End quote ---

--- End quote ---

Translation:
"You can put your console in your cab, and play lightgun games on your console in the cab."


--- Quote ---Is it simply a matter of not having the right drivers to "marry" the lightgun to MAME? Keep in mind my lightgun is a Saturn/PSX dual gun so I have a feeling the types of signals passed probably are pretty similar for all standard lightguns. I mean....they're pretty simple technology right?
--- End quote ---

No.  It's a matter of hardware, timing, resolution, and "marrying" the lightgun to windows.

Think of lightguns much like all other inputs: "if it works in windows, it should work in mame."  Get the lightgun positioning working in windows, and it will work in mame.

Mame does not, should not, cannot, and will not do the hardware/driver level processing of any inputs.


--- Quote ---Duck Hunt baby!
--- End quote ---

FWIW, the NES lightgun used different tech.  If gun sensed dark, it was a miss.  If gun sensed light, it was a hit.  Start up your old NES, duck hunt, and NES gun.  Point the gun at a incondesent light: pull the trigger and you won't miss.


I don't know how the other console games communicate* trigger pulls and screen positions but:

If it's "like arcade guns" (ie: don't computer position) as posted earlier in this thread, then they need the same type hardware as arcade guns need to work in windows (and thus, in mame).

If the guns compute the position, it can communicate the position three ways:

If it's "like joystick", then the guns should work in mame.

If it's "like mice", then the adapters just need to be able translate those console's mouse data (most just translate joystick type).  It can translate to either like a mice, or like an analog joystick.

If it's some other way, then the case is much like mice; the adapter needs to translate that format to some windows analog way.


*search other threads on how lightguns work.  Or read HowThingsWorks: the first is NES, the second is all other lightguns.  (Not positional guns, not IR guns, though)
Navigation
Message Index
Next page
Previous page

Go to full version