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: Visual Pinball vs MAME keymapping problem  (Read 5715 times)

0 Members and 1 Guest are viewing this topic.

MrBond

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 390
  • Last login:March 10, 2012, 03:50:37 pm
  • ...The name's Do......Mr. Do!...
Visual Pinball vs MAME keymapping problem
« 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
...they only live twice!...
(>")>----MAME----<("<)

wpcmame

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 278
  • Last login:February 18, 2024, 01:27:00 pm

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

ErikRuud

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1709
  • Last login:March 05, 2021, 10:20:27 am
  • I'll build a cab for only 99.99.99!!!
    • Erik's humble video game page
Re:Visual Pinball vs MAME keymapping problem
« Reply #3 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.
Real Life.  Still a poor substitute for video games!       
American Laser Games Wrapper
O2em Rom Utility

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re:Visual Pinball vs MAME keymapping problem
« Reply #4 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?
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

Edgedamage

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1261
  • Last login:October 06, 2018, 12:21:23 am
Re:Visual Pinball vs MAME keymapping problem
« Reply #5 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
Curls in the squat rack !?!?!

Chris

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Re:Visual Pinball vs MAME keymapping problem
« Reply #6 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/

--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com