Build Your Own Arcade Controls Forum

Front End Support => MaLa Frontend => Topic started by: MotoChi on January 07, 2016, 03:12:35 pm

Title: USB Trackball & Spinner Problems
Post by: MotoChi 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
Title: Re: USB Trackball & Spinner Problems
Post by: BadMouth 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


Title: Re: USB Trackball & Spinner Problems
Post by: MotoChi 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.
Title: Re: USB Trackball & Spinner Problems
Post by: MotoChi 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.
Title: Re: USB Trackball & Spinner Problems
Post by: PL1 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 (http://forum.arcadecontrols.com/index.php/topic,108767.msg1154628.html#msg1154628) 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
Title: Re: USB Trackball & Spinner Problems
Post by: MotoChi 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.
Title: Re: USB Trackball & Spinner Problems
Post by: PL1 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
Title: Re: USB Trackball & Spinner Problems
Post by: MotoChi 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.