Jump to content
LaunchBox Community Forums

Can I map VP cabinet buttons to MAME (and switch between Big Box and PinballX)?


Alex F.

Recommended Posts

Hi everybody,

besides playing pinball on my VP cabinet using PinballX I want to use the backglass monitor for lightgun games under MAME such as Point Blank or Area 51.

My setup is as follows:

Powering on the cab starts up PinballX for pinball games.
Exiting PinballX starts up Big Box from where I can play my lightgun games using MAME.

Now my problem is: Big Box recognizes my cabinet buttons (I'm using a Virtuapin controller) so I can navigate through Big Box with them.

Unfortunately, MAME doesn't recognize the cabinet buttons so I can neither start a game nor exit back to the Big Box emulator. I have to use a keyboard for that.

Two questions here:

1) How do I get MAME to recognize the cabinet buttons?

2) Is there a way to get from Big Box back to PinballX? That would make my game experience complete since I then could play some pinball, switch to lightgun games, switch back to playing some more pinball and then shutting it down (from either Big Box or PinballX).

Any help is greatly appreciated, thanks so much in advance.

Alex

Link to comment
Share on other sites

OK, I guess I have solved problem number one (which may be helpful to others who read this, I hope):

In MAME.ini under OSD INPUT OPTIONS I changed "joystickprovider" from "auto" to "winhybrid" and now MAME recognizes my Virtuapin controlled cabinet buttons!

The question remains if there's a "launch program on exit" option for BigBox - so far I haven't found any...

Link to comment
Share on other sites

13 minutes ago, Alex F. said:

The question remains if there's a "launch program on exit" option for BigBox

In short, no.

What I've done for something similar is to start BigBox from a batch file using the 'wait' parameter which will "pause" the batch file from continuing until BigBox exits.

f:
cd "F:\LaunchBox\Core"
start /w "" BigBox.exe

cd F:\PinballX
start "" PinballX.exe

What this does:

  • Switches to the F drive
  • Changes to the "Core" subfolder under LaunchBox
  • Starts BigBox.exe and 'waits here' until it exits
  • After BigBox has exited, change to some other folder where the 'other program' resides
  • Start that 'other program'

Then instead of PinballX starting BigBox directly, have it execute this batch file to start BigBox.

Link to comment
Share on other sites

First, thank you so much for your reply!

But to fully understand this:

The batch file you posted here, is this the one you used (so would I have to modify it?) or the one I should use? Batch files are among the things I'm a complete noob at (I've never needed them so far) so please guide me through here, if you will:

*Where exactly do I put this batch file to be executed?

*Would this batch file take me from Big Box (back) to PinballX?

Thank you so much again in advance for your kind help.

Alex

Link to comment
Share on other sites

You are very welcome.

50 minutes ago, Alex F. said:

is this the one you used

I don't have PinballX, so no.  But it's the same principle.

52 minutes ago, Alex F. said:

Where exactly do I put this batch file to be executed?

Pretty much anywhere you want. As long as you can remember where that is. (in the example below, we'll put it in your LaunchBox folder)

54 minutes ago, Alex F. said:

Would this batch file take me from Big Box (back) to PinballX?

Only if your copy of PinballX is located in the directory "F:\PinballX".

 

1 hour ago, Alex F. said:

please guide me through here

Try this:  Open Windows Explorer, and go to folder where you have LaunchBox installed.  Right click on an empty space in the directory list (like below the last file. Not next to one) and select New and then select Text Document.

image.thumb.png.514a47f7024d2f53a8ae384260bf8b44.png

Type in a name that makes sense to you (i.e. "BigBox2PinballX") and hit enter.  You should not have a file named "BigBox2PinballX.txt").

Click on that file and hit enter (or just double click it).  This will open up Notepad.  Copy the following text and paste it into Notepad.  (Note: it's different from the one I showed above.  Use this one)

cd Core
start /w "" BigBox.exe
cd "F:\PinballX"
start "" PinballX.exe

Now you need to know where your PinballX.exe file is located.  i.e.  in the folder "F:\PinballX".  I'm guessing it's somewhere else.  So on the 3rd line (above), you need to change the part inside the quotes to the path where yours is actually located.

Now close Notepad.  It'll ask if you want to save it.  Yes

You now need to rename the file to a bat[ch].  Right now, it should look like this:

image.png.04fb9a936937e31def524e54e67e975e.png

If you don't see ".txt" on the end of it, at the top of Windows explorer, click the View tab and check the box File name extensions.

image.thumb.png.4ebcf791d784ceb043da4774025cc97a.png

Click (once) on the file and press F2 on your keyboard [to edit the filename].  Using the arrow keys, move right 2 times then hit Delete 3 times.  This will delete "txt".  Now type in "bat" (without the quotes) and hit Enter.  You'll get a message box about "Are you sure you want to change it?".  Click Yes.  It will now look like this:

image.png.8947d9edeca08727ef1c46e52bc6c08f.png

Now, wherever it was that you told PinballX to launch "BigBox.exe", tell it to launch "BigBox2PinballX.bat" (or whatever you called it) instead.

Link to comment
Share on other sites

 

Yes! After some difficulties I finally managed to get the .bat file parameters correct.

My personal folder and file locations are:

F:\PinballX
C:\LaunchBox/Core/BigBox.exe

The .bat file is as follows:
--------------------------
start /w "" BigBox.exe

f:
cd "F:\PinballX"
start "" PinballX.exe
--------------------------

Here's what I did:

*I put the "BigBox2PinballX.bat" file above in the "LaunchBox/Core" folder

*In the PinballX "Settings" utility under "Exit Program" I put in this .bat file to get launched upon exiting PinballX

*Now PinballX upon exiting starts BigBox

*Then BigBox upon exiting starts PinballX again!

The only thing I find a little tricky now is to get out of this loop. OK, normally if everything's working you don't have to do that but using the keyboard and starting the task manager you can break the loop and get back to your Windows desktop.

Thank you so very much again, the people in this community are just fabulous. Maybe this helps other people who want to use their VP cab also for MAME lightgun or other games because the backglass monitor is really excellent for this: Sufficient size, perfect distance for the player, ideal height - and you don't need a separate PC.

I have a Sinden lightgun and attached it to the back of my cabinet using the holster. My VP cab is a nice machine now, I may say! 🙂

Take care and happy holidays!

Link to comment
Share on other sites

1 hour ago, Alex F. said:

Thank you so very much again

Glad you got it working!!!  Oh man! Totally missed adding in the "f:" line.  It's kind of funny that yours was actually on the F: drive. lol

1 hour ago, Alex F. said:

get out of this loop

You might be able to, when BB is open, Alt+Tab to the Command Window and then press Ctrl+Break.  You'll have to press "Y" (Yes) to terminate and you may have to then Close the Command Window 'manually'. Then you can Exit BB to Windows.  This isn't very elegant and not really much better than using Task Manager (Ctrl+Shift+Esc) to close the Command window.

If you want to "fancy it up" a bit, you could add in a Message Box for when the batch file starts, you have the option to Start BB or 'Exit' to Windows.  And another one at the end, 'start PbX or exit to Windows'.   It might look something like:

@echo off
powershell "add-type -As System.Windows.Forms; exit([windows.forms.messagebox]::show(\"Do you want to start BigBox?\",'Launch BigBox',4))"

if errorlevel 7 (
::user chose "No"
    exit
) else (
::user chose "Yes"
start /w "" BigBox.exe
)

powershell "add-type -As System.Windows.Forms; exit([windows.forms.messagebox]::show(\"Do you want to start PinballX?\",'Launch PinballX',4))"

if errorlevel 7 (
::user chose "No"
    exit
) else (
::user chose "Yes"
f:
cd "F:\PinballX
start "" PinballX.exe
exit
)

Merry Christmas

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...