(SOLVED) AdvMAME - 2 player Marble Madness Happ usb trackball(s)

Questions about arcade game emulation support on the ARpiCADE (MAME, DAPHNE, Picodrive, etc...)

Moderator: dee2eR

Post Reply
User avatar
tparis
Community Member
Community Member
Posts: 6
Joined: Sun Sep 13, 2020 11:57 am
Location: San Diego

(SOLVED) AdvMAME - 2 player Marble Madness Happ usb trackball(s)

Post by tparis » Sun Sep 13, 2020 12:06 pm

I am slowly getting through a scratch marble madness build using the ARpiCADE.

Things are going great. I got the trackballs working, adjusted the sensitivity and they feel pretty good. Next will be to rotate the movement 45 degrees but my problem is running a two player game

I am using AdvMAME and have both trackballs plugged in but both trackballs only control player one. If I initiate a two player game, player two has no control. AdvMAME sees both trackballs as one.

Do I need to configure some kind of multi-mouse detection or a p1 & pl2 mouse input in the .rc file for AdvMAME?

Thank you
Last edited by tparis on Wed Sep 23, 2020 4:30 am, edited 2 times in total.

dee2eR
Inventor
Inventor
Posts: 1160
Joined: Tue Aug 22, 2017 2:07 pm

Re: 2 player marble madness Happ usb trackball(s)

Post by dee2eR » Sun Sep 13, 2020 11:10 pm

I'm not sure offhand. I can't remember for AdvMAME but I know MAME 172 supports multi mouse, it's probably worth trying 172 if you haven't already done so.

Have you already tried setting up the p2 mouse in the AdvMAME menus while the game is running? Short of that you could try setting up the mice manually in /home/pi/.advance/advmame.rc there's setup options for up to 4 mice in there, not sure if there's a further trick to it.

Sorry I don't have an easy answer as I only have 1 trackball. Multi mouse is definitely possible as I've had 2 Aimtraks going on it before... it's been a while though.

User avatar
tparis
Community Member
Community Member
Posts: 6
Joined: Sun Sep 13, 2020 11:57 am
Location: San Diego

Re: 2 player marble madness Happ usb trackball(s)

Post by tparis » Sun Sep 20, 2020 2:07 pm

Appreciate the response. I couldn’t get the USB trackballs to work in 172 so tried AdvMAME and now they both work but like I described both control player one.

While in Marble Madness and accessing the MAME menu I do see controller options and a pre-filled out input for a second trackball but if the USB controller sees both trackballs as one this seems mute.

I believe I must start with the .rc file like you suggested and also explore other methods of multi-mouse detect.

I appreciate your response. I will keep at it and report my findings

User avatar
tparis
Community Member
Community Member
Posts: 6
Joined: Sun Sep 13, 2020 11:57 am
Location: San Diego

Re: 2 player marble madness Happ usb trackball(s)

Post by tparis » Mon Sep 21, 2020 6:41 am

AdvMAME supports multi mouse however my problem persists where I have 2 USB trackballs and they both control player 1.

I recently read that you can add a configuration to advmame.rc to configure the trackballs so that you will have a trackball assigned per player.

So as per the post I have edited /home/pi/.advance/advmame.rc with the following lines below but it still doesn't work!! :(
Do I also need to edit advmame-0.94.0.rc as well?

------------------------
space invader Apr 16, 2016, 4:05 AM
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.
--------------------------------
Where am I going wrong here?

User avatar
tparis
Community Member
Community Member
Posts: 6
Joined: Sun Sep 13, 2020 11:57 am
Location: San Diego

Re: AdvMAME - 2 player Marble Madness Happ usb trackball(s)

Post by tparis » Tue Sep 22, 2020 3:50 am

Ok so I edited the following files with the mouse settings above and I still can not get this to work.
Each USB trackball is seen as 1 rather than 2. Do I need to create a mame.ini file and enter multi-mouse settings there?
advmame.rc
advmenu.rc
advmame-0.94.0.rc
advmess.rc
advmame.nosdl.rc

dee2eR
Inventor
Inventor
Posts: 1160
Joined: Tue Aug 22, 2017 2:07 pm

Re: AdvMAME - 2 player Marble Madness Happ usb trackball(s)

Post by dee2eR » Wed Sep 23, 2020 2:10 am

OK, having checked the lightgun thread I can confirm AdvMAME will work with 2 mice.

I would try changing:
input_map[p2_trackballx] mouse[2,x]
input_map[p2_trackbally] mouse[2,y]
to read:
input_map[p2_trackballx] mouse[1,x]
input_map[p2_trackbally] mouse[1,y]
As at the moment you have them set up as mouse 1 (index 0) and mouse 3 (index 2) which may or may not be part of the issue. Not knowing how your hardware is actually connected up I'm guessing, but it looks like you have 4 mice setup in that rc file (including the spinners) - this may not be how you want it set up. I think you may have it setup with 1 trackball being P1 trackball and half of the other trackball trying to be P1 spinner at the moment.

You will not need to edit advmame-0.94.0.rc (unless you're using MAME 0.094).

You may need to adjust advmame.nosdl.rc if any of the games you're using are in the nosdl array in /boot/launchers/advmame.sh

User avatar
tparis
Community Member
Community Member
Posts: 6
Joined: Sun Sep 13, 2020 11:57 am
Location: San Diego

Re: AdvMAME - 2 player Marble Madness Happ usb trackball(s)

Post by tparis » Wed Sep 23, 2020 2:19 am

I was typing my post when you replied. I will try what you wrote.
I am just running 2 trackballs. Its a marble madness scratch build so looks just like the regular system 1 cab with a marble madness control panel.
OK, having checked the lightgun thread I can confirm AdvMAME will work with 2 mice.

I would try changing:
input_map[p2_trackballx] mouse[2,x]
input_map[p2_trackbally] mouse[2,y]
to read:
input_map[p2_trackballx] mouse[1,x]
input_map[p2_trackbally] mouse[1,y]

In the command prompt I was able to determine that the pi did indeed see both USB trackballs as separate.

cat /dev/input/mouse0
cat /dev/input/mouse1

I used this command to figure out that left trackball was mouse0 and right was mouse1

Now I just need to figure out what .rc file to edit and what the proper control rule I need to enter to get both trackballs working in a two player game of marble madness.

This is so frustrating.

User avatar
tparis
Community Member
Community Member
Posts: 6
Joined: Sun Sep 13, 2020 11:57 am
Location: San Diego

Re: AdvMAME - 2 player Marble Madness Happ usb trackball(s)

Post by tparis » Wed Sep 23, 2020 2:42 am

device_mouse raw
device_raw_mousedev[0] /dev/input/mouse0
device_raw_mousedev[1] /dev/input/mouse1
device_raw_mousetype[0] ps2
device_raw_mousetype[1] ps2

input_map[p1_trackballx] mouse[0,x]
input_map[p1_trackbally] mouse[0,y]
input_map[p2_trackballx] mouse[1,x]
input_map[p2_trackbally] mouse[1,y]

THANK YOU SO MUCH!!!!

Your input calibration fixed it. When you're a noob like me it's so frustrating. Appreciate all your help!!

Post Reply