Software for powering real pinball machines. 100% free. 100% open source.
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.
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)
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
mpf both --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.
Set Controller = CreateObject("MPF.Controller")
MPFTimerwith an interval of 10 to 50ms. Keep this well below the minimal
default_pulse_msset in MPF for solenoids
Sub MPFTimer_Timerto update all the lights and solenoids
Sub CheckAutofireCoilsto disable/enable the bumper
Switch_Hit/_Unhitevents. Use “” to include string type numbers
Switch_Hitevent of targets, slingshots and bumpers
Sub UpdateLampsadd a case for every MPF light and LED number, setting the state of the VPX lamp/LED. Use “” to include string type numbers
Sub UpdateGIadd a case for every MPF gi string number, setting the state of the VPX GI collection. Use “” to include string type numbers
Sub UpdateFlashersadd a case for every MPF flasher number, setting the state of the VPX flasher. Use “” to include string type numbers
Sub InitSolenoids, to initialize them als
Sub UpdateSolenoidsadd a case for every MPF coil number, setting the state of the VPX solenoid. Use “” to include string type numbers
KeyUp/KeyDown) as in the demo table. Flippers are handled as autofire coils and can be enabled/disabled using hrdware rules.
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!