Hi,
after discovering MPF as a great way to code the rules for a real pinball table, I wanted to to run it with VPX to model the table layout and the code before buying real hardware and drilling real holes.
Then I found the mpf-vpcom-bridge by jabdoa2 on GitHub and things got moving. Documentation was thin but I got the link up and running.
Attached is a basic MPF game folder, the VPX Bridge by jabdoa2 and a VPX table that is providing the "hardware" for MPF.
Have fun and please let me know if this helps You in Your MPF Projects.
Michael
Content of Readme.txt:
Mission Pinball Framework:
https://missionpinball.org/
MPF_VPX_Bridge by jabdoa2:
https://github.com/m...pf-vpcom-bridge
Bridge Installation:
1. Register mpf-visual-pinball bridge (run cmd shell as Administrator):
python register_vpcom.py –register
2. Create Your MPF table folder. In Your config.yaml enter:
hardware:
platform: virtual_pinball
3. In VPX edit script and replace the controller with:
Set Controller = CreateObject(“MPF.Controller”)
To run a game:
1. start MPF (mpf both), wait until the display has been initialized
2. start VPX (as Administrator).
3. Run VPX table.
Remarks:
The setting of cGamename in VPX is not used to establish or check the connection.
The VPX Bridge connects to the running MPF.
Switch numbers can be of type integer or string. (use quotation marks for strings in VPX: “0-1” od “sf1”)
Numbers of Lamps and Solenoids must be of type integer for the moment.
To code a pulse event (Standup Targets, Bumpers, Slingshots) set the switch to True on the Hit event and add a timer (150 or 200ms)
to set the switch back to False. Be careful with Drop Targets and Slingshots, here the built-in timer cannot be used as it is used for the animation.
Autofire Solenoids (Bumpers, Slingshots) need some special care. In VPX use the built-in functionality (Bumper_Hit, Slingshot_slingshot) and ignore the solenoid calls from MPF. Enabling/disabling such autofire_coils depending on a specific game mode will perhaps require an artifical lamp to tell VPX what to do.
To receive readable solenoid calls in VPX I had to add a coil_player section in MPF for the autofire_coils.
The flippers needed an entry in the coil_player too. In VPX the flippers will be held up while the main flipper coil or the hold coil is energized.
Attached Files
Edited by mfuegemann, 24 April 2019 - 10:37 PM.





Contributor
Top













are all trademarks of VPFORUMS.