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: GroovyArcade / Linux - invert/reverse mouse?  (Read 1887 times)

0 Members and 1 Guest are viewing this topic.

MrD

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 134
  • Last login:May 20, 2020, 04:34:05 pm
  • I want to build my own arcade controls!
GroovyArcade / Linux - invert/reverse mouse?
« 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?

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7414
  • Last login:April 10, 2024, 02:02:31 pm
  • Quote me with care
Re: GroovyArcade / Linux - invert/reverse mouse?
« Reply #1 on: November 10, 2015, 04:02:42 am »
I'm sure this has been discussed, just can't remember where.
Important note: posts reporting GM issues without a log will be IGNORED.
Steps to create a log:
 - From command line, run: groovymame.exe -v romname >romname.txt
 - Attach resulting romname.txt file to your post, instead of pasting it.

CRT Emudriver, VMMaker & Arcade OSD downloads, documentation and discussion:  Eiusdemmodi

MrD

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 134
  • Last login:May 20, 2020, 04:34:05 pm
  • I want to build my own arcade controls!
Re: GroovyArcade / Linux - invert/reverse mouse?
« Reply #2 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.

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9406
  • Last login:Today at 01:45:18 pm
  • Designated spam hunter
Re: GroovyArcade / Linux - invert/reverse mouse?
« Reply #3 on: November 10, 2015, 07:10:26 pm »
Check out this thread 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
« Last Edit: November 10, 2015, 07:17:13 pm by PL1 »

MrD

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 134
  • Last login:May 20, 2020, 04:34:05 pm
  • I want to build my own arcade controls!
Re: GroovyArcade / Linux - invert/reverse mouse?
« Reply #4 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?

MrD

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 134
  • Last login:May 20, 2020, 04:34:05 pm
  • I want to build my own arcade controls!
Re: GroovyArcade / Linux - invert/reverse mouse?
« Reply #5 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.