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: How to handle mouse buttons (DPDT - How to wire it)  (Read 2698 times)

0 Members and 1 Guest are viewing this topic.

markronz

  • We traced the call, and it came from....INSIDE YOUR ARCADE MACHINE!
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 821
  • Last login:April 12, 2019, 12:03:08 am
  • Game on!
How to handle mouse buttons (DPDT - How to wire it)
« on: January 15, 2010, 03:21:59 pm »
Hello everyone-
   I will soon be making a new control panel for my second arcade machine.   Pretty standard amount of buttons; 6 buttons, coin and start for each player, and maybe 3 or 4 admin buttons.    With my first cp I put two dedicated buttons on there for right and left mouse buttons.   The mouse buttons come in handy, but only when I am doing maintenance on the computer.   For daily game playing use, I don't use them.    I am searching for a way to eliminate these two buttons from the control panel.   Well, perhaps that's poorly worded.   I would like to find a way to still have mouse click buttons, but find a solution so that they don't have to be on their own separate buttons.   It just takes up room and I'd like to avoid it if I can.   I've heard of some people who put the mouse click buttons as the buttons 5 and 6 for player 1.   This is not an ideal solution for me.   I know MAME allows you to assign a mouse button click to button 5 and 6, but other emulators do not allow for this.  

So what have others done?   Any creative way to "hide" the mouse click buttons?

Thanks!
« Last Edit: January 26, 2010, 12:36:21 pm by markronz »

drventure

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4152
  • Last login:April 23, 2024, 06:53:06 pm
  • Laser Death Ray Bargain Bin! Make me an offer!
Re: How to handle mouse buttons
« Reply #1 on: January 15, 2010, 04:14:16 pm »
Could you use an Autohotkey script to remap the p1 b5/6 buttons to mouse buttons in the general case, but map them back as regular keystrokes when you play certain games?

Alternately, connect the buttons as mouse buttons, but then run an AHK script when you enter a fighting game to make mouse buttons to specific keystrokes.

I haven't worked a lot of AHK, but i know it can some some pretty slick stuff.

Alternately, you could put a double pole double throw switch on the panel somewhere (maybe underneath) that could flip flop connecting the wires to those buttons to either the mouse connections or to the IPAC (or whatever you're using). That's a bit manual but it'd work.

I've got my p1 b567 set up as mouse buttons and I've never had an issue, but I don't play a lot of fighting games either.

markronz

  • We traced the call, and it came from....INSIDE YOUR ARCADE MACHINE!
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 821
  • Last login:April 12, 2019, 12:03:08 am
  • Game on!
Re: How to handle mouse buttons
« Reply #2 on: January 15, 2010, 04:29:18 pm »
Thanks for your response.   I was thinking about adding the manual switch to flip flop between mouse clicks and normal button functions, so that might be what I end up doing.   Most fighting games that I'd play would be in MAME, and you can map mouse button clicks to P1B5 and P1B6 in MAME, so that wouldn't be an issue.   It was more like other emulators, like one I like to use for SNES, that would not work with mouse clicks.

Interesting thoughts about the scripts, but I'm not sure that's a can of worms I want to open just yet.

If anyone else has some thoughts, just let me know.  Otherwise I might go the path of least resistance with the DPDT switch.

Thanks!


markronz

  • We traced the call, and it came from....INSIDE YOUR ARCADE MACHINE!
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 821
  • Last login:April 12, 2019, 12:03:08 am
  • Game on!
Re: How to handle mouse buttons
« Reply #3 on: January 26, 2010, 10:46:40 am »
Ok, so hopefully someone can help me out with this.  I purchased a DPDT switch as drventure suggested.   I will be hiding this switch out of the way.   I'm not entirely sure how to wire this up...

This is the switch that I believe I have:
http://www.radioshack.com/product/index.jsp?productId=2062521

So I guess first, can someone explain to me how I would wire this up?   I want P1B5 and P1B6 to turn into the left and right mouse buttons when I flip this switch.

Is this going to be possible to do this with just one DPDT switch?  Or would I need two separate switches?  Ideally, I'd like to just have one switch there that swaps both buttons.   

markronz

  • We traced the call, and it came from....INSIDE YOUR ARCADE MACHINE!
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 821
  • Last login:April 12, 2019, 12:03:08 am
  • Game on!
Re: How to handle mouse buttons
« Reply #4 on: January 26, 2010, 11:44:16 am »
Well, I did a little more investigating on this.    I found a good description of a DPDT switch:

Dual ON-ON
Double Pole, Double Throw = DPDT
A pair of on-on switches which operate together

So from the sounds of it, unless I am mistaken, I should be able to hook up two buttons to this switch, since it's a PAIR of switches.

I still need some help wiring it up however.   There are 6 places on the bottom that you can attach wires to.  Sort of hoping someone can explain how I should hook this all up to the 4 different buttons.

Thanks!

markronz

  • We traced the call, and it came from....INSIDE YOUR ARCADE MACHINE!
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 821
  • Last login:April 12, 2019, 12:03:08 am
  • Game on!
Re: How to handle mouse buttons
« Reply #5 on: January 26, 2010, 12:12:33 pm »
I've attached a picture I made.    I suspect that I have the 4 outer pins getting wired to the buttons correctly, but I still don't know what should be wired to the two middle pins.

So I guess that's my real question at this point. (along with confirmation that what I DO have filled in is correct.

Thanks!

DillonFoulds

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 605
  • Last login:August 27, 2019, 05:04:44 am
Re: How to handle mouse buttons (DPDT - How to wire it)
« Reply #6 on: January 26, 2010, 01:53:13 pm »
You're thinking along the right track.
Use your middle 2 poles for ground.
Use your outer four poles wired to buttons, and then to ground through the buttons.

Edit: Wait, i reread your post and now i'm confused. The way i described is so you'll have 2 mouse buttons for your track ball, and buttons 5 and 6 for p1, each pair being selectively en/disabled by the switch.

If you're looking at using p1b5 and p1b6 as your mouse left and right clicks, you'll want to wire as follows:
Middle 2 poles to p1b5 and p1b6 buttons, and then to ground
Top 2 poles to signals for mouse buttons, no switches/buttons involved
Bottom 2 poles for signals to encoder, no switches/buttons involved
This way will switch between encoder functions or mouse functions when the switch is thrown.
« Last Edit: January 26, 2010, 01:59:10 pm by DillonFoulds »

markronz

  • We traced the call, and it came from....INSIDE YOUR ARCADE MACHINE!
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 821
  • Last login:April 12, 2019, 12:03:08 am
  • Game on!
Re: How to handle mouse buttons (DPDT - How to wire it)
« Reply #7 on: January 26, 2010, 01:59:38 pm »
Thanks! And does it matter which ground wire I connect to the DPDT switch?   I mean, one button is from my xArcade trackball device and that device has it's own ground wires.  Then the other button, P1B5 and 6, will have the ground that runs back to my KeyWiz.  Does it matter which I choose?  Or is any ground good enough?

Sorry, I don't know much about this wiring stuff, so I'm not sure how the ground wire works...

markronz

  • We traced the call, and it came from....INSIDE YOUR ARCADE MACHINE!
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 821
  • Last login:April 12, 2019, 12:03:08 am
  • Game on!
Re: How to handle mouse buttons (DPDT - How to wire it)
« Reply #8 on: January 26, 2010, 02:17:59 pm »
I just re-read your edited post.  I'm not sure that I understand any more.   Do you think you could use the paint program to edit my picture here since I don't seem to be following?

Yes, I want to have the switch change P1B5 and P1B6 over to left and right mouse clicks when you flip the switch.
« Last Edit: January 26, 2010, 02:22:35 pm by markronz »

DillonFoulds

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 605
  • Last login:August 27, 2019, 05:04:44 am
Re: How to handle mouse buttons (DPDT - How to wire it)
« Reply #9 on: January 27, 2010, 02:05:18 pm »
I doubt it would really matter what ground you're using. You may even have the two connected, if you multimeter them.

markronz

  • We traced the call, and it came from....INSIDE YOUR ARCADE MACHINE!
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 821
  • Last login:April 12, 2019, 12:03:08 am
  • Game on!
Re: How to handle mouse buttons (DPDT - How to wire it)
« Reply #10 on: January 27, 2010, 02:24:31 pm »
Awesome.  Thanks so much for the help!!!   I'll have to try this out!