Build Your Own Arcade Controls Forum

Main => Software Forum => Topic started by: MrBond on April 15, 2004, 09:02:34 pm

Title: Visual Pinball vs MAME keymapping problem
Post by: MrBond on April 15, 2004, 09:02:34 pm
I have been wrestling with this problem for some time, I have workarounds- I just never thought to ask it here- perhaps someone has an easy answer.

On my control panel, I use 1 button on each side of the panel for player 1 and player 2 COIN buttons.  Now, in MAME, these are mapped to '5' and '6' respectively.  I want to use these as my pinball buttons as well for Visual Pinball/pinmame.  The default keys for visual pinball are 'L shift' and 'R shift'.  The problem is, when I change the keys within visual pinball (under Preferences->Keys...) to '5' and '6', some of the tables insist on still entering a coin when I press the 5 key.  The flipper is still activated, but a coin sound is made and the credits are increased as well, which is kind of annoying.

My solutions up to this point include:
1) Remap the MAME player 1 coin key to 'L shift' or something other than '5' (and consequently change my player 1 button 4 key to something other than 'L shift', and change my front end which used '5')
2) Use the IPAC programming to go back and fourth between "MAME" and "PINBALL" setups.
3) Put up with hearing the coins in Vpinball

Any suggestions? Thanks
Title: Re:Visual Pinball vs MAME keymapping problem
Post by: wpcmame on April 16, 2004, 02:23:31 am
http://groups.google.com/groups?selm=YUyja.4104%24Du.13846%40newsc.telia.net&oe=UTF-8&output=gplain
Title: Re:Visual Pinball vs MAME keymapping problem
Post by: Tiger-Heli on April 16, 2004, 09:59:28 am
http://groups.google.com/groups?selm=YUyja.4104%24Du.13846%40newsc.telia.net&oe=UTF-8&output=gplain
http://groups.google.com/groups?selm=YUyja.4104%24Du.13846%40newsc.telia.net&oe=UTF-8&output=gplain (http://groups.google.com/groups?selm=YUyja.4104%24Du.13846%40newsc.telia.net&oe=UTF-8&output=gplain)

For the lazy ones
Title: Re:Visual Pinball vs MAME keymapping problem
Post by: ErikRuud on April 16, 2004, 10:03:10 am
The short answer is this, you will probably have to modify the scripts.

VisualPinball coders can write their scripts to use whatever button they want.  They do not have to use the built in button definitions at all.  If the hard code a key value, and many of them do, then the menu options will have no effect.

I have gone through most of the VP tables on my cab and changed the scripts to use 1 for start and 5 for coin.

Search the script for 'keycode'
Look for code that looks like this:
Code: [Select]
   If keycode=6 then
       PlaySound "Credit"
      If Credits<99 then
      Credits=Credits+1
      PrintCredits
      End If
   End If
   
   If keycode=2 and BallActive=0 then   
      If Credits>0 then
      Credits=Credits-1
      PrintCredits
      KickPause=2
      AllLightsOff
      KickExit=3
      FirstBall
      End If
   End If

Keycode 2 is the '1' key.
Keycode 6 is the '5' key.
Title: Re:Visual Pinball vs MAME keymapping problem
Post by: Tiger-Heli on April 16, 2004, 10:11:00 am
The short answer is this, you will probably have to modify the scripts.
I got out of the Vpinball scene a couple of years ago, but at that time, they were looking at locking the table code, which I assume would prevent you from modifying the scripts.  Does anyone know if that concept went away?
Title: Re:Visual Pinball vs MAME keymapping problem
Post by: Edgedamage on April 16, 2004, 10:40:04 am
The short answer is this, you will probably have to modify the scripts.
I got out of the Vpinball scene a couple of years ago, but at that time, they were looking at locking the table code, which I assume would prevent you from modifying the scripts.  Does anyone know if that concept went away?

The table locking got killed very quickly. You should revisit the scene some tables are just amazing now. And again for the locking of tables most authors want to show others how they did their work. Look for tables from:
Kristian / Pac Dude / Scapino
Title: Re:Visual Pinball vs MAME keymapping problem
Post by: Chris on April 16, 2004, 04:24:19 pm
For an original VP table, here's a blatant plug for my table "Fight Night".

http://webpages.charter.net/celamantia/vp/

(http://webpages.charter.net/celamantia/vp/fightnight-sm.jpg)