Build Your Own Arcade Controls Forum

Software Support => GroovyMAME => Topic started by: MrD on November 04, 2015, 10:23:32 am

Title: GroovyArcade / Linux - invert/reverse mouse?
Post by: MrD on November 04, 2015, 10:23:32 am
I've just started setting up an old MAME machine using GroovyArcade.   I've being using MAME since the early years, and I can't believe how much easier this is to setup than DOS! 

MY control panel has both a trackball, and a spinner.  They are mounted upside down (so left is right, up is down).  Under DOS I was able to add an option to the driver to flip all the directions. 

The closest instructions I've found say that for Arch, you adjust the Section "InputDevice" in your /etc/X11/xorg.conf  and add the following:

Option "FlipXY" "boolean"
Enable/disable swapping the X and Y axes. This transformation is applied after the InvX, InvY and AngleOffset transformations. Default: off.
Option "InvX" "boolean"
Invert the X axis. Default: off.
Option "InvY" "boolean"
Invert the Y axis. Default: off.

So it should look similar to this: 
Section "InputDevice"
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/input/mice"
    Option         "ZAxisMapping" "4 5 6 7"
    Option         "FlipXY" "True"
EndSection

When I look at my xorg.conf file there aren't any sections for "mouse".  I know both the trackball and spinner are recognized as mice, since I can move the point when it starts (just reverse directions).   I know I can go into each game in GroovyMame and reverse the directions, but I'd much rather fix it from the start.  Then it would be correct for everything.

Does anyone have any thoughts on this?  Do I just add the above anyway?  how do I know the device and driver?
Title: Re: GroovyArcade / Linux - invert/reverse mouse?
Post by: Calamity on November 10, 2015, 04:02:42 am
I'm sure this has been discussed, just can't remember where.
Title: Re: GroovyArcade / Linux - invert/reverse mouse?
Post by: MrD on November 10, 2015, 10:22:56 am
Maybe my best options is to change the wiring itself on my spinner and mouse ?

I've been setting up an upright Missile Command, and I just had to wire up the trackball (restoring a completely gutted cabinet).  I didn't have the original wiring so I had to do some testing on the pinouts.   Each axis had 4 wires - GND, +, and the two wires for direction.  Maybe is is as simple as swapping the other two? I know that would work on the MC.  That would solve it from the hardware side, and not the software.    These were hacked mice though, so I'm not sure how easy it's going to be.   

The missile command used 4 wires for each axis.  PS/2 Mice only use 4 wires, but the signal combined both X and Y in one packet.  I'll probably have to swap the wires at the rollers of each axis to make this work.  If it would work at all.  I guess it's worth a shot.
Title: Re: GroovyArcade / Linux - invert/reverse mouse?
Post by: PL1 on November 10, 2015, 07:10:26 pm
Check out this thread (http://forum.arcadecontrols.com/index.php/topic,142410.msg1475279.html#msg1475279) for information about quadrature waveforms.

You might need to cut and jumper traces to swap waveforms on your mouse.

Please post pics of the PCB and the part number on the encoder chip if you need help figuring it out.


Scott
Title: Re: GroovyArcade / Linux - invert/reverse mouse?
Post by: MrD on November 11, 2015, 09:58:53 am
I opened up my CP last night.   I set this up originally about 10 years ago.  My spinner was a hack of a mouse.  Not an optical mouse.  It's an old mouse.  Only 3 wires going into it.  It's all contained inside a small black piece that the shaft sticks out from.  The trackball, was also hacked.  That could probably be modified, but, I can't hack one without the other.

I think i'm back to figuring out an Arch Linux solution.   This is where I got my original info:
https://bbs.archlinux.org/viewtopic.php?id=89884

I don't a lot about Arch.   It would be easier for me to use DOS!  That being said, my issue is that the xorg.conf file doesn't include any  "inputdevice" references to the mice.   They both work, as I can move the point when GroovyArcade initials starts, and they both work inside a game. 

Can I simply add an inputdevice section?  What does I use as the identifier?  Mouse0 and Mouse1? What about the device?   

These are both PS/2 connected mice.  If that matters.  Maybe xorg.xconf isn't the correct place to start?
Title: Re: GroovyArcade / Linux - invert/reverse mouse?
Post by: MrD on November 17, 2015, 09:07:32 pm
I tried playing around with xorg.conf. It didn't seem to make any difference.

I'm not that experienced with Arch.  Can anyone tell me where or what can be configured for a PS/2 Mouse? And where ?  It's definitely being recognize as I can use the trackball and spinner in groovymame.  There must be settings someplace.