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: USB Trackball & Spinner Problems  (Read 7809 times)

0 Members and 1 Guest are viewing this topic.

MotoChi

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 11
  • Last login:December 15, 2016, 12:06:30 pm
  • I want to build my own arcade controls!
USB Trackball & Spinner Problems
« on: January 07, 2016, 03:12:35 pm »
I'm new to so much of this, a little overwhelmed and lost.  Just built my first cab.  So much to learn.

For the life of me, I can't figure out how to get a USB TrackBall or a USB Spinner to work in a MAME game.  Windows see them.  In MALA, under controls, mouse, I have the checkbox to enable mouse to scroll the game list.  Can't find any other settings for the mouse.

The command line for MAME in Mala has no mention of a mouse.

I created my game list before a mouse was connected to the system.

Any help would be much appreciated.  And apologies if this has been asked before, searched, but just got more confused with what I found.  Thanks.

System:
Mala 1.74
Mame 0.161
Ultimarc U-Trak connected through USB
Ultimarc SpinTrak connected through USB
Ultimarc UltraStik 360 connected through USB

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:April 22, 2024, 09:54:06 am
  • ...
Re: USB Trackball & Spinner Problems
« Reply #1 on: January 07, 2016, 03:30:01 pm »
Your problem has nothing to do with Mala.

You need to get the mouse working in MAME and Mala will not do that for you.
Look in your mame folder for mame.ini
Open it in windows notepad
Make sure mouse is enabled (it will have a 1 next to it.  a 0 means it's disabled.
You'll also probably want to have multimouse enabled if you have different devices showing up as a mouse.

EDIT: If you don't have a mame.ini file in your mame folder then....

open notepad, type:
Code: [Select]
mame.exe -cc
when you go to save it, save it as "all file types" and add the extension .bat to the name.
This is a batch file.
Put it in the same folder as mame.exe
double click on it
that should create mame.ini


« Last Edit: January 07, 2016, 03:33:35 pm by BadMouth »

MotoChi

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 11
  • Last login:December 15, 2016, 12:06:30 pm
  • I want to build my own arcade controls!
Re: USB Trackball & Spinner Problems
« Reply #2 on: January 07, 2016, 03:38:09 pm »
Thank you very very much, I'll try this tonight when I get home from work.

Apologies for posting this in Mala section, since it appears to be a MAME problem.

MotoChi

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 11
  • Last login:December 15, 2016, 12:06:30 pm
  • I want to build my own arcade controls!
Re: USB Trackball & Spinner Problems
« Reply #3 on: January 07, 2016, 11:41:06 pm »
I had a mame.ini file, both the mouse and the multimouse were set to 0, set both to 1.

Plugged in USB Spinner only, booted up box, fired up a spinner game, all good.  Shutdown box, unplugged spinner, plugged in USB Trackball, booted box, fired up a trackball game.  All good.

Shutdown box, plugged both USB Spinner and USB Trackball (and still left my USB mouse plugged in, giving a total of 3 USB mouse devices), fired up box, neither a trackball or spinner game worked at this point.

Is it possible to have 3 USB mouse devices plugged in at same time (mouse, spinner, and trackball) and work?  Or do I need to only have a trackball or spinner plugged in depending on usage?

Thanks.

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9404
  • Last login:Today at 03:14:06 am
  • Designated spam hunter
Re: USB Trackball & Spinner Problems
« Reply #4 on: January 08, 2016, 02:38:06 am »
Two ways to approach this:

1. Multimouse enabled (the hard way)

Multimouse treats each optical encoder as a separate device. (picture each device controlling it's own unique mouse pointer)

Each MAME input only recognizes the one device axis mapped to it.

For example, if the spinner is Mouse 2's X-axis and the trackball is Mouse 3, turning the spinner will not be seen by a MAME input mapped to Mouse 3's X-axis

If you unplug the USB cables, windows can (and often will) change the device number/order.

If you need to have multimouse enabled and want to plug/unplug the USB cables without remapping the controls, look into DrVenture's excellent ControllerRemap utility.

2. Multimouse not enabled (the easy way)

Windows adds the same-axis inputs from multiple (up to 8 IIRC) optical encoders to control just one mouse pointer.

For example, if you turn the spinner 4 transitions left (X-axis) and your arm accidently nudges the trackball 2 transitions right (X-axis) and 1 transition up (Y-axis), Windows will add the same-axis inputs together (X-axis: 4 left + 2 right = 2 left and Y-axis: nothing + 1 up = 1 up) and that's what MAME will see. (2 left, 1 up)

Possible downsides to this approach are:

* The accidental nudge described above interferes with gameplay
(not likely if you arrange your controls properly on the panel  ;D)

* You want to configure a spinner game for two player simultaneous play like Pong
(one player on spinner, the other on trackball will only work right with Multimouse enabled)


Scott

MotoChi

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 11
  • Last login:December 15, 2016, 12:06:30 pm
  • I want to build my own arcade controls!
Re: USB Trackball & Spinner Problems
« Reply #5 on: January 08, 2016, 10:22:44 am »
Thanks PL1, very helpful info.

I'll probably go with option 2, multimouse not enabled, at least at first.  My arrangement isn't perfect (was hard to fit two joysticks, 10 action buttons, trackball and spinner on the long side of a cocktail table side), but the trackball and spinner arrangement is good enough to minimize accidental nudges.  I also don't plan to do the pong scenario you described.  But thanks for covering all downsides, helps me understand the bigger picture better.

In regards to option 1, should I try that, just wanna make sure I understand what you are saying.

With each device independently mapped to an id (say mouse id1, trackball id2, spinner id3), when I launch a trackball game, within the game controller option screen, I'll need to tell it to use id2 (trackball mapping) for the control.  And if I launch a spinner game, within the game controller option screen, I'll need to tell it to use id3 (spinner mapping) for the control.  And a danger of this is unplugging usb devices can reorder my mapping.  And the solution to that is the ControllerRemap app.

I'd read about what seems to be a similar program to ControllerRemap, JoyID's.

Again, really appreciate all the help.  I built a cocktail cab as a Christmas gift for my wife, never ventured into all this before, a little overwhelmed, but loving all the challenges.
« Last Edit: January 08, 2016, 04:18:53 pm by MotoChi »

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9404
  • Last login:Today at 03:14:06 am
  • Designated spam hunter
Re: USB Trackball & Spinner Problems
« Reply #6 on: January 08, 2016, 08:36:19 pm »
unplugging usb devices can reorder my mapping.  And the solution to that is the ControllerRemap app.
You've got it.

To be clear your MAME settings/mappings (i.e. Mouse 3 X-axis) won't change, but Windows can/will change the labels (Mouse 1/Mouse 2/Mouse 3) that MAME uses to identify devices.


Scott

MotoChi

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 11
  • Last login:December 15, 2016, 12:06:30 pm
  • I want to build my own arcade controls!
Re: USB Trackball & Spinner Problems
« Reply #7 on: January 19, 2016, 08:58:38 am »
Finally got a few hours yesterday to set up Dr. Venture's ControllerRemap utility with Mala.

Set up was for a cocktail table, U360's on each end via USB. On the long side a U360 via USB, trackball and spinner via usb, and a mini grip via UltiMarc I/0 (connected as player 2 on the board, then USB).

Before setting up ControllerRemap, I'd never been able to use 1 joy and spinner/track at same time, was always plugging/unplugging.

Now EVERYTHING is working perfect.  Even have multi mouse enabled, so no accidental track/spinner nudges.  What an amazing utility.  Great documentation.  Very straight forward.

I was never able to get the /mame argument to working with Mala (but would work command line).  However, the batch command method and having Mala call that worked just fine.

Thanks for pointing me in the direction of that utility.