Build Your Own Arcade Controls Forum

Main => Main Forum => Topic started by: Sockser on February 26, 2017, 03:05:26 pm

Title: Connecting multiple trackballs for custom build
Post by: Sockser on February 26, 2017, 03:05:26 pm
I'm currently putting together a custom game in a custom cabinet (hopefully for MAGFest 2017) and the controls entail four trackballs (two for each player) plus like 2-4 buttons (still hashing out some details there). 

I currently have a big pile of HAPP trackballs being shipped to me (7 used ones for $90; a steal!) but in advance of that I'm trying to figure out how this thing is going to go together, electronically speaking.  Theoretically this is all going to be running my custom code on a RasPi, so I've got USB and GPIO to work with.  Is it possible for me to run four trackballs through USB and have linux identify them as four different devices I can read output from?  Worst case scenario, I can run two trackballs to an intermediary board that reports the exact data I need for my game but avoiding that would be nice.


edit:  Looks like the Optipac handles two trackballs, so I should be able to run two optipacs to satisfy my needs, right?
Title: Re: Connecting multiple trackballs for custom build
Post by: drventure on February 26, 2017, 08:49:51 pm
You should

I run two HAPP trackballs in my cabinet, both are seen as simple USB mice by windows.

Effectively, this means they both just control the mouse pointer as if they were one mouse.

But, dig a little deeper into the Windows API and you can get at the individual mouse devices separately. That's what MAME does.

As for linux, not sure, but I'd imagine it works very similarly.

Googling found this,

http://stackoverflow.com/questions/4012352/linux-dual-mice-multiple-mice-with-multiple-mouse-pointers (http://stackoverflow.com/questions/4012352/linux-dual-mice-multiple-mice-with-multiple-mouse-pointers)

so it definitely sounds like it's doable under linux, if a little convoluted.