The Mission Pinball Framework

Software for powering real pinball machines. 100% free. 100% open source.

Running your MPF game on a VPX Virtual Pinball Table

25 May 2019 - mfuegemann

After some months the MPF-VPX bridge proof of concept has been brought to live for real. We were able to successfully link MPF and VPX so that the VPX table is emulating the hardware for a MPF machine. After the first successful switch hits and lamp states have been sent, the functionality of the bridge has been extended. At the moment, lights, switches and solenoids are handled to fully. Mechs and Magnets are still missing but will be worked on in the future.

The bridge will connect to the running MPF machine when you start your VPX table. As the VPX table is used only to emulate the hardware and should not contain any game logic.

At the moment the latest VPX platform is contained in MPF 0.53 dev (see: Installing dev version). This version is currently necessary for the bridge to work. However, this will very likely make it into the upcoming 0.53 stable release. You can also read our Documentation about the VPX platform.

Installation

Copy the file register_vpcom.py to your local machine. To register the bridge run a CMD shell as Administrator, then

python register_vpcom.py --register

(You can use --unregister to uninstall the bridge)

Use VPX in MPF

In your config.yaml configure virtual_pinball as your platform:

hardware:
    platform: virtual_pinball

or if you already have physical hardware configured start MPF with the --vpx commandline option (similar to -X):

mpf both --vpx

What to do in VPX

In VPX you need to adjust your script to talk to MPF. You can also looks this up in the example project inside the bridge repository. The GameName set in VPX is not used to check or validate the MPF machine.

Setup controller and timers

In Table_Init

In Drain_Hit (for 1-Ball games)

To use autofire_coils (Slings, Pops etc)

Switch Handling

Controlled Lights (all types)

LEDs and Lamps

GI strings

Flashers

Solenoids

Flippers

To run a game

  1. start VPX as Administrator
  2. start MPF, wait until the display has been initialized
  3. start VPX table

To exit a game shut down the VPX table first

Any problems getting VPX and MPF to work? Let us know in the MPF-Users forum!