Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: idea to get 2 lightguns to work  (Read 7146 times)

0 Members and 1 Guest are viewing this topic.

rampy

  • *shrug*
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2910
  • Last login:March 02, 2007, 11:32:16 am
  • ...as useless as a JPG is to Helen Keller
    • Build Your Own PVR
idea to get 2 lightguns to work
« on: December 19, 2002, 10:34:03 am »
Now, don't go off an shoot me just yet...

I ganked the following from another thread

Quote
***lilwolf said***
Howard, you are a nice person also... so don't take this personally (had to).

They don't support 2player.  In win98 you can have 2 or more mice working with analog mame.  Act labs will now work in this setting because the drivers will conflict with each other.  

What if one person used an actlabs USB gun and another person used a ps/2 PC Automag light gun?  Two totally different drivers, both are mouse-esque.  (or would the old issue of identiftying which gun fired/white flash come into play?)

Anyhow it was just an idea not sure if it's feasible... although I did ask for an actlabs usb gun for xmas, and have one of the automags from ebay... and am running 98lite on my cabinet... so if santa is good to me, maybe I could try it and report back...

but i'd be interested in if people thought it would hypothetically would work.

rampy
« Last Edit: December 19, 2002, 02:09:00 pm by rampy »

zr5-2002

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 18
  • Last login:January 21, 2003, 11:06:53 pm
  • I'm a llama!
Re:idea to get 2 lightguns to work
« Reply #1 on: December 19, 2002, 06:43:56 pm »
Not on windows with normal drivers.  In windows, a mouse is a mouse and gets mapped to the same function regardless of how many you have and how they connect: they all control the pointing device.

I think on linux you could potentially do this since you can read off of the various entries in /dev to get your inputs rather than mapping them all together, but I think it would be pretty tough to write a hack for mame that did this.

rampy

  • *shrug*
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2910
  • Last login:March 02, 2007, 11:32:16 am
  • ...as useless as a JPG is to Helen Keller
    • Build Your Own PVR
Re:idea to get 2 lightguns to work
« Reply #2 on: December 19, 2002, 09:03:27 pm »
Not on windows with normal drivers.  In windows, a mouse is a mouse and gets mapped to the same function regardless of how many you have and how they connect: they all control the pointing device.

I think on linux you could potentially do this since you can read off of the various entries in /dev to get your inputs rather than mapping them all together, but I think it would be pretty tough to write a hack for mame that did this.

well 2 separate distinct mouses (meeses?) are possible with the correct driver(s) and an application that understands them  as distinct devices (i.e. analog mame as noted in windows 98)... you can do this in DOS as well with optimouse driver...  BUT those aren't lightguns.

In XP (and other NT based varients??), as noted in the other thread and many many other lightgun threads, there is one pointing device to rule them all =P or rather one cursor to be ruled by many pointing devices =P

*shrug* (there I shrugged are you happy now?!! wiseguys... =P )

That's just spitting back out badly paraphrased the assumptions we've been working from our collective knowledge....

rampy

PS although I read in the other thread, that HC thinks that actlabs has intimated that there's a super secret beta dual gun driver in internal testing... which would make my two different brand gun theory/attempt moot ... surprised lilwolf/rebelscum/et al haven't weighed in yet, maybe I am crazy- we'll have to wait till xmas to find out I suppose...

cdbrown

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1241
  • Last login:October 16, 2017, 09:52:03 pm
  • Bowowow
Re:idea to get 2 lightguns to work
« Reply #3 on: December 20, 2002, 12:38:28 am »
*shrug* (there I shrugged are you happy now?!! wiseguys... =P )

*shrug* I guess so

Lilwolf

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4945
  • Last login:July 31, 2022, 10:26:34 pm
Re:idea to get 2 lightguns to work
« Reply #4 on: December 20, 2002, 12:09:30 pm »
It might work in 98 with analog mame.  But how good is the other light gun?  I heard they didn't work all that well.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19428
  • Last login:Today at 01:14:11 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:idea to get 2 lightguns to work
« Reply #5 on: December 20, 2002, 05:52:20 pm »
for the record most people who had one said it worked ok in everything but mame.  Sorry :(

rampy

  • *shrug*
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2910
  • Last login:March 02, 2007, 11:32:16 am
  • ...as useless as a JPG is to Helen Keller
    • Build Your Own PVR
Re: 2 lightguns - attempt 1 - need help
« Reply #6 on: January 02, 2003, 10:46:37 pm »
Hi,  

I thought I'd update you on my attempt (they said I was daft to build a castle in a swamp...) to get two simultaneous/concurrent light guns to work with MAME (or anything).

I'm using 1 USB Actlabs light gun and 1 PC Auto Mag serial/ps2 + gameport light gun.  

ASSUMPTION 1: Analog Mame + and win98 support two trackballs (mices) as two distinct cursors/players
ASSUMPTION 2: Dueling USB ACTLABs light guns don't work because
a. Driver doesn't support it
b. Mame support couldn't differentiate between the two drivers
(? ?) as they are the same...or looks the same as one (system?) mouse cursor thingie or something...
ASSUMPTION 3: If the issue is with the driver... could two totally different guns with 2 different manufacturers/"drivers" show up as independent mousing controls and therefore independently function as different players?!!!

 
I'm trying to use Analog+ MAME32gui to separate out the system mouse (virtual) and another mouse (also virtual) so that  side by side light gun blazing action is possilbe in Win 98

Alas my understanding of dual micetry is limited.

I kinda got it working but I had some targeting issues and button mapping issues...  I'm hoping if I could understand better the Analog Mame functionality/usage I could maybe get this to work...

I tried to do the "remove the serial port until it boots entirely" but then the non actlabs gun doesn't initialize/work ...  

They seem to fight over the same cursor but register different hits (blue and red in police trainer for example)

If I could just map lightgun b. to player 1 I'd be in business...

I'm requesting links to threads or pages for getting 2 mices to work independenly in win98 with analog mame32gui (does the light gun driver work with command line version?)

Whats the difference between mouse 0, mouse 1 and system mouse?
How should I assign these and where?

*shrug*... your help is appreciated.

rampy

PS HC the other gun works "ok" in MAME alone as a "mouse" ... not mindblowingly great but it does work... (although on first use the act labs gun wasn't mindblowlingly accurate either...) *shrug*

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re: 2 lightguns - attempt 1 - need help
« Reply #7 on: January 03, 2003, 06:32:42 am »
Hi Rampy,

Sorry, I didn't catch this thread earlier.

Start with some analog+ input info.

"sysmouse" is all mice inputs pooled into one mouse (only mouse standard mame uses).  "mouse 1", "mouse 2", etc are first USB mouse, second USB mouse, etc (notice all are USB mice).  The "sysmouse" includes all USB mice.

mame (and thus mame:analog+), however, treats lightgun inputs differently than normal mice inputs.  Basically this means analog+ is forced to use only the sysmouse for lightgun inputs, too.  :(  I just got my actlab lightgun tonight (8:00 PM, "knock, knock", "Hello", "UPS delievery" :o ), so I can start testing some lightgun changes for analog+.

Now looking at your assumptions.

Quote
ASSUMPTION 1: Analog Mame + and win98 support two trackballs (mices) as two distinct cursors/players

More like: "If coded to do so, and the (two) USB mice have good drivers, an application in win98 with directX 8 can draw it's own (two) distinct cursors/players."  
Analog+ is one such application for trackball and dial mame type inputs, but not for lightgun mame type inputs (mame type is different than hardwaretype).  Win98 still only draws it's one sysmouse cursor, but don't worry about that (I think).

Quote
ASSUMPTION 2: Dueling USB ACTLABs light guns don't work because
a. Driver doesn't support it
b. Mame support couldn't differentiate between the two drivers
(? ?) as they are the same...or looks the same as one (system?) mouse cursor thingie or something...
Don't think a) is the problem.  b) is partially true, though.  And I would think there needs to be a part "c): vga box causes some problems if two are in series," maybe.
I might be able to make some edits to analog+ and "fix" b) if I play around enough, err, I mean don't play too much while testing my coding. ;)

Now your test results

Quote
I tried to do the "remove the serial port until it boots entirely" but then the non actlabs gun doesn't initialize/work ...

The USB actlabs gun doesn't work? ???  Might happen if the USB gun "claims" "winmouse 1", and then the serial gun, after serial ports startup, claims "winmouse 1" without changing USB gun to "winmouse 2".  (note, "winmouse 1" not the same as analog+ "mouse 1")

Quote
They seem to fight over the same cursor but register different hits (blue and red in police trainer for example)

The "fighting cursor" is probably due to mame's (and thus analog+) method of reading lightgun type inputs from sysmouse (as mentioned before).
Mame (and thus Analog+) treat the trigger as normal buttons, however, so analog+ still sends the correct button input to the game, resulting in the different hits.

Quote
If I could just map lightgun b. to player 1 I'd be in business...

I assume you have lightgun a to player 2, and you want lightgun b (but not lightgun a) to player 1?   And player 2 works better than player 1?  Hmm...  Is player 2 using the USB or the serial gun?

I'll hook up my gun and get back to you with my test results (I only have one, though. Maybe I should get a second just to test.)
Robin
Knowledge is Power

rampy

  • *shrug*
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2910
  • Last login:March 02, 2007, 11:32:16 am
  • ...as useless as a JPG is to Helen Keller
    • Build Your Own PVR
Re:idea to get 2 lightguns to work
« Reply #8 on: January 03, 2003, 09:59:32 am »
Hi U_rebelscum,

thanks for clarifying, that does help... I was hoping you'd see my thread =)  

Let me clarify as my ramblings weren't consistent/clear.

Lightgun A is the PC Auto Mag which uses ps/2 or serial port AND gameport AND of course the monitor passthrough flasher thingie

Lightgun B is the infamouse ActLabs USB model

I'm using Win98, Analog+ Mame32gui

Lightgun A (auto mag) alone works in mame as a mouse cursor (it doesn't work with "lightgun" checked in mame32)  It doesn't load any drivers (besides default msft mouse drivers that might load when it sees a serial mouse is connected - i assume)

Lightgun B (actlabs) works alone with lightgun checked...

With both plugged in, and then booted, etc... The actlabs is definitely acting like systemmouse as if you try and use MAME's in game button assignment via tab ->key assignments (this game) ... firing the trigger creates while trying to assign it to player 1 button 1 gives you something like the following:

Mouse 0 button 1 AND(?) Mouse 1 button 1    (or the like - I'm not looking at it currently as I am at work)

light gun A (auto mag) fire button shows up as just one single mouse single button (forget if it's mouse 0 or 1 off hand)

My hope was that that Lightgun A automag would/could be seen independently as a whole new "mouse"... but if Actlabs driver/mame LG driver uses sysmouse then it will assimilate the other non-usb lightgun A's "cursor" input too (the crosshair fighting I saw).

Sounds like the way actlabs single gun driver is coded we're screwed/dependent on them...  (ignoring the two white flashing boxes in series possible issue for the moment of course)

Makes me wonder if two crappy Auto Mag guns would work if a person had two gameport connectors (which I don't understand why it needs a gameport (more power? non mouseing game support?) or won't work at all without - I wonder if it would be happy with a gameport ->usb converter)

I was just trying to take a shot in the dark (no pun intended) that two different guns could work somehow... I haven't given up total hope, and appreciate any help/ideas guidance.

Rampy

PS If it would help any I'd semi-permanently loan you the auto mag gun u_rebelscum for research purposes - assuming I can't get it to work in concert on my own =P

PSS I wonder if Act-labs would be willing to opensource or allow download of A SDK of their driver with the purpose of having a community developer write an alternative/unsupported 2 gun hack driver.... *shrug*

rampy

  • *shrug*
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2910
  • Last login:March 02, 2007, 11:32:16 am
  • ...as useless as a JPG is to Helen Keller
    • Build Your Own PVR
Re: 2 lightguns - attempt 1 - need help
« Reply #9 on: January 03, 2003, 10:13:55 am »

Quote
I tried to do the "remove the serial port until it boots entirely" but then the non actlabs gun doesn't initialize/work ...

The USB actlabs gun doesn't work? ???  Might happen if the USB gun "claims" "winmouse 1", and then the serial gun, after serial ports startup, claims "winmouse 1" without changing USB gun to "winmouse 2".  (note, "winmouse 1" not the same as analog+ "mouse 1")


The Serial PC Auto Mag gun didn't work when I tried the "swap in the serial device after win98 boots trick... "i've heard about for 2 mices...


Quote
If I could just map lightgun b. to player 1 I'd be in business...
Quote
I assume you have lightgun a to player 2, and you want lightgun b (but not lightgun a) to player 1?   And player 2 works better than player 1?  Hmm...  Is player 2 using the USB or the serial gun?

I'll hook up my gun and get back to you with my test results (I only have one, though. Maybe I should get a second just to test.)

I don't remember which is which.. and tried several permutations... I was trying to make sure each gun was "talking" as a different mouse -> but that was before I understood that system mouse was a composite mouse... When I try to map via the tab in analog mame the different mouse axis to different players I can use system mouse x (or y), nomouse, or mouse1x... I had tried player 2 as sysmousexy and player 1 as mouse1x/y  (fyi it mighta been mouse0, again i'm not at the cab right now) and that sorta made the actlabs gun player 2 and non actlabs auto mag gun player 1 (but I think that had more to do with button assignments than anything ) *shrug* I realize that whole passage makes little sense, but that's the type of confusion I'm having...

Anyways... thanks again for your help

rampy

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re:idea to get 2 lightguns to work
« Reply #10 on: January 03, 2003, 11:19:37 am »
Something to try (and I'm way over my head in this thread, but maybe this would work):

MAME Analog + controls two USB mice independently.

You have a PS/2 mouse (Automag) and a USB lightgun (Actlabs).  and they are both fighting over the sysmouse control, correct?

Idea:  Get a USB mouse and plug it in first, it will act as sysmouse along with the Automag, but it won't matter b/c you're just going to have it connected and set it aside where it won't do anything.  (Maybe even take the ball out of it, if you're really paranoid :-) ).

Now plug in the Actlabs gun and use Analog + to assign it to mouse 2.

Actlabs should work as Mouse 2 and the Automag should work as sysmouse (and the USB mouse should just sit there).

Or maybe I missed something really obvious ;-((
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

rampy

  • *shrug*
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2910
  • Last login:March 02, 2007, 11:32:16 am
  • ...as useless as a JPG is to Helen Keller
    • Build Your Own PVR
Re:idea to get 2 lightguns to work
« Reply #11 on: January 03, 2003, 05:42:18 pm »
U_rebelscum (or anyone with an Actlabs USB gun, Analog Mame, and some know how)

Could you try the following:

Try to get any other mousing device (trackball/mouse/etc) to control the 2nd player cursor/crosshairs in a lightgun game, while the act labs USB gun is controlling the the first player... (or vice versa)

If I understand what u_rebel  said it won't work right (input from the trackball will get assimilated into the systemmouse and affect the 1st player crosshairs...

*shrug*  seems like a good prototype test for those without 2 act labs guns but some analog Mame dual mousing experience...

I'm gonna go futz around some...

Rampy

PS TigerHeli, that's an idea to try, but I'm not optimistic based on what u_rebel outlined how the actlabs gun driver is code and what "system mouse" means... although admittadly I could be *very* confused at this point... as this rambling thread is evident...

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re:idea to get 2 lightguns to work
« Reply #12 on: January 03, 2003, 10:43:10 pm »
PS TigerHeli, that's an idea to try, but I'm not optimistic based on what u_rebel outlined how the actlabs gun driver is code and what "system mouse" means... although admittadly I could be *very* confused at this point... as this rambling thread is evident...

It was a shot in the dark.  I don't have a light-gun (or even USB mice), but I'm familiar with MAME Analog +, although I don't know how MAME treats lightguns and mice differently.  Maybe try my idea with and without telling MAME you're using a lightgun?

hopefully Urebel will have some good ideas
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

Lowen_Na

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
  • Last login:January 04, 2003, 09:11:33 pm
  • I'm a llama!
Re:idea to get 2 lightguns to work
« Reply #13 on: January 04, 2003, 09:17:31 pm »
Here is what I don't understand.

Why can you just have 2 one-player light guns hooked up at the same time?  They will only be recogized as one mouse, I know, but if you could "bind" the triger to something else on the 2nd gun, wouldn't it work?

IE: Player one pulls the trigger on his gun, the system then flashes the screen and figures out were he shot and tells the computer that there was a mouse 1 click at 420X130 on system mouse.

Then player two pulls the trigger on his gun, the system then flashes the screen and figures out were he shot and tells the computer that there was a mouse 3 click at 270X330 on system mouse.

Why should mame care if the clicks came from the same mouse as long as it was a diffrent button clicked?

Maybe I am just misunderstanding how this works...

Garrett_N

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10
  • Last login:January 01, 2003, 11:45:55 pm
  • Good.....bad....I'm the guy with the gun.
    • Hosers
Re:idea to get 2 lightguns to work
« Reply #14 on: January 05, 2003, 12:44:56 am »
I know your using 2 totally different kinds of guns but if you go here http://www.arcadecontrols.org/yabbse/index.php?board=1;action=display;threadid=4191 and read jayd177's post he says:
Quote
I've got 2 of Act Labs newer USB guns and I can use both of them at the same time.  I'm using Analog Mame32 62.1(http://www.urebelscum.speedhost.com/)
and Windows 98se (XP won't allow 2 mice at once).

The only problem is that every once in a while, when both guns are shot at the same time, they both go to where one gun is aiming.  This happens like once in 20 or 30 shots.  I was just testing it out today on zero point.  It can get annoying, but it's definately playable, and better than single player.

btw,  can someone tell me how to post a pic.  I have pics of my cabinet on my hard drive, but I don't have a website yet.  Thanks, Jay


Edited:  I should probably add that I never installed the cd that came with the guns.

>>Garrett

Dr. J

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 112
  • Last login:November 26, 2004, 05:53:01 pm
    • DrJsArcade Cabinet
Re:idea to get 2 lightguns to work
« Reply #15 on: January 05, 2003, 12:51:06 am »
I've got 2 of Act Labs newer USB guns and I can use both of them at the same time.  I'm using Analog+ Mame32 62.1(http://www.urebelscum.speedhost.com/)  
(Thanks Urebelscum)
and Windows 98se (XP won't allow analog to have 2 mice at once).
I did not install any drivers off the cd that came with the guns.
The only problem is that every once in a while, when both guns are shot at the same time, they both hit where one gun is aiming.  This happens roughly once in 20 or 30 shots that are pressed simultaneously.  I was just testing it out today on zero point.  It could get annoying, but it's definately playable, and better than single player.  I played through Police Trainer from beginning to end (after like 3000 credits).

Inside Analogmame32 i don't remember if I had the default controls with light guns on or off.  I'm pretty sure they were on, I'll check tomorrow and update this.  I know I had mouse input turned on.  Inside the game I made sure the mice showed mouse1 and mouse2 (in the tab menu for mouse axes)  and I set player 1 button 1 and player2 button2 by shooting with the appropriate gun at the screen.  (It showed up as something wierd like "mouse button 0 mouse 1 button 0" and "mouse button 0 mouse2 button 0"  but it works.  

Garrett-n asked in another post if I got this to work with any other pc gun games.  Unfortunately no.  I haven't even tried, but seeing how I'm taking advantage of Analog+ (mame only) I wouldn't have a clue how to accomplish that.

My next project (after completing the software setup on my cab) is to see if I can either hack together or switch out the actlabs pcb's into better looking guns with recoil from Happs.  (I'll have to save up some $$ first :)

btw,  can someone tell me how to post a pic.  I have pics I want to show of my cabinet on my hard drive, but I don't have a website up yet.  Thanks, Jay  

(thx Howard for Raging Dragon. Haven't gotten around to playing with Lazarus yet.)

« Last Edit: January 06, 2003, 01:29:29 pm by Dr. J »

Garrett_N

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10
  • Last login:January 01, 2003, 11:45:55 pm
  • Good.....bad....I'm the guy with the gun.
    • Hosers
Re:idea to get 2 lightguns to work
« Reply #16 on: January 05, 2003, 02:18:59 pm »
Superb looking cab :o,
I want it now man that is one sweet machine you got there.
Good work thats one really awesome cab.
>>Garrett
PS right on the pic goto properties and see where it says Address(URL) just copy and paste that URL here or in your browser and it will open it up as it should be seen.

Dr. J

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 112
  • Last login:November 26, 2004, 05:53:01 pm
    • DrJsArcade Cabinet
Re:idea to get 2 lightguns to work
« Reply #17 on: January 05, 2003, 09:20:15 pm »
I just got done putting the guns through testing and here's my update.  I used zero-point and maximum-force for all my tests.

#1.  I did have lightgun control turned on.

#2.  The mouse axes may read mouse 1 & 2, but the buttons will read "mouse 1 button 0 mouse2 button 0" and "mouse 1 button 0 mouse 3 button 0" respectively, but this still works.

#3.  If the buttons are pressed at exactly the same time, both guns will shoot where the 2nd gun is aiming, but it will be player 1's bullet.  (This could be switched depending on how you daisy-chained the monitor pass-thru boxes).  This happens a lot more often than the originol 1 of 20 I stated earlier.  I didn't notice this so much before because if you're playing a slower shooting scene it isn't very often that both guns fire at exactly the same time.  On rapid fire scenes though, the chance goes up.  So I should restate it to something like this:  "It usually isn't very often that both triggers are pressed at exactly the same time, so in this regard cross-over doesn't happen very often, BUT when they ARE pressed at the same time, the cross-over is nearly 100%."

#4.  Reloading is a pain in the @$$ in area51 and maximum force.  It won't reload just shooting off screen.  Instead I have to shoot the very edge of the screen.  This get's to be very tricky and gets you killed a lot.

My opinions:  A single gun works beautifully.  I'd definately keep it and have fun.  Two guns works enough for me and a friend to have fun, but it gets annoying, and it isn't perfect.  I will not be adding two guns to my cabinet officially.  Instead I'll keep them inside and use them periodically.  I won't even be adding a single gun officially because of annoying problems like calibration and with area51 type games where you have to shoot off-screen to reload.  It just doesn't work like that yet.  Hopefully in a future release of mame.

Hope this helps some, and sorry if I got others hopes up more than I should have.  --Jay

rampy

  • *shrug*
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2910
  • Last login:March 02, 2007, 11:32:16 am
  • ...as useless as a JPG is to Helen Keller
    • Build Your Own PVR
Re:idea to get 2 lightguns to work
« Reply #18 on: January 05, 2003, 09:37:05 pm »
Hey Jay,

Thanks for taking the time to try out 2 guns and report back your findings...

I think it shows that if Act-labs made a more flexible/configurable driver maybe it would work (2 guns that is) ???? ? or not...

*Shrug*  thanks again...
rampy

PS i've given up on using 1 act labs and 1 non... partially because it's  pain to use the other gun cuz i'm already using the gameport for my sidewinder(s) hack so swapping out for the crappy gun is a pain...


u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re:idea to get 2 lightguns to work
« Reply #19 on: January 07, 2003, 04:48:54 am »
Thanks jay for testing and reporting your setup.  It really helps show me what's going on.

Some notes I'd like to share

#2.  The mouse axes may read mouse 1 & 2, but the buttons will read "mouse 1 button 0 mouse2 button 0" and "mouse 1 button 0 mouse 3 button 0" respectively, but this still works.

This is something like when you press pause, and then assign a ctrl key to an input, resulting in "Left ctrl right ctrl".  You see, "mouse 0" = sysmouse, and all mouse inputs are reflected in the sysmouse, including button clicks and mouse movements.  USB mice, in winMe/98, also can have their inputs show elsewhere; in the case of analog+, mouse 1 and up.  So when you push button 1 on lightgun 1 (mouse 1), windows shows that press as both mouse 1 button 1 press and mouse 0 (sysmouse) button 1.

Small note: if you use ctrlr ini input to set the button inputs for analog+, you can just set "mouse 1 button 0" as an input and leave out the mouse 0 part if you want.

Quote
#3.  If the buttons are pressed at exactly the same time, both guns will shoot where the 2nd gun is aiming, but it will be player 1's bullet.  (This could be switched depending on how you daisy-chained the monitor pass-thru boxes).

I am interested why this happens this way, and will look into it.  I think I know most of it, but would like to know for sure, for possible winXP use.

I think it shows that if Act-labs made a more flexible/configurable driver maybe it would work (2 guns that is) ???? ? or not...

Rampy, it's not act-labs' driver that is the problem.  In fact, actlabs didn't write any (USB) lightgun driver at all.  Their gun is using microsoft's standard window mouse driver (at least on my computer).  My lightgun, usb optipac, usb optical mouse, and usb kensington trackball are all using the same driver: mouse.drv, ver 9.01.0.000; msmouse.vxd, ver 4.90.3000; and mouhid.vxd, ver 4.90.300.  All but the lightgun can be used to control different players in analog+, so it's not the driver.

Of course, actlabs could spend time and money trying to write a better driver than the one MS wrote (and updates), but that's a lot of work, with the possiblity that actlabs driver still being worse than MS's.  I don't see what they can change in the driver to improve 2 player use (but I know only a little on mouse drivers).
Robin
Knowledge is Power

Dr. J

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 112
  • Last login:November 26, 2004, 05:53:01 pm
    • DrJsArcade Cabinet
Re:idea to get 2 lightguns to work
« Reply #20 on: January 07, 2003, 10:35:24 am »
U_rebelscum,  
     Out of curiosity would the way the mouse buttons are being registered now really have any effect on the shooting?  I'm talking about the Mouse0button1mouse1button1.  I don't know how the stuff registeres in Mame really, but I guess this is what I mean:
     If I set a move to be two buttons like Q+w, then in that game nothing should happen if I press q, or if I press w separately, but only if I press them together.  Now the same thing for Q+A.  Again, nothing individually, but only together.  If I press all three then both moves should happen.  So what I'm asking is even though the mice share the "mouse0button1" part in common, would that not matter because you have to simultaneously press the "mouse1button1" part.  Like my analogy above, basically isn't pulling the trigger automatically set to be something similar to pressing Q+W at the same time for gun 1 and Q+A at the same time for gun two?  
      Where I get confused is why the aiming gets crossed.  I wonder if it would ever happen on a 2 monitor setup.  Some videocards support multiple monitors.  I wonder if each gun were a passthrough to a separate monitor there would be any cross over.  This might help determine if it's hardware or software issues.  
    My brother's video card has 2 plugs for 2 monitors (both the 15pin sub-D or whatever).  Next time I get over there I'll try changing the ctrlr.ini first and I'll report back.  (probably Sunday).  Next I'll check both my brother's computer with 2 monitors (each gun going to it's own monitor) and see if I still get cross-over.  I'm really curious about this now, because if that works, then I wonder if you could get an adapter (or hack one) to lead them into a single monitor.  Basically I'm wondering if the problem will go away as long as one box isn't passing through another box.  
    If it's a problem funneling the two ports on the videocard into a single monitor, then I could also try it off a single port.  I'd split it as if running to 2 monitors, so the gun boxes are connected in parallel instead of series, and then splice them back together.  
     I'm getting way ahead of myself.  I'll see if the two monitor thing works first and take it from there.  Besides, someone good with mame development needs to get the shooting off-screen to reload, or let us map a second button to reload somehow.  Could they even do that seeing how that's built into the rom???
   Sorry about the super long post, I'm excited.     ---Jay
« Last Edit: January 07, 2003, 05:14:05 pm by Dr. J »

Lowen_Na

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
  • Last login:January 04, 2003, 09:11:33 pm
  • I'm a llama!
Re:idea to get 2 lightguns to work
« Reply #21 on: January 07, 2003, 07:00:41 pm »

Rampy, it's not act-labs' driver that is the problem.  In fact, actlabs didn't write any (USB) lightgun driver at all.  Their gun is using microsoft's standard window mouse driver (at least on my computer).  My lightgun, usb optipac, usb optical mouse, and usb kensington trackball are all using the same driver: mouse.drv, ver 9.01.0.000; msmouse.vxd, ver 4.90.3000; and mouhid.vxd, ver 4.90.300.  All but the lightgun can be used to control different players in analog+, so it's not the driver.

Of course, actlabs could spend time and money trying to write a better driver than the one MS wrote (and updates), but that's a lot of work, with the possiblity that actlabs driver still being worse than MS's.  I don't see what they can change in the driver to improve 2 player use (but I know only a little on mouse drivers).

Your right, they didn't write the driver, but they did make the hardware.  It wouldn't be hard to make a 2 player gun system that would work on an OS that only supports one mouse, Like windows XP.

You would need to design the hardware to be a little smarter.  Player One's fire button would be mouse button 1, and Player Two's Fire button would be mouse button 3.

The Light gun it self is an absolute pointing device, like a touch screen, were the curser can be moved to any cordant on the screen instantly with out having to move across the screen.  Becuase of this, there is no need for 2 cursers, the players can share the one curser, but they fire with diffrent buttons.

The problem accoures when both players fire at the same time, which will happen about every 30 shots or so.  The Light gun hardware needs to be made so that it can detect when this has happened, queue one of the players shots in it's memory, "fire" the other players shot, the fire the queued shot.  The second shot can be "fired" from the guns' queue before the next frame of video is even rendered.

Is there any reason that this can't work?

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re:idea to get 2 lightguns to work
« Reply #22 on: January 08, 2003, 04:31:48 am »
U_rebelscum,  
     Out of curiosity would the way the mouse buttons are being registered now really have any effect on the shooting?  I'm talking about the Mouse0button1mouse1button1.  I don't know how the stuff registeres in Mame really, but I guess this is what I mean:
     If I set a move to be two buttons like Q+w, ...[snip]....  Like my analogy above, basically isn't pulling the trigger automatically set to be something similar to pressing Q+W at the same time for gun 1 and Q+A at the same time for gun two?

Your analogy is correct. (gun1 trig is like pressing Q + A, while gun 2 trig is like Q + W).  And mapping A to player 1, and W to player two in mame (instead of Q + A, Q + W, using ctrlr ini method of setting inputs) will still have the same effect as now, since Q is redundant.  
I only mentioned the remapping as a possiblity of "cleaning up" the "Input (this game)" UI, not as a fix or anything.

Quote
     Where I get confused is why the aiming gets crossed.  I wonder if it would ever happen on a 2 monitor setup.  Some videocards support multiple monitors.  I wonder if each gun were a passthrough to a separate monitor there would be any cross over.  This might help determine if it's hardware or software issues.

I think they get crossed because windows has only one cursor, and mame looks at the current possition of that cursor.  If both guns' triggers are pulled at the same time, the cursor:
  • moves to position a and then to possition b before mame is able to check the position, and only sees the cursor sitting at position b

-or-
  • never moves to position a, but jumps to position b, and mame again only sees position b

-or-
  • moves to position a, mame sees position a with the triggers pulled, and afterwards, the cursor is moved to position b but without the triggers pulled anymore.
Doesn't really matter which one, though.  Whatever way, mame also sees the mouse presses, checks the cursor position, and shots at that  shared position.

If I'm right on what's going on, two monitors will not help. :(  But please test and prove me wrong.

Quote
...mame development needs to get the shooting off-screen to reload, or let us map a second button to reload somehow.  Could they even do that seeing how that's built into the rom???

Actlabs USB gun does not act like the arcades guns.
Arcade gun: trigger pulled while pointing off screen == button 1 + position on the edge of screen.  This is what the rom is looking for.
Actlabs gun: trigger pulled while pointing off screen == button 2 + last position trigger was pulled.

A hack will be needed to make "button 2" translate to "button 1 on edge of screen".  Not exactly a true-mame emulation; a change only used to increase playability when using the actlabs lightgun product.  I still think it will be added, though.
Robin
Knowledge is Power

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re:idea to get 2 lightguns to work
« Reply #23 on: January 08, 2003, 04:33:46 am »
It wouldn't be hard to make a 2 player gun system that would work on an OS that only supports one mouse, Like windows XP.

You would need to design the hardware to be a little smarter.  Player One's fire button would be mouse button 1, and Player Two's Fire button would be mouse button 3.

The Light gun it self is an absolute pointing device, like a touch screen, were the curser can be moved to any cordant on the screen instantly with out having to move across the screen.  Becuase of this, there is no need for 2 cursers, the players can share the one curser, but they fire with diffrent buttons.

The problem accoures when both players fire at the same time, which will happen about every 30 shots or so.  The Light gun hardware needs to be made so that it can detect when this has happened, queue one of the players shots in it's memory, "fire" the other players shot, the fire the queued shot.  The second shot can be "fired" from the guns' queue before the next frame of video is even rendered.

Is there any reason that this can't work?

It's been suggested before.  It would be fine if:
  • games are written/patched so it would work (mame would work as is, I think)
  • the delay for simultaneous triggers is short enough so users don't complain
  • games are able to process the input as fast as the gun hardware delay for simultaneous triggers
  • games are patched so it works
  • games in development are written so it works
  • did I mention all current retail games would need to be patched so the second gun would work?
Parts two and three need to be carefully balanced, and might result in a high minimum PC, or in mame games like duck hunt no problem, other games that sometimes tax a computer would work except that one time there are too many things going on (boss stage?) for mame to keep up with the inputs and thus "lose" a player's gun, and games that are just too much for most computers to do two guns.

But timing is a minor problem, IMO.  The hard part would be getting the game writers to add patches so that second gun works.  Without the game support, the hardware would be of no use.

Would I like it if actlabs did what you suggest?  I'd love it!  
But I doubt theyll try it if most games do not work with it.  Bad for publicity; on the order of: "The 'two' player gun sucks 'cause it doesn't do two players on my favorate game XXYYZZ!!!!  False advertising! Lairs!!  MONEY MUNCHING A$$H0LE$$$!!!".  :-\
Sure actlabs is not getting the best image with it not doing a two player gun, but that would not compare to the bad pub they'd get if that sold a two player gun set that wasn't two players for most games.
Robin
Knowledge is Power

Lowen_Na

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
  • Last login:January 04, 2003, 09:11:33 pm
  • I'm a llama!
Re:idea to get 2 lightguns to work
« Reply #24 on: January 08, 2003, 05:01:46 am »
It's been suggested before.  It would be fine if:
  • games are written/patched so it would work (mame would work as is, I think)
  • the delay for simultaneous triggers is short enough so users don't complain
  • games are able to process the input as fast as the gun hardware delay for simultaneous triggers
  • games are patched so it works
  • games in development are written so it works
  • did I mention all current retail games would need to be patched so the second gun would work?


MAME should work with "my" method with little or no changes.

The delays for triggers for the queued player should be fast enough that no one would notice, even if it was only 1 frame of delay, that is only 1/30 of a second (for TV's) of lag and it would only happen once out of every 30-40 shots.

Games should be able to handle the inputs fast enough.  Although I am sure that there would be a few that might have an issue.  So there should be an ajustable queue delay on the gun unit.  Either a software adjustment, or a simple hardware dial or dipswitch to adjust the delay of the queued shot by 1/60 of a sec, or 1/30, or 1/25 or ETC.

As far as games being patched to work with it or being written to work with it, are there any games (out side of mame) that support 2 player guns (or 2 player mice)?


I see that there would be conserns with doing a 2 gun set up they way that I am suggesting. but I don't think that any of them are anything that can't be overcomed, and even if the 2 player gun system only supported 2 players in a few games rather than all of them, you still could play one player gun games with it, and not have any problems in addtion to the 2 smaller number of 2 player games that it would work with.

Lilwolf

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4945
  • Last login:July 31, 2022, 10:26:34 pm
Re:idea to get 2 lightguns to work
« Reply #25 on: January 08, 2003, 09:20:10 am »
Actually, they wouldn't need to do another shot at all... they would need to be able to register the shot in another location.

How it works is the flash happens... the gun then waits until it sees the flash and knows how the flash is displayed (top row first, left to right).   It knows the refresh and by that it can calculate what part of the screen is hit by how long it took.  

Trouble (my guess) is that it stores that information for both in the same register.  If they where stored in different registers it would work (my guess).  Trouble is this might be a hardware change instead of just a software one.  

Dr. J

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 112
  • Last login:November 26, 2004, 05:53:01 pm
    • DrJsArcade Cabinet
Re:idea to get 2 lightguns to work
« Reply #26 on: January 08, 2003, 12:04:50 pm »
I think they get crossed because windows has only one cursor, and mame looks at the current possition of that cursor.  If both guns' triggers are pulled at the same time, the cursor:
  • moves to position a and then to possition b before mame is able to check the position, and only sees the cursor sitting at position b

-or-
  • never moves to position a, but jumps to position b, and mame again only sees position b

-or-
  • moves to position a, mame sees position a with the triggers pulled, and afterwards, the cursor is moved to position b but without the triggers pulled anymore.

I read in your post higher up that the light guns aren't split in analog mame because they're recognized differently in normal mame.  Do you think it's possible for you to do the same thing for the Lightguns?  Are the recognized so differently that it isn't feasable?  I'm not a programmer, but I'd assume that since Mame and the computer see the light guns as absolute mice they could be spittable as well.  What do you think?  I sure hope you look into it and piece something together.  That would save the day.
« Last Edit: January 08, 2003, 12:10:20 pm by Dr. J »

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re:idea to get 2 lightguns to work
« Reply #27 on: January 10, 2003, 04:40:21 am »
I read in your post higher up that the light guns aren't split in analog mame because they're recognized differently in normal mame.  Do you think it's possible for you to do the same thing for the Lightguns?  Are the recognized so differently that it isn't feasable?  I'm not a programmer, but I'd assume that since Mame and the computer see the light guns as absolute mice they could be spittable as well.  What do you think?  I sure hope you look into it and piece something together.  That would save the day.

I've looked into this a little.  Start with basics:

Mame treatment of lightguns:  win32 api call to check screen location of the (system) mouse pointer.

Mame treatment of non-lightgun, mouse type inputs: directX directInput check relative movment of mouse since last check (not change of screen pointer, but movement of mouse).

Okay, since the usb lightgun is basically a mouse, I tried using the normal mouse input in mame instead of the lightgun way, and I get the following problem: relative movement of lightgun is way too big.  Apparently, with dX, the lightgun treats the screen as 65536 x 65536 in size (16 bit by 16 bit) regardless of screen resolution.  This makes the relative movement of one or two pixels huge.  Example: 320x256 resolution, a one pixel movement in Y axis = 256 value (65536/256=256) as the relative movement passed to mame.  Mame treats this 256 value as 256 pixels, which is the whole Y axis of the screen.

This is on my winMe system; winXP might be a little different, but I assume win9x is the same.

I'll see if I can use the above to make analog+ do two lightguns.
Robin
Knowledge is Power

Dr. J

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 112
  • Last login:November 26, 2004, 05:53:01 pm
    • DrJsArcade Cabinet
Re:idea to get 2 lightguns to work
« Reply #28 on: January 10, 2003, 11:26:09 am »
Mame treatment of lightguns:  win32 api call to check screen location of the (system) mouse pointer.
I'll see if I can use the above to make analog+ do two lightguns.
    Do you  mean you'll try to get the win32api to check (mouse1) & (mouse2) instead of (system),  or that you're going to keep working with the DX?  Either way, I hope it works.  If you don't have 2 guns but want to test some preliminary versions I'd be happy to try it.  I can't program worth a poo though, so it would either have to be exe like they are now, or come with idiot proof instructions.  You can email me at fdube@woh.rr.com.

BTW:  Have you tried emailing the people at Actlabs and talking to them about it?  I know before you had said that the Mame people would know more about it, but they don't have multiple mice.  Also it seems that the Mame people thought it was a good idea to use the win32 instead of DX.  (I don't know if there was a special reason for this).  
    Anyway, before the guns came out I emailed Actlabs back and forth several times, and they were extremely friendly, and seemed eager to support the Mame community.  I'm sure if you shot them a quick message explaining that you've already got regular mice multiplied, and that you're trying to do this, they would respond.  (especially if they thought more people would be excited enough to buy 2).  
     Also if you tell them that 2 guns work together, just that they fight over that same cursor.  Their reason for not having 2 guns before was because of the interference, but that probably refers to all the games it works on (pc, internet).  Mame is a special case where talented people can change the code to make it work. Maybe I'll send them a quick email with a link to this thread and see what they say.   Keep up the great work!   ----Jay
« Last Edit: January 10, 2003, 11:40:12 am by Dr. J »

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re:idea to get 2 lightguns to work
« Reply #29 on: January 11, 2003, 05:44:22 am »
Mame treatment of lightguns:  win32 api call to check screen location of the (system) mouse pointer. ...[snip]...  I'll see if I can use the above to make analog+ do two lightguns.

     Do you  mean you'll try to get the win32api to check (mouse1) & (mouse2) instead of (system),  or that you're going to keep working with the DX?

DX, at least with the above statements.  A different way with win32api might be an alternate after that for winXP, since the DX way is only good for winMe/98.

Quote
Either way, I hope it works.

Me too. ;)

Quote
If you don't have 2 guns but want to test some preliminary versions I'd be happy to try it.  I can't program worth a poo though, so it would either have to be exe like they are now, or come with idiot proof instructions.  You can email me at fdube@woh.rr.com.

Thanks.  I only have one gun to test with.  I'll email you after I get something going and arrange what needs to be sent.  Not very soon (this week), but a little after that.

Quote
BTW:  Have you tried emailing the people at Actlabs and talking to them about it? [snip]

No I haven't.  Mostly because they posted here answers to my questions, or, like now, I have an idea and want to test it and get some results (ans so they can repeat the tests, too) before emailing them.  Oh, and I'm not the best at, um, orderly email correspondence.  :-\
Robin
Knowledge is Power

Dr. J

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 112
  • Last login:November 26, 2004, 05:53:01 pm
    • DrJsArcade Cabinet
Re:idea to get 2 lightguns to work
« Reply #30 on: January 12, 2003, 01:12:26 pm »
     I tested out the two monitor idea.  Each gun plugged into it's own port on the back of my brothers video card.  Then I ran both of those to their own monitor.  It didn't change anything.  It's as you said (U_rebelscum), it's a software issure where they are fighting over the same cursor.  I was thinking there might be some problem with linking the guns in a series, but I don't think that matters anymore.  Sorry to say, but I think you separating the guns like you did the mice (if you can) is the only possibility right now.  Good luck (I've got my fingers crossed). -----Jay