Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Raspberry Pi 3 - Mini Pac wiring issue with joystick + buttons  (Read 4750 times)

0 Members and 1 Guest are viewing this topic.

gstuto

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
  • Last login:May 22, 2017, 05:48:57 pm
  • I want to build my own arcade controls!
Hi all, I'm new to this forum and appreciate all of the support on here to those who are in need of help! I've been reading a ton on here and have been able to get by on my arcade cab assembly without having to make a post. Unfortunately I've hit a wall and need some help.

I have a Raspberry Pi 3, with Retropie installed, and a mini pac to facilitate the joystick / buttons setup.

Yesterday I finished wiring the ground and 'normally open' connection of both the first player and second player controls. After firing up the Pi, it said that it only detected 1 gamepad. I went ahead and tried to configure the controls, and only about half of the buttons / joystick controls worked.

I went ahead and re-secured the grounding, made sure everything was wired up, and even unplugged all of the grounding to the player 2 controls just to isolate the problem to player 1, with the goal of getting all player 1 controls to work. I fired up the Pi again, one gamepad was detected, and still 5 of controls (1 joystick, 4 buttons) were not working when trying to configure my input.

The attached photos show how it is currently setup. I only have player 1 controls hooked up (9 buttons + 4 joystick). I have the ground from the controls going into Pin 9, and the ground from the mini pac connection going into Pin 39.

I've noticed that the ground connection to the Pi, in Pin 9, is a bit loose compared with that of the one plugging into Pin 39 from the Mini Pac connection. Could this be the issue? If so, how do I go about making for a tighter connection?

Also, any reason why it was not detecting two gamepads when I fired it up the first time with both player 1 and player 2 controls grounded and hooked up to the Mini Pac?

The fourth photo is that of the the last link of a daisy chain. This isn't what I am plugging into the ground of the Pi 3 right now, but in the event I do, how would I go about securing it to the pin?

I know there's a few different questions here, but I do appreciate any and all help on this subject. Thank you so much.

mahuti

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 2757
  • Last login:March 02, 2022, 09:51:19 pm
  • I dare anything! I am Skeletor!
Re: Raspberry Pi 3 - Mini Pac wiring issue with joystick + buttons
« Reply #1 on: May 18, 2017, 01:08:09 pm »
A few questions:

1. What Mame version will you be using?

2. Are you planning to use console emulators (NES, PSX, Genesis, Atari, etc)

3. What frontend will you be using?


Quote
it said that it only detected 1 gamepad.... any reason why it was not detecting two gamepads when I fired it up the first time with both player 1 and player 2 controls grounded and hooked up to the Mini Pac?

As far as I know, the MiniPac is a keyboard encoder, not a 2-player gamepad encoder, and will basically work like a keyboard under Retropie. Retropie sees it as one gamepad when you push a button down, unlike a 2-player Xin-mo gamepad encoder in which console emulators will see player one and two controls automatically based on the player-1 configuration.

If you're not using console emulators, and only using Mame, configuration in Retropie is pretty unimportant (except for using the controls in the EmulationStation/Attractmode UI) as you can do all of the Mame configuration in the 'tab' menu. If you're going to use console emulators, then there's a bit more setup required.

Quote
I have the ground from the controls going into Pin 9, and the ground from the mini pac connection going into Pin 39.

If I'm reading this right, it sounds like you're wiring ground to the GPIO, and also wiring the Minipac to the GPIO? If so, don't do this.

http://www.ultimarc.com/mp_inst.html The wiring diagram for the Minipac shows ground on the board. You do not need to ground the Minipac to the Raspberry Pi, and you do not need to ground the controls to the Raspberry Pi. The grounds from the controls should only need to go back to the Minipac.

If you have an encoder (like you do) you do not need the Pi's GPIO pins for anything related to the controls. The encoder takes care of this.

Just so I'm clear: All grounds from all your controls should feed directly back into the MiniPac's ground pin. The mini pac  should not be connected back to the PI, except through the USB cable.

Regarding why some buttons would work, and others would not... id say first remove the grounding stuff to the Pi (which may not matter). If there is still issues after that, then post back.

Welcome to the boards!

 


Raspberry Pi, AttractMode, and Skeletor enthusiast.

gstuto

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
  • Last login:May 22, 2017, 05:48:57 pm
  • I want to build my own arcade controls!
Re: Raspberry Pi 3 - Mini Pac wiring issue with joystick + buttons
« Reply #2 on: May 18, 2017, 01:27:03 pm »
First and foremost, thank you for your very detailed response, mahuti! You rock!

Quote
A few questions:

1. What Mame version will you be using?

2. Are you planning to use console emulators (NES, PSX, Genesis, Atari, etc)

3. What frontend will you be using?

1. I will be using mame2003 for my .78 set.

2. Yes, I will also be using Atari, NES, Genesis, SNES, Neo Geo, Game Boy, and Game Gear.

3. I am using the latest version of Retro Pie for my front end.

If I set the controls in the 'tab' menu on Mame, will they save in event the Rasphberry Pi reboots / shuts down? Also, I've poked around the 'Retroarch' menu as I've read this is how to go about configuring the custom key maps, but I'm a bit confused on how it all works. In short, is there a way to configure controls for each emulator?

Yes, currently I am wiring both the ground and the Minipac 'ground' wire to the Pi's GPIO. I am unsure how to ground these two wires otherwise?

Apologies again if some of these questions are a bit too novice. It is my first time wiring anything :-)

Thank you for the warm welcome!

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Online Online
  • Posts: 9394
  • Last login:Today at 11:35:55 am
  • Designated spam hunter
Re: Raspberry Pi 3 - Mini Pac wiring issue with joystick + buttons
« Reply #3 on: May 18, 2017, 01:37:03 pm »
As far as I know, the MiniPac is a keyboard encoder, not a 2-player gamepad encoder, and will basically work like a keyboard under Retropie.
Minor clarification: The MiniPac is a hybrid keyboard/gamepad/optical encoder, but like you said it doesn't show up as a 2-player gamepad.
Quote from: Ultimarc BuyersGuide.pdf
Our current boards are much more than simply keyboard encoders and have features such as multi-operability of keyboard, game controller and mouse controls on one board,

If I set the controls in the 'tab' menu on Mame, will they save in event the Rasphberry Pi reboots / shuts down?
Yes. When you make a change in the 'Tab' menu, MAME saves it to the .ini file for that game.   ;D


Scott
« Last Edit: May 18, 2017, 01:39:44 pm by PL1 »

mahuti

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 2757
  • Last login:March 02, 2022, 09:51:19 pm
  • I dare anything! I am Skeletor!
Re: Raspberry Pi 3 - Mini Pac wiring issue with joystick + buttons
« Reply #4 on: May 18, 2017, 01:41:03 pm »
Quote
The MiniPac is a hybrid keyboard/gamepad/optical encoder,

I thought maybe it was running as a gamepad encoder these days. Shrug. Still... like you said, only single player.

Quote
3. I am using the latest version of Retro Pie for my front end.

RetroPie is a configuration of Raspian OS, not a front-end interface. The frontend you're using is most likely EmulationStation (ES). I mention just because it may help you in future posts.

Quote
Yes, currently I am wiring both the ground and the Minipac 'ground' wire to the Pi's GPIO. I am unsure how to ground these two wires otherwise?

Don't use the GPIO pins for anything in this instance. Remove all GPIO connected wires. The GPIO is Irrelevant to the function of the MiniPac encoder. The circuit between the microswitch and the mini pac is completed when the switch is pressed.. signal from the mini pac, ground goes back TO the mini pac.

Microswitch NO: connect to the specific pin on the mini pac
Microswitch Ground: daisy chain to all other Microswitch grounds (for convenience), and finally wire to the ground on the MiniPac board's ground pin labeled "ground"

That's it.

Quote
Yes. When you make a change in the 'Tab' menu, MAME saves it to the .ini file for that game.   ;D

Or if you're editing the general controls, it saves it as the default for all games, unless overridden by game-specific configurations. Like he said, this is a persistent configuration saved as an .ini flat-file.

Quote
Also, I've poked around the 'Retroarch' menu as I've read this is how to go about configuring the custom key maps, but I'm a bit confused on how it all works. In short, is there a way to configure controls for each emulator?

Yes. There is. You will have to get off in the weeds a bit for this however. Off the top of my head, I can't give you specifics, but I can look it up later. I've done it in the past, but every time I do, I have to go look the process up. It involves hand-editing files and specifying the keys to use. If I recall, there's a general Retroarch file, and then emulator specific overrides. There may be a GUI, but nothing as nice as the one found in EmulationStation. Sorry I can't be of more help on this.

I'd suggest starting with Mame first. Once you get the stuff working in that, then we'll have a good base for the next bit.
« Last Edit: May 18, 2017, 01:56:50 pm by mahuti »
Raspberry Pi, AttractMode, and Skeletor enthusiast.

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Online Online
  • Posts: 9394
  • Last login:Today at 11:35:55 am
  • Designated spam hunter
Re: Raspberry Pi 3 - Mini Pac wiring issue with joystick + buttons
« Reply #5 on: May 18, 2017, 02:11:09 pm »
I thought maybe it was running as a gamepad encoder these days.
AFAIK, the new ones show up as a USB Composite Device so the system sees it as a combination keyboard, mouse, and gamepad. (my old MiniPac shows up as a composite keyboard and mouse)


Scott

gstuto

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
  • Last login:May 22, 2017, 05:48:57 pm
  • I want to build my own arcade controls!
Re: Raspberry Pi 3 - Mini Pac wiring issue with joystick + buttons
« Reply #6 on: May 18, 2017, 02:38:36 pm »
PL-- thank you for jumping in! Good to know that Mame saves all inputs in the .ini file!

mahuti-- thanks for your suggestions. I just grounded both the microswitches and minipac down to the minipac  ;D, it works great!

Yes, I am indeed using EmulationStation.

Looks like I'm good for now in terms of needing help-- have to now journey off into the wonderful world of custom controls configuration and do my research!

Thank you all!

mahuti

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 2757
  • Last login:March 02, 2022, 09:51:19 pm
  • I dare anything! I am Skeletor!
Re: Raspberry Pi 3 - Mini Pac wiring issue with joystick + buttons
« Reply #7 on: May 18, 2017, 09:37:55 pm »
I'm really glad the electronics got sorted. The rest is a bit annoying but once done it's "set and forget "

That said, my advice is: make backups often. It's a lot easier to get files back from a backup or reformat a card than do it over. I make backups when I'm planning on making milestone changes. Then I label them clearly with what I did. I usually have 3 or 4 backups and delete after a few iterations of working changes.
Raspberry Pi, AttractMode, and Skeletor enthusiast.