Build Your Own Arcade Controls Forum

Main => Main Forum => Topic started by: walkingwolf on June 02, 2015, 08:42:53 am

Title: Bluetooth MAME
Post by: walkingwolf on June 02, 2015, 08:42:53 am
I am new to this and am in the early stages of developing my first MAME machine.

My wife put the kibosh on any plans for a cabinet so I am ploughing on with a mini PC approach.

I am trying to build 2 Bluetooth controllers so I can sit on the sofa and play. 

I am using this rather nice little component http://www.robotshop.com/uk/bluefruit-ez-key-bluetooth-hid-keyboard-controller-v12.html?gclid=CIe_qKX848UCFePItAodbDUA8A (http://www.robotshop.com/uk/bluefruit-ez-key-bluetooth-hid-keyboard-controller-v12.html?gclid=CIe_qKX848UCFePItAodbDUA8A)

The problem I have is the number of available inputs, all 12 are currently being used:
4 for the stick,
6 buttons
Start
Coin (I only need one of these so I will potential have a spare input for P2)

This is fine in game but if I want to navigate the menu I need a tab and a return button.

There's no IPAC style shift functionality that I can see.

Is there a way to configure a front end so that I can navigate using the buttons I already have?

What would be the best way to take advantage of the spare input on the P2 controler?

Currently using MAMEUIFX 0.162.

Thanks for the help!
Title: Re: Bluetooth MAME
Post by: Green Giant on June 02, 2015, 10:13:04 am
Well after digging around and looking at that bluefruit encoder, I would say your best option using what you wanna do is to add a third bluefruit device.  If the computer you build can handle 2 bluetooth devices with no lag, a third which just send 3-4 inputs should not change much if anything.

Your other option is to build the control panel box with the computer inside it so that you can have everything wired up directly and then use a wireless HDMI or some other wireless video technology.

Otherwise you could try a different bluetooth keyboard adapter like mentioned here: http://forum.arcadecontrols.com/index.php/topic,144818.msg1505320.html#msg1505320 (http://forum.arcadecontrols.com/index.php/topic,144818.msg1505320.html#msg1505320)
Title: Re: Bluetooth MAME
Post by: walkingwolf on June 02, 2015, 11:26:03 am
Thanks, that looks like it would be the dream solution.  I assume this would require an IPAC (or similar) in each controller as well as the keyboard adapter in each? 

I plan to use the mini PC to stream media to the TV as well so I have one of those mini Bluetooth keyboard/trackpads anyway.  It’s a high price to pay for a less clumsy solution.
Title: Re: Bluetooth MAME
Post by: Green Giant on June 02, 2015, 03:00:13 pm
Thanks, that looks like it would be the dream solution.  I assume this would require an IPAC (or similar) in each controller as well as the keyboard adapter in each? 

I plan to use the mini PC to stream media to the TV as well so I have one of those mini Bluetooth keyboard/trackpads anyway.  It’s a high price to pay for a less clumsy solution.
Looking at it some more and going off your design choices, I think you should stick with the bluefruit devices for your panel(s).  No matter what they are really cheap and pretty simple to setup.  Take a look at the below project where someone created two separate bluetooth gamepads
https://learn.adafruit.com/diy-bluetooth-gamepad/overview
I would double check whatever Bluetooth receiver you purchase for your computer though.  Probably want bluetooth 4.0 which isn't saying much because they are pretty cheap.

No matter what you should just need 3 bluefruit devices, one for player 1, one for player 2, and one for interface control which could easily be with player 1 controls.  If you want to build two completely independent controllers that is fine, just have player 1 use 2 bluefruit devices.  Putting a rechargeable batter on it seems pretty simple too.
Title: Re: Bluetooth MAME
Post by: walkingwolf on June 03, 2015, 06:50:43 am
So far I only have the one bluefruit board so my options are still open.

If I use the current setup for P2 then I can come up with a separate solution for P1.

The two board’s in the P1 stick is a sensible solution.

Also considering breaking down a PS3 controller. This may be a cheaper option as the Bluetooth, battery and charger are all included in a neat package. I am imagining this would be fairly straightforward but I’m probably wrong. I haven’t opened it up to see if my soldering skills are up to the challenge yet though.  There are also issues with getting the PS3 controller to connect via Bluetooth.  Currently having to connect and map each time I boot which is not a satisfactory solution.

Nothing is ever easy is it? 

When I started this project it was mainly to make a beautiful and functional sculpture.  I’m a woodworker and I had imagined that all the electronics would just fall into place without a whisper of discontent so I could get on with making a smart looking housing.
Title: Re: Bluetooth MAME
Post by: Green Giant on June 03, 2015, 10:46:53 am
So far I only have the one bluefruit board so my options are still open.

If I use the current setup for P2 then I can come up with a separate solution for P1.

The two board’s in the P1 stick is a sensible solution.

Also considering breaking down a PS3 controller. This may be a cheaper option as the Bluetooth, battery and charger are all included in a neat package. I am imagining this would be fairly straightforward but I’m probably wrong. I haven’t opened it up to see if my soldering skills are up to the challenge yet though.  There are also issues with getting the PS3 controller to connect via Bluetooth.  Currently having to connect and map each time I boot which is not a satisfactory solution.

Nothing is ever easy is it? 

When I started this project it was mainly to make a beautiful and functional sculpture.  I’m a woodworker and I had imagined that all the electronics would just fall into place without a whisper of discontent so I could get on with making a smart looking housing.
If you go for hacking a PS3 controller, I hope you are really good at soldering.  Tearing into one of those guys seems tricky with the very small connection points.

Otherwise you could just run a long USB cable to your computer when needed for the simplest solution.
Title: Re: Bluetooth MAME
Post by: Miskatonic on June 03, 2015, 11:44:44 am
So far I only have the one bluefruit board so my options are still open.

If I use the current setup for P2 then I can come up with a separate solution for P1.

The two board’s in the P1 stick is a sensible solution.

Also considering breaking down a PS3 controller. This may be a cheaper option as the Bluetooth, battery and charger are all included in a neat package. I am imagining this would be fairly straightforward but I’m probably wrong. I haven’t opened it up to see if my soldering skills are up to the challenge yet though.  There are also issues with getting the PS3 controller to connect via Bluetooth.  Currently having to connect and map each time I boot which is not a satisfactory solution.

Nothing is ever easy is it? 

When I started this project it was mainly to make a beautiful and functional sculpture.  I’m a woodworker and I had imagined that all the electronics would just fall into place without a whisper of discontent so I could get on with making a smart looking housing.
If you go for hacking a PS3 controller, I hope you are really good at soldering.  Tearing into one of those guys seems tricky with the very small connection points.

Otherwise you could just run a long USB cable to your computer when needed for the simplest solution.

+1, the ps3, ps4, xbox 360 and xbone controllers are a pain in the ass to hack, seriously. If you are in any doubt about your soldering skills, don't bother. They're all glossed over with a lacquer that seems pretty much solder resistant, too, so by the time you've melted that down you've a whole lot of mess on the contact points. Waste of time, imo, seriously (and I know what I'm doing with soldering).
Title: Re: Bluetooth MAME
Post by: PanicAcid on June 03, 2015, 01:06:37 pm
I would use 3 BlueFruits in the setup, have one for each controller and then have an additional 'remote' simply for adding credits.

Or you could hack a mini wireless keyboard that has a USB receiver you can cut out the worry of Bluetooth bandwidth by simply wiring one or two of the key switches up to an arcade style button(s) and configure whatever key you hook into as the keypress in your emulator to add credits to P1 or P2.
Title: Re: Bluetooth MAME
Post by: welash on June 03, 2015, 10:54:08 pm
If you are are comfortable with arduino or some other microcontroller, it looks like you can also send key codes using the serial port.  They have a tutorial at https://learn.adafruit.com/introducing-bluefruit-ez-key-diy-bluetooth-hid-keyboard/sending-keys-via-serial (https://learn.adafruit.com/introducing-bluefruit-ez-key-diy-bluetooth-hid-keyboard/sending-keys-via-serial).  You would have to write a little code to scan for keypresses, and send to the serial port on whatever microcontroller you use.  Might add some delay, so I wouldn't use it for game buttons, but things like coin and admin should be fine.
Title: Re: Bluetooth MAME
Post by: walkingwolf on June 04, 2015, 07:58:27 am
I have been looking into the microcontroller option.  It looks like the most elegant solution. I don't have any experience of it but it looks like a fun thing to learn.

I can program multiple sequential button presses as well. Dedicated one press "Shinku Hadoken" button?