Please do not post a support request without first reading and following the advice in

Trackball working in mame4all but not Advmame??

  • I am running a retropie 2 with an iPac 2 , usb trackball and spinners.
    I got everything working perfectly on mame4all , downloaded some Advmame Roms. The trackball and spinner are not working in Advmame try to config hitting tab but it won't recognize the trackball when I try to enter. If someone could point me in the right direction to get this working that would be great,
    Thanks, Rob

  • You definitely need to configure the controls in the advmame.rc file for trackball/spinner controls to work correctly in AvanceMAME. Look for these entries and correct them as follows:

    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_mousetype[0] ps2
    device_raw_mousetype[1] ps2
    device_raw_mousetype[2] ps2

    You want "raw" input capture for the mouse, and you want them set to "ps2". Depending on how your setup detects the devices, they may come in as Mouse0, 1, 2 etc. So, just set all of them this way.

    Then, further down into the .rc file, you specify which input is used by MAME like this:

    input_map[p1_trackballx] mouse[0,x] mouse[1,x] mouse[2,x]
    input_map[p1_trackbally] mouse[0,y] mouse[1,y] mouse[2,y]
    input_map[p1_dialx] mouse[0,x]
    input_map[p2_dialx] -mouse[0,y]

    You see how I have mouse 0, 1, and 2 all mapped in the trackball x and y? That's because, if I had an external mouse plugged in, my trackball might shift over to 1 instead of 0. Later, if I unplug the external mouse, it shifts back to 0. By specifying all three possibilities (I also have spinners), it doesn't matter--all of the mouse inputs map as a trackball.

    The dial inputs are what advancemame calls the spinners. For my setup, mouse 0 was consistently my spinners. So, Player 1 would get the x-axis and player 2 would get the y axis, although I noticed that the y axis was spinning backwards, so I added the minus in front to reverse it.

    Your setup will be different I am sure, but you should be able to get the inputs working this way. Once configured in the .rc file, you can play with sensitivity settings using the in-game MAME GUI.

    One final note--the polling rate isn't fast enough by default. The trackball and spinners have way more resolution than was being captured causing a good fast spin to register as a backspin until it slows down. That can be very frustrating. You can increase the polling rate to fix this. Add: usbhid.mousepoll=2 to your /boot/cmdline.txt.

  • Right on I got everything up and rocking....Thanks for the help,appreciate it

  • Thanks Caver, I tried this last night and it worked superbly! I really appreciate the help and tutorial. Now my only issue is figuring out where to drill a hole to add the spinner. :)

  • @Riverstorm About the hole for the spinner--You probably already have an idea about that, but if I could do it over again, I might try a little play-testing with a cardboard panel to make sure my spinners are not mounted too close. It depends on your panel, of course, but I wish I had a little more room around my joystick to keep flailing hands from bumping into the spinners!

  • @caver01 said:

    @Riverstorm I might try a little play-testing with a cardboard panel to make sure my spinners are not mounted too close.

    Yes, I definitely need to do that. I was looking at it last night but didn't want to be hasty about drilling a hole since it's painted, clear coated and a clear acrylic plate on top. It's kind of a one shot deal if I mess it up.

    My layout is tight and I don't know if trying to squeeze it up between the joystick and buttons or down a little lower. I have plenty of room on the right side (button side) but I think most spin with the left and press buttons with the right. The spinner was an afterthought once the case was mostly completed so it's going to be a bit awkward no matter where I place it. Not to mention for me it's indeed almost inevitable I will have flailing hands once I start playing. :)

  • Hi!

    I've tried this configuration:

    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
    input_map[p1_trackballx] mouse[0,x]
    input_map[p1_trackbally] mouse[0,y]
    input_map[p2_trackballx] mouse[2,x]
    input_map[p2_trackbally] mouse[2,y]
    input_map[p1_dialx] mouse[1,x]
    input_map[p2_dialx] mouse[3,x]

    In order to have one trackball and one spinner for every player.

    Trackballs work fine, I can play Marble Madness perfectly alone or with a friend.

    The problem is with the spinners. If I play Arkanoid 1P it uses player one's spinner. But if I try to play 2P, the player two's spinner does not work and is controlled with player one's. Spinner too.

    Entering in the TAB menu, input (this game) option, there is configuration for:

    dial dec (left or j:stick:x+)
    dial inc (right or j:stick:x-)
    dial 2 dec (d or j2:1:1+)
    dial 2 inc (g or j2:1:1-)

    But neither d nor g work.

    Summarizing, both player one and two can be controlled via player one's keys, pad or spinner.

    It is a game's bug or I am doing something wrong??

    Thanks in advance!

  • Well, continue trying and with Millipede I have the same problem.

    Only player one's trackball works for both players. Is as if games that players plays separately can only be controlled with player one's controlers, but then I don't understand why in the TAB menú appear player two's controls and they do not work, even the keyboard ones...

  • administrators

    The original arcade game only has and supports one trackball.

  • Then this would be the reason, but as i saw in the TAB menú player one's and two's spinner configurations...


  • administrators

    maybe because the hardware supports more than one controller.

  • I've been searching in google images of he Arkanoid's CPO and all of them have only one spinner, so I asume that the game does not support the second one.

    So I will not worry anymore about it, one less mouse to buy...

  • I have seen this too. Some games, no matter what you try, want to use the single control.

    A game like Golden Tee for example supports 4 players, but they all take turns using the single trackball. That makes sense because they take turns. For games with simultaneous control, like Rampart (multiple trackballs), or Blasteroids (multiple spinners) you can usually get them working fine on separate controls.

    Also, the MAME gui allows some adjustment (analog input) but I have never had luck choosing inputs--they need to be mapped first in the .rc file. Then, use the gui to adjust sensitivity.

    Finally, once I have the analog controls working the way I want, I always go into the gui menu and remove the joy + - inputs so guests don't accidentally use the joystick by mistake.

    By the way, you can do some amazing putting with a spinner on Golden Tee! ;-)

  • I'm sorry if this is a noob question, but where do I find the advmame.rc file to edit it?

  • @Abqshark I always connect via samba share to the configs, but the .rc file I edit for advmame 1.4 is /opt/retropie/configs/mame-advancemame/advmame-1.4.rc

  • @Roberto Did you have to do anything to get it working with mame4all?

  • My trackball (X-Arcade Tankstick) worked natively in mame4all but not in Advmame even after making the changes recommended above. My spinner (Turbo Twist 2) also worked natively in mame4all but not Advmame.

    Big problem I'm having is getting the spinner working in Tron. It's working in Tempest but in Tron, I hit TAB for the configuration menu and can't get the spinner to register in the DIAL settings. Appreciate any tips or thoughts as I really want to get Tron and DOT working!

  • @buggydad Yea I think it is ok for me too in mame4all. Haven't tried a trackball game yet. AdvMame appears to be gone now in RetroPi 4.0 so I guess lib-retro is the new hotness

  • @buggydad I thought that spinner doesn't work in mame4all. How did you make it work? Thanks.

  • @hakan1708 Spinner (Turbo Twist 2) worked out of the gate in mame4all on the games I tested (Super Sprint and Tempest). I'm using RetroPie 4.0 on a Raspberry 2. Can't seem to get it recognized in Tron or Discs of Tron, though. Anyone have any luck with that?

Log in to reply

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.