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: MAME/Pinball keys  (Read 8999 times)

0 Members and 1 Guest are viewing this topic.

Zeenon

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 41
  • Last login:January 26, 2018, 08:51:10 pm
  • New Jersey - The Greatest Country in the World
MAME/Pinball keys
« on: February 14, 2013, 11:38:22 am »
Is there a standard key layout for cabs with MAME and a Visual Pinball setup?

The reason I ask is, because for some older VP tables the scripts (for each table) need to be updated because the cab is primarily for MAME. Just want to see what others are doing, or am I making this harder then it really is.

(details in case it helps)

I currently have your everyday standard 2 player layout on top...P1, P2, Exit, Pause, 2 - 4/8 joy, 7 buttons/player and a trackball. Coin 1/2 is going to a coin door. 3 buttons/side for VP.

So MAME uses 5/6 for Coin1/Coin2 which I remapped to 3/4 because 5/6 are L/R flippers. Nudge are A and ' - Magna is L-Ctrl and R-Ctrl. ] is the plunger, and I remapped A to W in VP because A is sometimes the ball lifter.

Z





PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9671
  • Last login:Today at 04:29:13 pm
  • Designated spam hunter
Re: MAME/Pinball keys
« Reply #1 on: February 14, 2013, 02:22:53 pm »
The reason I ask is, because for some older VP tables the scripts (for each table) need to be updated because the cab is primarily for MAME. Just want to see what others are doing, or am I making this harder then it really is.

There were a very few older tables (a tiny sliver of early VP8 and some earlier) that used non-standard keys like "S" for start, but they are pretty rare -- you can either edit the script or press Player 2 Button 2 for the "S".

Most of those tables have been updated or another author has put out a newer/better version.

Everything VP9 or newer should use standard keys.

The smart move is to align your cab controls to the standard keys to prevent problems adding new tables.

So MAME uses 5/6 for Coin1/Coin2 which I remapped to 3/4 because 5/6 are L/R flippers. Nudge are A and ' - Magna is L-Ctrl and R-Ctrl. ] is the plunger, and I remapped A to W in VP because A is sometimes the ball lifter.

WHAT??!!??!!  :dizzy:  I have no idea what royally screwed up tables you based this on, but everything in red is definitely NOT correct/standard.

The keys in VP were chosen to allow you to play pinball on a standard U.S. keyboard layout.

Function = key -- MAME overlap
Coin 1, Coin 2 = 5, 6 -- Same as MAME

Start 1, Start 2 = 1, 2 -- Same as MAME

Plunger/Ball Launcher = Enter -- P3 Button 3

Flippers = L/R Shift keys -- P1 Button 4, P3 Button 2

Upper Flippers = A and ' -- P2 Button 1, none

Magnasave = L/R Control buttons -- P1 Button 1, P3 Button 1

L/R/Up Nudge = Z, /, Space Bar -- P1 Button 5, none , P1 Button 3

Since no tables use both Magnasave and Upper Flippers, you can wire both in parallel -- check my other posts on this subject for diagrams showing how to do this correctly.


Scott

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9671
  • Last login:Today at 04:29:13 pm
  • Designated spam hunter
Re: MAME/Pinball keys
« Reply #2 on: February 14, 2013, 07:39:06 pm »
I think I've figured out why you chose those settings, Zeenon.

The X-Arcade Tankstick uses non-standard keys for it's pinball flippers.

If you look at page 5 of the Tankstick Manual, you'll see that the flipper buttons are tied to coin 1 and coin 2.

If you look at page 14 of the Pinball Wizard Manual (PBW), you'll see the default flipper keys for Visual / Future Pinball.

The PBW was designed to be a 100% compatible plug-and-play controller for Future Pinball (a spinoff of Visual Pinball) that would also play 99.9% VP tables.


Scott

Zeenon

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 41
  • Last login:January 26, 2018, 08:51:10 pm
  • New Jersey - The Greatest Country in the World
Re: MAME/Pinball keys
« Reply #3 on: February 14, 2013, 07:57:55 pm »
You are spot on!!!! I have since (30 days ago) got rid of the tankstick and constructing my own CP.

So I have the left side wired up using your diagram (parallel wiring) and that is working with 3 buttons on the left side of the CP. So how do I wire up the right side?

On the minipac I have (and not saying these are correct):

2A - R shift (this is easy because it's just the right flipper)
2B - R CTRL
P1B8 - '
P1B3 - space (this is easy since this is just parallel with top CP button)

Z


PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9671
  • Last login:Today at 04:29:13 pm
  • Designated spam hunter
Re: MAME/Pinball keys
« Reply #4 on: February 14, 2013, 08:35:21 pm »
So I have the left side wired up using your diagram (parallel wiring) and that is working with 3 buttons on the left side of the CP. So how do I wire up the right side?
Just mirror the 1.) Flipper, 2.) Upper Flipper/Magnasave, and 3.) Nudge 3-button setup that you used on the left.

2A - R shift (this is easy because it's just the right flipper)
2B - R CTRL
P1B8 - '
These are Right Flipper, Right Magnasave, and Right Upper Flipper, respectively.

Right Nudge is the "/" key (next to the right shift key)

P1B3 - space (this is easy since this is just parallel with top CP button)

This is Up Nudge, and it usually goes on the front/center of the CP box so you can reach it easily with either hand or hip-check it if you don't have an overhanging lip on your CP.

The Plunger/Ball Launch button (Enter) is usually on the front/right of the CP box where you'd expect to see the plunger on a pinball machine.


Scott

Zeenon

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 41
  • Last login:January 26, 2018, 08:51:10 pm
  • New Jersey - The Greatest Country in the World
Re: MAME/Pinball keys
« Reply #5 on: February 14, 2013, 09:40:09 pm »
hmmmm....... :banghead: I am so missing the concept....

I actually drew out what the right side should look like (using the graphic of the left) then realized I don't have a R-CTRL or ' on the CP top.

2A - R shift - R Flipper. So this one is a no brainer. I just wire it up like every other switch on the top of the CP (This is #1 below) 2A is an open switch on the minipac.

2SW8 - / - R Nudge. So this one is a no brainer. I just wire it up like every other switch on the top of the CP (This is #3 below) 2SW8 is an open switch on the minipac.

(Right side view)
  1    2      or      1    2
     3                         3

1. Right Flipper
2. Right Upper Flipper/Left Magnasave
3. Right Nudge

Now this is were I'm lost, I have two opening left on the minipac (which should be defined as R-CTRL and ') what's screwing me up is there are no physical buttons on the top of the CP to tie into like there was with the LEFT side.

2B - R CTRL
P1B8 - '

P1B3 - / (this is easy since this is just parallel with top CP button) (correction)

Z (so lost  :o)

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9671
  • Last login:Today at 04:29:13 pm
  • Designated spam hunter
Re: MAME/Pinball keys
« Reply #6 on: February 14, 2013, 11:19:58 pm »
Here's a diagram that might help clarify things.

Assign the functions that don't have a MAME equivalent to an un-used/spare input on your Mini-Pac and wire the button directly to that input.

For the pinball functions that you don't have spare inputs for, consider changing a MAME default (i.e. change P2B6 from X to Right Shift) since MAME is easier to configure using the "Input (general)" menu.


Scott
« Last Edit: February 14, 2013, 11:26:40 pm by PL1 »

Zeenon

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 41
  • Last login:January 26, 2018, 08:51:10 pm
  • New Jersey - The Greatest Country in the World
Re: MAME/Pinball keys
« Reply #7 on: February 15, 2013, 08:03:42 am »
Gotcha!

So I think I'll do a combo of what you posted above and here:
http://forum.arcadecontrols.com/index.php/topic,121570.msg1291185.html#msg1291185


1. You need an input for ball launcher (enter) and a button {+1 input}. I will make 2PB7 = enter

2. Wire the left flipper in parallel with Player 1 Button 4. (L-Shift) {-1 input}Done and working

3. Wire the left Magnasave/upper flipper in parallel with Player 1 Button 1 and Player 2 Button 1. (L-Ctrl and A) {-2 inputs}Done and working

4. Map an unused input on your encoder to R-Shift and connect it to the right flipper. {no change in # of inputs}

5. Map two unused inputs on your encoder to Apostrophe and "R-Ctrl" and connect both to the right Magnasave/upper flipper. {+2 inputs}

I'm added a #6

6. Map an unused input on your encoder to / and connect it to the right nudge.

See any flaws with this logic?

The only other way, is to steal P2B4, B5, B6 and B7, remap these to (for example to ',rctrl,rshift,/) in MAME. This would give me some spare inputs on the minipac if needed.


Z


« Last Edit: February 15, 2013, 08:19:42 am by Zeenon »

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9671
  • Last login:Today at 04:29:13 pm
  • Designated spam hunter
Re: MAME/Pinball keys
« Reply #8 on: February 15, 2013, 11:16:50 am »
Sounds like you're on the right track.

To make it easier, you may want to make a file listing all the inputs on the Mini-Pac, which keystroke is assigned to the input, the MAME function, and the Pinball function.

Example:
1 SW 1 - Left Control - P1B1 - Left Magnasave
1 SW 2 - Left Alt - P1B2 - None

Once you list all the inputs and default settings from the Key Code list here, you can reassign the inputs that you aren't using for your setup.

If you still need more inputs, reassign others as needed.

Be sure to mark which settings you have to reprogram on the encoder and which you need to change in MAME.

Example indicating that the encoder and MAME default changed:
2 SW 7 - Enter* - P2B7* - Ball launcher


Scott

Zeenon

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 41
  • Last login:January 26, 2018, 08:51:10 pm
  • New Jersey - The Greatest Country in the World
Re: MAME/Pinball keys
« Reply #9 on: February 17, 2013, 03:41:30 pm »
Scott,

Thanks for your help!!!! Hopefully I covered all the keys in the attached.


PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9671
  • Last login:Today at 04:29:13 pm
  • Designated spam hunter
Re: MAME/Pinball keys
« Reply #10 on: February 17, 2013, 08:45:13 pm »
Looks really good.   :applaud:

The only thing that might give you trouble is using "P" for pause.

VP and FP are programmed to use the "Pause/Break" key for pause.

They won't let you reprogram that particular key.


Scott