Multiple mice support in RetroArch cores (lightguns, spinners, trackballs)
-
Do you have two mouse devices that it's picking up on? Like say an actual mouse or airmouse alongside your Dolphinbar? If so, I believe it's possible to allow all mice to be seen as one changing
device_mouse auto
todevice_mouse raw
in theadvmame.rc
config file. At that point, all mouse devices should be seen as one and you can just leave the others alone and use the Wiimote/Dolphin bar. Also, with all the mouse devices being seen as one, it should only produce one set of crosshairs. I haven't tried this myself, but it was necessary to set my keyboard input setting to 'raw' so that Advance MAME wouldn't automatically map my various keyboard devices to different player numbers based on the event order that the system loaded them in. -
The raw driver for mouse does not unite the devices the way it does for keyboard. You can still setup a matrix of inputs based on the device index, then route each to MAME inputs (like Dial, Trackball, etc.).
If the light gun is just showing up to advancemame as a mouse input, then it should be one of the indices which you could prove/test using the
advm
utility.Here are the relevant lines I have in my .rc file to get up to 4 mouse devices working on separate indices. They need to be mapped later in the file to the different inputs, some even by ROM if you want. For my trackball and two spinners, that means mapping the trackball mouse and not the spinners for games like Golden Tee, and vice versa for games like Blasteroids.
device_mouse raw device_raw_mousedev[0] /dev/input/mouse0 device_raw_mousedev[1] /dev/input/mouse1 device_raw_mousedev[2] /dev/input/mouse2 device_raw_mousedev[3] /dev/input/mouse3 device_raw_mousetype[0] ps2 device_raw_mousetype[1] ps2 device_raw_mousetype[2] ps2 device_raw_mousetype[3] ps2
Then, say your tests put light guns on mouse 1 and 2:
input_map[p1_lightgunx] mouse[1,x] input_map[p1_lightguny] mouse[1,y] input_map[p2_lightgunx] mouse[2,x] input_map[p2_lightguny] mouse[2,y]
That should work, right?
-
@mediamogul No second mouse connected.
I'm doing my tests using only a wired keyboard and a classic wired mouse to reduce variables during the test.Talking about the dolphin bar, I was wondering if could be possible to skip it connecting a Wii remote via Bluetooth using a classic battery powered IR bar,
I found a tutorial about how to connect a wiimote to Retropie here:
https://github.com/RetroPie/RetroPie-Setup/wiki/Wiimote-Controllerbut it's so complicated it seems you have to build a driver by yourself.
-
@caver01 said in Multiple mice support in RetroArch cores (lightguns, spinners, trackballs):
That should work, right?
It certainly looks like it would neatly square away reliable assignment of the mice, but for some reason he's getting two sets of crosshairs with only one mouse which seems odd. Of course, I'm making the assumption that the crosshairs are being generated from Advance MAME. If the crosshairs are coming inherently from the games mentioned, it's possible the whole issue might boil down to intentional behavior, like how many coins were inserted or something. What are your thoughts? I'll look at those particular titles a little later this evening and see how they behave on mine.
but it's so complicated it seems you have to build a driver by yourself.
Yeah, the main attraction of the Dolphinbar is that it's doing everything without the need for special drivers, making it both fool-proof and future-proof at the same time. I'd always stick with it between the two options.
-
@mediamogul I have done plenty with the mouse inputs for advancemame, but I have no experience with lightguns. The dolphin bar presents as a standard mouse when it is working properly, right? This is probably the way I would go if I wanted to to lightgun games.
I also think a lot depends on how each game is built. Does it always draw crosshairs for players who have entered the game? Do the crosshairs default to the center of the screen? That would make a lot of sense, actually. It seems like I could do a test too even with a trackball and spinners, as the game should not know the difference.
-
@caver01 said in Multiple mice support in RetroArch cores (lightguns, spinners, trackballs):
It seems like I could do a test too even with a trackball and spinners, as the game should not know the difference.
You can indeed. It can even be tested by mapping buttons or keys to move a light gun, trackball, etc. It's a real testament to the versatility of MAME, although obviously you'd always want the granular movement of analog input whenever possible.
I tested the games you mentioned. 'Point Blank' refused to launch for me, 'Steel Gunner' loaded with persistent crosshairs generated by AdvanceMAME for P1 and P2 just as you said, but bizarrely, control of the AdvMAME crosshairs for P1 had no effect on the crosshairs for the game. Lastly, 'Zero Point' seemed to behave as it should, but it definitely had persistent crosshairs generated by AdvMAME for both players at all times with no second mouse present.
This might end up being something better addressed over at the AdvanceMAME forums, but it seems as though it may be a bug or perhaps that the light gun implementation for two player games is still somewhat immature. It would seem as though the ideal behavior would be to only generate crosshairs for a second player if a second mouse is found.
-
@mediamogul said in Multiple mice support in RetroArch cores (lightguns, spinners, trackballs):
It would seem as though the ideal behavior would be to only generate crosshairs for a second player if a second mouse is found.
Unless this is exactly how the actual arcade machine behaves. In that case it is doing perfect emulation in this regard, and to expect more or different is maybe to expect too much.
-
Very true, but in these particular cases and probably more, the in-game crosshairs for P2 are only present when needed. AdvanceMAME generating a second set at all times seems unintentional and you'd think avoidable by polling for another mouse device. Then again, I'm not a programmer, so perhaps it truly is unavoidable.
-
I've been meaning to mention something to you for a while, but I keep forgetting. Sometime last year we were both lamenting the fact the lr-vecx didn't render it's vector emulation in HD. Well, you might already know this by now, but sometime along the way, hi-res options were added to the core settings, all the way up to 4x. Of course the arcade conversions are still better experienced in AdvanceMAME, but the Vectrex original games now look fantastic for the first time in RetroArch.
-
@mediamogul said in Multiple mice support in RetroArch cores (lightguns, spinners, trackballs):
the Vectrex original games now look fantastic for the first time in RetroArch.
That's fantastic! I will have to take a look. I have not loaded the Vectrex emu, as I just barely remember these machines. I do remember seeing ads for them, and a few months ago I got to try one first hand at the Portland Retro Gaming expo. I was amazed at the titles that were not even vector that they tried to remake as vector.
Speaking of more vector, did you ever hear about VEC9, the first NEW vector arcade game in 30 years?!
-
Ha! The game not only looks amazing, but that premise is hilarious. They really nailed that cold war vibe in the commercial. I'll have to make a road trip to wherever this ends up.
-
@mediamogul said in Multiple mice support in RetroArch cores (lightguns, spinners, trackballs):
I tested the games you mentioned. 'Point Blank' refused to launch for me, 'Steel Gunner' loaded with persistent crosshairs generated by AdvanceMAME for P1 and P2 just as you said, but bizarrely, control of the AdvMAME crosshairs for P1 had no effect on the crosshairs for the game. Lastly, 'Zero Point' seemed to behave as it should, but it definitely had persistent crosshairs generated by AdvMAME for both players at all times with no second mouse present.
This might end up being something better addressed over at the AdvanceMAME forums, but it seems as though it may be a bug or perhaps that the light gun implementation for two player games is still somewhat immature. It would seem as though the ideal behavior would be to only generate crosshairs for a second player if a second mouse is found.Don't know what to say about Point Blank, It's running perfectly on my retropie. About stelle gunner you should follow the process of calibration described in this video and the P1 crosshair generated by the game will follow the P1 AdvanceMame crosshair (the P2 AdvanceMame crosshair will remain in the center of the screen).
But I think you are right, it should be a problem related to AdvanceMAME. -
@illando said in Multiple mice support in RetroArch cores (lightguns, spinners, trackballs):
About stelle gunner you should follow the process of calibration described in this video and the P1 crosshair generated by the game will follow the P1 AdvanceMame crosshair
Gotchya. Outside of that, the game seemed to run very well. Notice from the video that the second set of crosshairs are not visible, so it's either a config issue that we share, or a subtle difference between MAME and AdvanceMAME in how mice are detected.
-
@mediamogul
Not a real fix but I solved pressing "f" and "g" keyboard keys, placing the player2 crosshair in the bottom right corner. :)
I can confirm 'Point Blank' refused to launch on AdvanceMAME 3.6 but it works using AdvanceMAME 1.4 core. -
@illando said in Multiple mice support in RetroArch cores (lightguns, spinners, trackballs):
Not a real fix but I solved pressing "f" and "g" keyboard keys, placing the player2 crosshair in the bottom right corner. :)
Not a real fix, but an incredible simulation. ;)
I can confirm 'Point Blank' refused to launch on AdvanceMAME 3.6 but it works using AdvanceMAME 1.4 core.
Ah, good to know.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.