10/20/2016 – Moving to newest MPF branch

So Jan has made some updates to MPF for the OPP platform, and I really need to move to using that version.  I had some old MPF code that ran an attract mode slideshow and a bunch of other stuff, but it was all really preliminary.  I could never get the slideshows to work after moving to newer branch of MPF, and I don’t really know if it is that important.  I’ve decided to just throw out all the stuff that I have so far (excluding my main configuration yaml file which has all the hardware definitions in it) and start from scratch.  Hopefully that will make things a little bit simpler since I don’t need to deal with all the stuff the converter added to the files.

To update to 0.32, I ran the following command (remember, I don’t have Python in my path so I need to add some extra stuff flags to get everything to work) :

c:\Python34\python.exe -m pip install mpf –upgrade –pre

To run the actual code:

c:\Python34\python.exe -m mpf both

The checked-in code in the repository svn\MPF\SS3 folder is using 0.32.  You can start a game, it plays a couple of sound, goes into skillshot mode, and that is about it.  Making the skillshot correctly adds the score, but it doesn’t play a clip from the sound pool because the mode ends before it can play the clip.

I’m just not getting into the MPF groove.  One issue I had was I couldn’t get the scores to show up.  After trying to find the information in the documentation (I’m sure it is there somewhere), I eventually found an example in Brian’s code that had the correct value to use in the yaml.  I just don’t feel very efficient working with it yet.  I’m considering shelving it until there are a couple of examples of fully running games, so I’m not just hunting and pecking to figure out how to make it work.  The hassle of figuring it out would be worth it if I was trying to do more interesting things than emulate an early 80s pinball machine.  The reality is I have a static picture displayed on the backbox with a couple of scores shown in front like the old numeric displays.

I guess that it means that I have to dust off the OPP framework and get that running for the Gen2 boards.  That means adding a couple of new commands and such, but it shouldn’t be that difficult.  The code is written in Python with a little engine in the background, but it is much simpler for me to get something up and working quickly with it.  I just got a PiZero and it would be a good little project to get that running the framework.

That’s all.  Just felt that I needed to get an update out since it has been over a month.  Looks like Expo was an interesting event this year.  Hopefully that will bleed over into other pinball events including Pintastic this year.



4 responses to “10/20/2016 – Moving to newest MPF branch

  1. I’ve started work back on RS pinball framework and opened it up to the public. Maybe we can get OPP hardware working within it. 80s style machine sounds like a nice starting place for testing the software. It is all C# so should be fairly easy to add in what we need to get the boards working. Missing plenty of mode stuff at the moment though.
    Repo is here but probably needs plenty of cleanup before anyone else can use it. https://bitbucket.org/rampantslug/pinball-framework/overview

    • We should talk at some point to see where our frameworks are at. With my framework, for each mode, you basically tell it what processing chains you want it to run. (A processing chain is basically a phython function.) In that way you have a generic function for doing ball search, generic function for looking for a drained ball, etc. It is very simplistic. Built into the basic machine it has things such as ball number, player number, etc. Player and machine variables are also extensible so you can add your own.

      The generator basically takes a configuration file, and writes the python code for you for the skeleton of the machine. At that point, it is up to you to fill in all of the different functions. There are very simple functions that you can call to see if a target has been hit, a drop target is down, etc. The machine collects switches being closed from the machine, and then it runs a single loop to consume the events. After the loop is completed, it collects another group of events from the machine and allows you operate on what happened there. Like I said, very simplistic.

      I picked Python because I wanted to run it on a Raspberry Pi, and when I wrote it, the Pi didn’t support Java. All the code is in the repository under svn/Python/PinballFramework, and the generator is under svn/Python/GenPyCode.

  2. Cool. Ill have a look at it (I think previously I just sorta glanced at it) and see what I can work out.

  3. Here is the location of the interface documentation. https://sourceforge.net/p/open-pinball-project/code/HEAD/tree/trunk/Docs/brdIntf.pdf. That contains every command that the Gen2 boards currently support. That might be nice to look at also if the comments in the code aren’t clear enough. I’m currently updating the code to support Gen2 boards. (Gen1 boards were either solenoid, inputs, or lamp boards, now they can be mixed)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s