5/22/2026 – Inlanes, rotation, shot groups

On the SS3 playfield, there are six lanes that form SHARPE (aka Roger f’ing Sharpe). To start a mode, these lanes must be completed. Where it gets tricky, is that depending on the level of the player, the game code should restrict the rotation of the lights by the flippers. The player’s level can be either Rookie, Deputy, Sheriff, or Marshal. Rookies can use the left and right flippers move the completed lanes to make this relatively easy to achieve. Deputies separate the rotation to the top and the bottom lanes individually. SHA can be rotated, and RPE can be rotated. Since the RCE lanes are more difficult to shoot, a player can’t just continuously shoot the upper lanes to get to the next mode. Sheriffs and Marshals can not use the flippers to rotate the lanes. Here is a quick picture to hopefully make this more clear.

This looks like three different shot groups so the rotation can work properly. I’m relying heavily on this page of the MPF documentation: https://missionpinball.org/latest/cookbook/lanes_mode/.

I broke this into three different modes: sharpe_rollovers, sha_rollovers, rpe_rollovers. Depending on the level of the player, the appropriate mode gets started. In MPF modes are a big thing, and this sent me down the path of looking at the different things that SS3 needs to do at different times, and break them into logical modes. In this way the base mode works as a dispatcher to start the appropriate modes depending on the player’s progression. It also makes each of the modes pretty simple to create since each one is only doing a very specific piece of logic.

I currently have the following modes: attract, base, bumpers, drop_targets, jackpot, rpe_rollovers, sha_rollovers, and sharpe_rollovers. Each of these modes contain a standard named event that start and stop them, such as start_mode_drop_targets and stop_mode_drop_targets. At the moment, only the base mode deals with the ball_starting event, which is then uses the mode_base_started event to start the appropriate modes for the active player. This has been working really well, and I can now restore appropriate modes with multiple players, allow individuals be at different points on the progression towards higher levels.

Sorry for the quick not (and not updating the code repository for SS3) this week, but just in a bit of a time crunch today. Probably nothing next week, but the following will probably have most of the skeleton of SS3 completed. At the current rate, this is not going to take me a year. If that’s the case, I can put more time towards the second project. Yippee! That one is going to take a lot of time.

Enjoy Memorial Day if applicable.

-H

5/13/2026 – New Framework shine slightly duller

This week was implementing the attract mode, and just generally getting more familiar with Mission Pinball Framework (MPF). First up was to create a couple quick light shows. The MPF documentation suggested that I break the light shows into individual pieces, so I ended up creating a mode, drop target, kickout hole, and inlane light shows. I got the first light show working immediately. At that point I created the other light shows. So here are couple lines from the mode light show.

#show_version=6
##! show: show_attract_modes

- duration: 1
  lights:
    l_shoot_again: off
    l_mode_sharpe: off
- duration: 1
  lights:
    l_shoot_again: on
    l_mode_sharpe: on
...

Then I created the other light shows like the following:

!!! Warning !!! Bad code!  Do not use!
- duration: 1
lights:
- l_rollover_s: off
- l_rollover_h: off
- duration: 1
lights:
- l_rollover_s: on
- l_rollover_h: on
...

When I tried to run MPF, it just crashed with no real explanation. It said “l_rollover_s” didn’t exist. I went back and checked that I had defined the light properly. Y’up, looked exactly like how I defined l_shoot_again. Maybe it was because I was trying to kick off multiple light shows. Changed it up so that I only created two light shows instead of the four I needed. Still crashed with the same issue. I emptied the light show completely, but that gave a different error. Eventually I noticed that I had a dash ‘-‘ before the light name in the shows that didn’t work, and I just had the light name in the show that did work. Uggh! It would have been nice to say something like “list not allowed” which would have pointed me to the correct issue.

MPF uses a ‘-‘ to indicate lists of instructions in some areas, and doesn’t accept them in other areas. Since I’m still getting my head around the syntax, I’m not sure when lists are available, and when they aren’t available. I think I must get better with understanding the syntax of yaml files.

Growing pains, but that is to be expected. Next up was that I want to give two different callouts when the machine is in attract mode, with 60s between the callouts. (It should also be expandable to more callouts if I need to add more) That seems pretty simple. Here was my first take at the config files to make it happen:

sound_player:
timer_after_yall_comeback_timer_complete:
howdyFolks:
# HRS: Why doesn't this work so timers can be removed? delay: 60s
bus: voice
events_when_stopped: howdy_folks_end
timer_after_howdy_folks_timer_complete:
yallComeBack:
# HRS: Why doesn't this work so timers can be removed? delay: 60s
bus: voice
events_when_stopped: yall_comeback_end

timers:
after_yall_comeback_timer:
end_value: 1
tick_interval: 60s
start_running: false
control_events:
- event: mode_attract_started
action: restart
- event: yall_comeback_end
action: restart
after_howdy_folks_timer:
end_value: 1
tick_interval: 60s
start_running: false
control_events:
- event: howdy_folks_end
action: restart

I tried to use the “delay: 60s” at either the beginning or the end of the clip, and it just didn’t make a difference. MPF said it was a valid command but it ignored it. (Maybe it isn’t implemented in 0.80?). That would have meant that I wouldn’t need timers. I gave up on that idea and moved on.

Since the delay command didn’t work, I needed a couple of timers (one for each sound). That kinda sucks, but it does work. The after_yall_comeback_timer is kicked off when attract mode is started. When the after_yall_comeback_timer expires, it plays howdyFolks. After howdyFolks clip ends, it starts the after_howdy_folks_timer. When the after_howdy_folks_timer expires, it plays yallComeBack. It then repeats the process.

This works…but it kinda sucks. If I wanted to have 10 different clips that I wanted to rotate through, I would need to create 10 timers for this to happen. Maybe I could do something clever with AudioStreamRandomizer in Godot, but I’m trying to learn MPF at this moment, not Godot and I really want MPF to iterate over my sounds. There is a play_list option with maybe using crossfade_time to get the 60s between samples, but that is only available using the old MPF-MC, not Godot.

Next I decided I wanted to implement it using a machine variable. Here is the code that make that work:

sound_player:
timer_attract_catcall_timer_complete{machine.last_catcall_callout == 1}:
howdyFolks:
bus: music
events_when_stopped: attract_catcall_end
timer_attract_catcall_timer_complete{machine.last_catcall_callout == 0}:
yallComeBack:
bus: music
events_when_stopped: attract_catcall_end

timers:
attract_catcall_timer:
end_value: 1
tick_interval: 60s
start_running: false
control_events:
- event: mode_attract_started
action: restart
- event: attract_catcall_end
action: restart

variable_player:
attract_catcall_end:
last_catcall_callout:a
action: add_machine
int: 1
attract_catcall_end{machine.last_catcall_callout >= 2}:
last_catcall_callout:
action: set_machine
int: 0

This is a round-about way, but it is a little bit cleaner. The attract_catcall_timer is started when attract is entered. When the timeout occurs, it plays the appropriate sound depending on the last_catcall_callout machine variable. After the clip finishes, it updates the last_catcall_callout machine variable by incrementing it in the variable_player, then using a second update in the variable_player to set it to 0 if past the number of clips. This is still dirty and I don’t feel I should need multiple variable_player entries. If I had 20 clips I wanted to play, I would need 20 conditional statements based on the timer_attract_catcall_timer_complete event occurring. I now only need one timer that I can use which is cleaner.

After watching Jan’s video on machine and player variables, he pointed out that setting the value can be a full on python statement. With one more slight changed to the variable player, it is much cleaner. Here is the final version with increments it and resets it to 0 in a single statement. It is definitely less readable on first glance, but I’ll get used to it.

variable_player:
attract_catcall_end:
last_catcall_callout:
action: set_machine
int: 0 if machine.last_catcall_callout + 1 >= 2 else machine.last_catcall_callout + 1

It seems to be pointing to the fact, that if I want to do clever stuff, such as using the flippers to rotate inlanes in both directions, it is probably just going to be easier to do it in code. That will be the next thing to look into.

5/9/2026 – Cleaning up some OPP firmware backlog

Got finished with my “goals” last week on Thursday, so Friday was going to be clean up the OPP firmware backlog. Jay C did some excellent work to make building the OPP firmware from scratch seamless and simple. I couldn’t merge it into the mainline until I got off my rump and did a full regression of the code. Jay’s changes are currently in the mainline of the OPP github repository.

Here are the instructions to clone and build the OPP firmware:

  1. Clone the github OPP repository (this creates a subfolder called opp which I will refer to as repos from now on).
    git clone git@github.com:openpinballproject/opp.git
  2. Build the firmware from scratch (clean it and build both Booty and OppGen3 and merge hex files):
    cd repos/Stm32Workbench
    make clean
    make all
  3. Firmware is found in repos/Stm32Workbench/_build folder as OppGen3.hex and OppGen3.elf. These are the files that I typically move to the repos/Stm32Workbench/Gen3Images so people can grab the completed firmware without needing to build it themselves.

Since I hadn’t done a regression test for a while, I had to go back through my notebook and look up all the steps. Here are the rather dull directions which most people should never care about, but which minimizes that an update to the OPP firmware breaks pinball machines. (Integration tests are just a good idea).

So I was on a new machine (loaded with a vanilla Linux Mint) and needed to program a blue pill using the ST-Link V2. First test would be to make sure I could load a known good version of firmware onto a board.

Programming OPP firmware using ST-Link V2:

  1. Install stlink-tools if not done before:
    sudo apt install stlink-tools
  2. Attach ST-Link V2 to STM32 (blue pill) using SWCLK, SWDIO, GND, 3.3V.
  3. Move Boot0 jumper from 0 to 1
  4. Program the processor:
    st-flash –format ihex write repos/Stm32Workbench/Gen3Images/OppStm32.3.0.0.0.hex
    (if successful it reports “jolly good!”)
  5. Move Boot0 jumper from 1 to 0

Verify the firmware is working:

  1. If pyserial isn’t install yet install it:
    sudo apt install python3-serial
  2. Use Gen2Test.py to verify programming:
    cd repos/Python/Gent2Test
    sudo python3 Gen2Test.py -port=/dev/ttyACM0

    Responds with the following:
    Sending inventory cmd
    Found 1 Gen2 brds.
    Addr = 0x20
    Card 0, firmware version = 3.0.0.0
    0x20 WingCfg = 0x06010203
    0x20 W[0]:NEO_WING, W[1]:SOL_WING, W[2]:INP_WING, W[3]:INCAND_WING

To run the regression tests, I currently have to run on two different hardware setups. One that is connected to 12 physical switches, 4 LEDs representing solenoids, and 8 LEDs representing incandescent bulbs. The board also has a Neopixel output, but I accidentally screwed up that pin, so I now need to run those tests on a separate board which is the next step in regression tests. Here is how to run most of the regression tests.

Run non-Neopixel regression tests:

  1. Change to RegrTest folder:
    cd repos/Python/RegrTestG2
  2. Run regression tests
    sudo python3 RegrTestG2.py -port=/dev/ttyACM0 -stm32 -vers=3.0.0.1 -skipNeopixelTests

    The python RegrTestG2.py prints out instructions and expected outcomes. This has just been updated to work with Python 3.x which was the majority of the work.

Run Neopixel tests only. (attach gnd, 3.3V->+5V, B15->DIO):

  1. Change to RegrTest folder:
    cd repos/Python/RegrTestG2
  2. Run regression tests
    sudo python3 RegrTestG2.py -port=/dev/ttyACM0 -stm32 -vers=3.0.0.1 -skipSolTests -skipIncandTests -skipSerNumTests

    The python RegrTestG2.py prints out instructions and expected outcomes. This has just been updated to work with Python 3.x which was the majority of the work.

Run the update script to insure updating is working:

  1. Load version 3.0.0.0 using STLink
    move Boot0 from 0 to 1
    cd repos/Stm32Workbench/Gen3Images
    st-flash –format ihex write OppStm32.3.0.0.0.hex
    move Boot0 from 1 to 0
  2. Verify version is 3.0.0.0
    cd ../../Python/Gent2Test
    sudo python3 Gen2Test.py -port=/dev/ttyACM0
  3. Upgrade to latest version. (Grabs latest .hex version from Gen3Images)
    cd ../Stm32UpdApp
    sudo python3 updApp.py -port=/dev/ttyACM0 -hex=../../Stm32Workbench/Gen3Images/OppStm32.3.0.0.1.hex
  4. If usb isn’t installed yet (i.e. import usb fails in Python script) install these packages and try again
    sudo apt install python3-usb
    sudo apt install libusb-1.0-0-dev

5/7/2026 – Mostly Infrastructure this week

I finished up watching the fantastic videos by Anthony van Winkle which you can find on this channel: https://www.youtube.com/@paradigm-tilt. In the end there are 5 videos which are about 1/2 hour each and you can run through them pretty quickly. It helped me get started with setting up all the switches, coils, and creating my first few modes such as attract, base, and jackpot mode. While most of those modes are really preliminary, it got my feet wet and hopefully I started understanding the Mission Pinball Framework paradigm which centers around events and processing events.

I created the initial SS3 repository which will be available publicly. Here are the quick few instructions that I used for that.

  1. Install git lfs:
    sudo apt-get install git-lfs
  2. Change to correct directory and clone repository:
    cd ~/Pinball
    git clone git@github.com:openpinballproject/SS3.git
  3. Change to repository root folder:
    cd ~/Pinball/SS3
  4. Enable lfs for the repository
    git lfs install

There are some detailed instructions in the videos about which files should be in the large file system (lfs) portion of the repository, and how that is set up, so those instructions don’t need to be copied here.

The copyrighted music was going to be an issue, so I did the following to reduce the length of the songs and lower the fidelity. This should prevent any DCMA issues with posting the code, and still allow the scripts to run properly if you simply clone the repository.

  1. Install ffmpeg:
    sudo apt install ffmpeg
  2. Reduce to 8 seconds in length and lower fidelity:
    ffmpeg -i GoodBadUgly.mp3 -ss 00:00:00 -t 8 -ar 22050 -b:a 64k GoodBadUglyShort.mp3

This takes GoodBadUgly.mp3 and converts it into GoodBadUglyShort.mp3. I saved off the original versions, and only stored the Short versions in the repository after renaming them to the original names.

Now it is time to get the virtual playfield up and running following the instructions on this page: https://missionpinball.org/latest/tools/monitor/running/. MPF Monitor is the virtual environment that you can use to “playtest” features by clicking on switches using a picture of your playfield set up with the locations of the switches, lights, etc. Turns out the above commands didn’t actually install MPF Monitor.

To install MPF Monitor run the following commands.

  1. Install MPF monitor and dependencies:
    pip install mpf-monitor
  2. There is a dependency on libxcb-curser-dev that isn’t taken care of, so install that:
    sudo apt-get install libxcb-cursor-dev

Then I took a snapshot of my playfield, and named that file ~/Pinball/SS3/monitor/playfield.jpg. Here’s a quick picture of what that looks like. (I had to rotate it, cut it down to little so you don’t see all the mess next to the machine.) I would love to say that I watched Jan’s video on how to set this up, but it was so intuitive, I didn’t end up watching that video. That is a true testament to all the people who have worked on and contributed to MPF.

Alrighty. Now it is time to try and start everything up from scratch.

  1. Create two bash windows, go to the correct folder, and start the virtual environment:
    cd ~/Pinball/SS3
    . ~/Pinball/mpfenv/bin/activate
  2. In the first window, start MPF and the Godot engine (this sends events to stdout which is why I give it its own bash window):
    mpf both -xt -G Godot -g gmc
  3. In the second window, start MPF Monitor (creates the Inspector window):
    mpf monitor

In the Inspector window, under Monitor, check the Show device window, and Show playfield window checkboxes. This should pop up your playfield picture the Devices window allows you to drag and drop switches and lights onto the playfield picture. I then positioned each of the lights that I have defined on the playfield and each switches at the correct spot on the playfield by dragging them from the Devices window. MPF will remember where you placed these items, and the size that you want the items. I put things like the flipper buttons on the flippers themselves since throwing them on the left and right of the playfield image might be less clear. I tossed a few extra labels on the playfield image to make the cabinet switches clearer. Lastly I tested the base mode and the jackpot mode by triggering using switch presses in MPF monitor instead of using the hot keys. A left mouse button press triggers a switch momentarily, then clears it, while a right mouse button press, toggles between the switch active and switch inactive states. Very nice!

Here is what it looks like with all the switches (squares) and lights (circles) placed. You can see there is a virtual ball in the trough so the trough switch is active (green).

Looks like it is about time to start recoding the light shows for the attract mode.

5/1/2026 – Installation of MPF(0.80)/Godot

This week was focused on getting MPF up and running. Version 0.80 of MPF uses Godot which is a graphics gaming engine or some such thing. Since I’m natively an embedded guy, I don’t keep up on graphics engines such as Unity, Unreal or Godot, but another of my retired friends mentioned he is developing a game in it after switching from Unity. My graphics needs are minimal (show slides, updates scores), so Godot should be perfect.

My old pinball laptop was over 13 years old and it just wasn’t cutting it anymore. (The display had such a low resolution that the IDE could only display 20 or 30 lines of code at a time. The newer IDEs tend to lard up a lot of the screen with information which is not the code. (I’m looking at you Visual Code)) That makes coding really painful, and I found myself just not wanting to turn on the laptop. A few months back, work was getting rid of a whole bunch of laptops that couldn’t run Windows 11. I grabbed the laptop for $100 and threw Linux Mint on it, and the experience is much more pleasant. (It was so pleasant, that I bought a second laptop for the family computer, then gave the old family laptop to my mom since her old windows machine was unbearably slow.) I chose Linux Mint because it is currently one of the darling distributions of the Linux community and I used it at work a couple years back and it just worked flawlessly. I’m sure the Ubuntu experience would be the same (Mint seems to be a skinnied down version of Ubuntu).

I headed over to MPF and found that the next upcoming version is 0.80. It is in pre-release, but it seems to have been in pre-release for quite a while, so it should be pretty stable. The other reason to use this version is that if I find issues, I can give back to the MPF community. I started trying to following the MPF instructions, but it was a mish-mash of the previous released version and the newer pre-released version. Eventually I came upon a bunch of videos from Anthony van Winkle. These are spectacular. He mentions most MPF users are developing on windows, so maybe these Linux Mint centric instructions will be helpful to somebody.

This video, https://www.youtube.com/watch?v=rQqKG2Ie6KM, was the basis for most of these instructions. The video is very clear and well worth a watch at the same time you are setting up your machine.

  1. pip was not installed by default, so ran:
    sudo apt install python3-pip
  2. Get python3 version (mine reports Python 3.12.3):
    python3 –version
  3. Install correct virtual environment:
    sudo apt install python3.12-venv
  4. Make the Pinball folder will contain everything:
    mkdir ~/Pinball
  5. Create the virtual environment:
    python3 -m venv ~/Pinball/mpfenv
  6. Activate the virtual environment (prompt prepends (mpfenv) after activated):
    . ~/Pinball/mpfenv/bin/activate
  7. Verify python version (now works without specifying python3):
    python –version
  8. Install MPF and dependencies:
    pip install mpf –pre
  9. To update to latest version (not necessary since it defaults to this):
    pip install –upgrade mpf
  10. Grab the current version to verify the active version (reports “Mission Pinball Framework v0.80.0.dev14”):
    mpf –version
  11. Create the pinball folder and call MPF initialize of the folder:
    mkdir -p ~/Pinball/SS3
    cd ~/Pinball/SS3
    mpf init
  12. Verify everything is working (verify it gets to Mode.attract, ctl-c exits MPF after it is verified to work):
    mpf -xtb

That’s the end of the first video. I was like wait, we didn’t set up Godot. Did it get set up automatically with the rest of the dependencies? Then I found the second video: https://www.youtube.com/watch?v=IO3U1SMZ5-A. Again following along with the video and these instructions should work well for you.

  1. Download the Godot engine from https://godotengine.org/download/linux/. Choose the Linux-x86_64 version under All downloads. Extract the download to /usr/local/bin folder so all users have access to it. Make it so it can be updated easily:
    sudo mkdir /usr/local/bin/godot
    sudo unzip ~/Downloads/Godot_v4.6.2-stable_linux.x86_64.zip -d /usr/local/bin/godot
    sudo ln -s /usr/local/bin/godot/Godot_v4.6.2-stable_linux.x86_64 /usr/local/bin/Godot
  2. Create a gmc folder to keep things tidy:
    mkdir ~/Pinball/SS3/gmc
  3. Start Godot (since it is in /usr/local/bin this command is now available in bash and the symlink makes updating to a new version easier):
    Godot
  4. Create a New Project, Project Name is SS3, don’t create a folder, browse to ~/Pinball/SS3/gmc for Project Path, and choose Mobile for Renderer.
  5. Go to AssetLib, switch to Online, search for GMC, Download, Install, (a bunch of errors will pop up quickly, but choose OK.
  6. Enable plugins. In Godot choose Project->Project Settings, Plugins tab check the Godot MC Enabled box to On. On Globals tab, click the Folder icon to add a new path choose addons, mpf-gmc, mpf_gmc.gd and press Open. Change Node Name to MPF, press Add button. Press Close to get out of Project Settings window.
  7. Add audio busses. At bottom choose Audio tab and press Add Bus button and create channels for music, voice and effects.
  8. Save the config so Scene->Save Scene or ctl-s is the shortcut.
  9. Create gmc.cfg by using the following command in bash:
    echo -e “[sound_system]\nmusic={\”type\”: \”solo\”}\neffects={\”type\”: \”simultaneous\”, \”simultaneous_sounds\”: 3, \”default\”: true}\nvoice={\”type\”: \”sequential\”}” > ~/Pinball/SS3/gmc/gmc.cfg
  10. Create necessary folders:
    mkdir -p ~/Pinball/SS3/gmc/{slides,images,sounds} ~/Pinball/SS3/gmc/sounds/{effects,music,voice}
  11. In Godot application, in slides folder, right-click, Create New->Scene. Choose Node, press the class button to right, search for MPFSlide and press Pick. Change Scene Name to attract and press OK.
  12. Set screen size. Project->Project Settings, Display-Window, set Viewport Width to 1280, and Viewport Height to 1024.

    Here is where I deviated from the tutorial video.
  13. Copy all the images into the Godot project:
    cp repos/Python/PinballFramework/SS3/graphics/*.jpg ~/Pinball/SS3/gmc/images
  14. Copy all the audio into the Godot project (this copies all the SS3 sounds as voice callouts. Some are actually effects, so I ended up moving the effects into the sounds/effects folder with the file explorer:
    cp repos/Python/PinballFramework/SS3/sounds/* ~/Pinball/SS3/gmc/sounds/voice
  15. Copy copyrighted material to sounds directory:
    cp copyrightedStuff/* ~/Pinball/SS3/gmc/sounds/music
  16. Add a Sprite2D child to the Attract scene. Highlight Attract in Godot, press the + button, search for Sprite2D and press Create. Highlight the new Sprite2D node, in Inspector on the right, in the Texture field, use File Selector to choose sal_empty.jpg file.
  17. Press ctl-s in Godot to save the changes.
  18. Add the sound player to attract.yaml:
    echo -e “\nsound_player:\n mode_attract_started:\n GoodBadUgly:\n bus: music” >> ~/Pinball/SS3/modes/attract/config/attract.yaml
  19. In Godot, Project->Project Settings, Application-Run, Main Scene, browse to addons/mpf-gmc/slides/window.tscn and Open. Close Project Settings window and press ctl-s to save.
  20. In Godot, press the run button and verify the window opens
  21. In mpf virtual environment bash script, start MPF:
    mpf -xt

This is the end of the second video. Holy Scheisse, it just frickin’ works. I recognize that I’m just following a couple simple tutorials, but this is much simpler than 3 or 4 years ago when I tried to do some simple things with MPF and it just locked up. I have to give a shout out to Anthony van Winkle for doing these new videos. They are very clear. This is already farther than I got last time, I’m definitely going to go through the rest of his videos. Here is the money shot (with music playing):

So what were the difficulties I ran into? Basically none! I had to power up SS3 in the basement (still cold down there), find a USB keyboard (last weekend was electronics recycling and I unfortunately got rid of almost all my extra USB keyboards…Doh!) and grab the copyrighted songs. I noticed SS3 is running Windows XP. I love that startup sound. I am a little worried about how I am going to publish my MPF yaml files. They will require the copyrighted songs to play properly, but I can’t put them in my repository. In my crappy PinballFramework, I had a copyrighted folder which wasn’t meant to be stored in the repository. If the file was not found in the copyrighted folder, it played a default sound which basically said, “Copyrighted”. That meant the framework would continue to run but there would be no DMCA issues. The other way is to create fair use versions of the copyrighted material. (Another annoyingly gray area of copyright law where maybe a snippet less than 10s and reduce the quality by a good bit).

Here are the quick instructions to run MPF when just booting up Mint:

  1. Create two terminal windows
  2. In the first window start up Godot (works since placed in /usr/local/bin):
    Godot
  3. In Godot, open the project and press the Run button
  4. In second window, go to machine folder:
    cd ~/Pinball/SS3
  5. Start virtual environment:
    . ~/Pinball/mpfenv/bin/activate
  6. Start mpf:
    mpf -xt

It should now all be running properly. Nice! I look forward to the next video in the series, but probably won’t get to it until next week.

4/28/2026 – We’re back (for next two years)

Crap, I don’t even know how to write blog posts anymore. Seems I took a few years off. (Looks like about two from the date on my last post.) I’ve just been chilling, working a lot, and easing my way through life. I hope I can publish this post when I finish writing it. Sheesh, that would be unfortunate if I can’t figure it out but it has been a while.

OK…why do I say two years. I am going to finish all the things that I have left on my docket…and that will hopefully happen within the next two years. As you may know, Pintastic 2026 just finished up, and Pintastic is the stake in the ground that I am going to use for finishing projects. That means that I have two major projects that I want to get finished over the next two years.

Project 1: Convert SharpeShooter III to using Mission Pinball Framework (MPF). It currently runs on a very skinny python framework that I wrote myself and interfaces directly to the OPP firmware using serial commands. That framework will never be as good as MPF, and so it is time to convert everything over to MPF. I’m going to convert all the current modes, scoring, etc directly to MPF yaml files. I plan on writing about my experiences doing this and expect to produce a blog post every week or so about my journey. Switching to MPF will allow me to fix some annoyances such as not having a ball search algorithm which means the kick-out hole can stall the game if the kick doesn’t eject the ball properly after a few tries. I also want to add some more features that I never got around to implementing. Since there is a kickout hole, I plan on adding a second ball, second switch in the ball trough, and a multi-ball mode. Second major add is a video mode which I created graphics for on the backglass, but never got around to implementing. This should be a very achievable goal over the next year. I will be bringing the updated version of SharpeShooter III to Pintastic 2027 and it would be great if the guy that always brings his Sharpshooter 2 to Pintastic could bring his again, and we can have them side by side. Old vs new. Where it started from versus how you can change a game by making limited modifications. It should be interesting.

Project 2: Create the Disaster the pinball machine. As the name suggests, this has been a Disaster so far. Well, really the issue is that I haven’t spent any time on it. There are some cool ideas I have in mind but right now, absolutely everything is up in the air with this machine. Luckily I have two years to get it done and bring it to Pintastic 2028. I think Joe Z is the only person that I ever described the layout to, but that was so many years ago, I doubt if he remembers. Let’s just say there are a lot of things that need to come together to make the machine even 1/2 the machine I want it to be. Two years is probably too aggressive, but screw it, that is what deadlines are for. The deadline is showing Disaster at Pintastic 2028.

So why am I spending more time back in pinball? Basically I decided to retire last week (4/22/2026) and now need projects to keep myself busy. Yeah, the honeydo list is building and I just spent a couple hours today working on the house, but I suspect I will have a whole bunch more time in the coming years to just work on fun projects. So there we are. Sorry for being away for so long, but I was a little burned out with work. Not so much a problem anymore. That’s all folks.

2/29/2024 – OPP STM32 now has a bootloader!

Good gosh. I started working on the bootloader it seems like multiple years ago. Well, I finally got around to finishing it this past month. You may wonder what a bootloader does for you? Well, you can now update the OPP firmware (from this version onward) without plugging in the debugger, moving jumpers, etc. All previous versions of OPP hardware supported a bootloader, but since the STM32 contains the USB within the processor, it was significantly more difficult to support.

So the first 4K of the processor flash is now reserved for the bootloader. The application then sits above the bootloader. The bootloader verifies that the application is valid (by calculating a CRC32 over the application) and then, if it matches the stored value, it jumps and starts running the application. I have seen other bootloader for the STM32 which take up to 20K of the flash. That seemed a little bit ludicrous, (and wasteful of resources), so I worked to make it as small as possible.

The newest version of OPP that contains the bootloader is 3.0.0.0. You can grab it from the repository, but to get this version onto your board you will need to load it through a ST-LINK V2. After that initial load, the python script located at repos/Python/Stm32UpdApp/updApp.py can update to newer versions of code.

While I was mucking around in python scripts, I updated Gen2Test.py to support both python 2.x and python 3.x. No more forcing people to load python 2.x just so they can program OPP firmware. (updApp.py also supports both python 2.x and python 3.x and has been tested on windows boxes and linux (ubuntu) boxes). Hopefully that is enough testing for most systems.

The last new python script is found in repos/Python/Stm32UpdApp/showMeTheCfg.py. This script jumps to the bootloader, reads the configuration sector, and then makes a report of the configuration in hopefully easy to read and understand descriptions for each pin. The script works on hardware, or can use the configuration file used to program the board with Gen2Test.py. It looks at the configuration and points out any configuration errors that it finds. The configuration is only for STM32 based OPP configurations (not PSOC4200 (Gen2) based or HCS08 (Gen1) based hardware).

At this point, I don’t know of any other features people have requested to be added to OPP. This code would allow MPF to automatically update hardware OPP STM32 if people so desire it. I don’t think there are any real plans for that, but hey, it is a possibility. That’s all I have.

Happy leap day everyone!

-H

11/14/2021 – Year End Update and Pintastic on 11/19/2021

What? A year end update in the middle of November? Well, hey, why not. OPP just released a new regression tested version of firmware (2.3.0.0) and with that, there needs to be some celebrating!

First up, I gotta thank Cobra18t because many of the additional features to OPP firmware would not have been done without him pushing me. There’s been some really great things that were always on the back burner, but with his tireless pushing of the homebrew pinball envelope, he kicked my butt enough to force support. Let’s talk about each of the added features, since, well, I haven’t actually updated the blog for six or so months.

  1. Fade support added for Incandescent wings. Sorry about how long this took to support, but after all the work on fading done for NeoPixels, it became very easy to support it for incandescent boards. JWilson (PinballMakers website guru) asked me for this years ago, but I was always worried that the processor didn’t have the umph. With the switch to STM32, many things became significantly easier because of the extra horsepower in the processor. Fade support was made “generic” and this was leveraged later in the year for other new projects.
  2. Added WING_SW_MATRIX_OUT_LOW wing type which allows active low switch matrices to be supported. This removes the need for MPF users to use type: NC (normally closed) and reverse logic. I think it also forced users to wire hook into the matrix “backwards”, so those dark days are now behind us.
  3. Lamp matrices are now supported. I think Cobra even sells a board to do this. Always thought I was going to get around to doing this board, but fortunately Cobra beat me to it. He did all of the testing which made my life even easier. Funny part is that I have actually never seen this board, but yet the firmware is driving it without an issue. (Nice remote integration!)
  4. Minor bug fixed that was causing Neopixel processing to stop after a long time. This one was absolutely nasty to find, until Cobra finally found something to reproduce this issue very quickly. As with all these things, once we new the issue, the fix was very simple. This makes Neopixel processing rock steady (and significantly more efficient than FadeCandy). Why buy a $20 board when you can grab a $3 board that does the job a little more efficiently. The main issue I had with FadeCandy was the crappy pixel server that ended up eating a whole core just to run updates. Phoey.
  5. Added servo support on wing 1. Any input on wing 1 can now be configured as a PWM output to support a servo motor. Servo outputs also use the generic fade commands so that they can move between two positions without the host processor intervention. That essentially allows velocity of moves to be programmed. (No acceleration support, but should be good enough for pinball toys).
  6. SPI LED support (aka SK8922 and APA102 chips). Why not? Krayon wanted brighter LEDs and said the SPI LEDs were much brighter. Boom…support was added after he twisted my arm. (It was actually relatively simple and uses 90% of the same code as the Neopixel code.)
  7. PWM the initial kick pulse to reduce initial kick power. Both Jan and Cobra ask for this, but Cobra had some great justifications. He implored, that many homebrew pinball people were digging in the scrap heap (I know I’m one of them), and sometimes get parts that run at various high voltages. While reducing the initial kick pulse length works in most cases, it is actually better to reduce the voltage to the solenoid by PWMing the driving MOSFET. (Wow, that last sentence is wayyyy oversimplifying driving a coil, but I’ll ignore that fact). Well, it is hard to argue with that logic, and so support was added. While in there, the firmware was changed for the hold PWM to use a period of 1 ms instead of 16 ms. This should reduce the amount of drooping seen in machines that PWM their flippers for the hold portion of the cycle. (It also means that the hold will be slightly more powerful, so be careful of that).

Wow, that is a crap ton of new features this year…and that doesn’t even talk about the hardware side. Cobra created an all in one board that now allows people to buy a single centralized solution to drive their pinball machine. He ran a Kickstarter, and kicked some serious butt by getting supporters. He does mention OPP has been around since 2016, but the blog started in 2012, and the first boards were received on 5/30/2012. Wow. Six months from now will be the 10 year anniversary. Back to Cobra and his multiple projects. He also created a Satellite board with 8 solenoids, Neopixels, and 23 direct inputs. But he wasn’t done. Why not an Xpansion board that has an 8×8 lamp matrix, 8 solenoids, and 8 switch inputs. Then he created Neopixel based segment displays. When does this guy sleep? Read about the projects on Pinball Makers. Buy his stuff through his shop if you so desire. He isn’t beating my $60 bargain basement pinball controller, solder itself price, but for those that don’t want the hassle, it is a darn fine way to go. (See Gerry, it wasn’t me that you needed to worry about, it was actually Cobra! I’m too lazy and don’t want the hassles of selling to people). Cobra has also been great at answering questions on the MPF forums, which I rarely do.

How can I give shout outs to people without mentioning Jan. His tireless dedication to MPF and supporting all the random features that I create has made OPP much more accessible to the masses. Jan, you keep moving MPF forward, which most open source projects fizzle away because of a lack of a champion.

So what else is going on? Well, Pintastic moved from a Summer based show to, well, this coming weekend. I think it runs from Thursday to Saturday 11/18/2021 – 11/21/2021. The one event that I always attend is the homebrew forum which is at 3:30 pm on 11/19/2021. The origins of that forum has been going on since like 2015 which was some pretty early times in the homebrew pinball community. We have come a long way from there, and I think there are supposed to be something like eight homebrew machines this year. I’m going to grab a couple games on Sonic Spinball, but it is always interesting to see what else is out there and what unique ideas people have. Hilariously, I have never met anybody who reads this blog. Make my day if you see me. Mention that you have stumbled upon this blog, and maybe it will get me to post updates more than two times a year. (Unlikely, but it is always a possibility).

Maybe something big will happen next year, but maybe not. I hate to make promises that I will never complete, so this year, ha, ha, absolutely no promises for next year. Gives me a 100% guarantee that I will complete those goals.

I’m going to end with a quote by Jan, which made my day when he sent it to me. (I hope he is alright with me sharing it, but he probably doesn’t read this blog either so he will never find out that I posted it.)

Jan says, “OPP rocks! By now it left all independent vendors behind feature wise. Spike still has some additional stuff but OPP is getting close.”

I’m coming for you, Spike you over priced shift based register solution. (Cobra says it isn’t overprice, but, ehhh, let me live in my dream world. Hey Cobra, it is so overpriced if you buy it from Terry and his scalping prices.) On that bitter note, everybody keep on building homebrew pinball machines! Let’s see some of that creativity out there so it just isn’t one fan layout after another.

6/6/2021 – Neopixel firmware fix

For those of you using OPP to drive Nopixels, Cobra18t found a bug in the firmware that was just updated in the repository. After about 2 hours of playing his machine, the Neopixels updates would stop working, but everything else (switch inputs, solenoids, serial comands) worked perfectly. We spent the last couple of weeks trying different things and attempting to make it more reproducible. On Thursday he found that if he shorted PB12 to ground, the Neopixel updates stopped immediately. This was the info we needed to track the issue down to the root cause and found the NSS pin was not being ignored. The firmware was updated to configure NSS as under software control and that has seemed to fix the problems. A full regression test was run and version 2.2.0.0 is now available in the repository. I would suggest updating if using Neopixels and OPP. (I’ve also added verification of serial commands, so malformed commands will simply be ignored. This was one of the guesses of what the original problem might be.)

2/12/2021 – New features are coming

Well it has been relatively quiet over in OPP firmware land, but with the advent of the CobraPin kickstarter, a couple more features were added. Going back into the way back machine, Jeremy from many years ago asked me to support different intensities for incandescent wings. With all of the work that Cobra and Jan put into helping me test the Neopixel features, it seemed that it was time to leverage those commands and support 32 levels of intensities for incandescent bulbs. Just as with Neopixels, a command can be sent to set the intensity of each bulb from 0 (off) to 0xff (100% of its full blazing glory).

The incandescent intensity command is the same as the Neopixel fade command with an offset of 0x1000 to indicate an incandescent bulb intensity is to be changed. So an offset of 0x1003 changes the intensity of the fourth bulb. The STM32 supports up to 32 incandescent bulbs, so the offsets range from 0x1000 to 0x101f.

But wait, there is more! If OPP can support various incandescent bulb intensities, why not also support fading of incandescent bulbs just like you can fade Neopixels on and off. You ask for it (well actually nobody ask for this feature, so let’s start again)…Nobody ask for it, so that’s why it was coded. The OPP fade engine is now generic so it can apply fades and various fade times to individual LEDs within the Neopixels, or incandescent lamps. Just like setting intensities, it works exactly like Neopixel fading except with an offset of 0x1000 for the first bulb.

You’re probably thinking to yourself that those changes are more than sufficient for all your pinball needs, but no, you wouldn’t be correct. Turns out some people don’t like that the switch matrix is driven using active high logic. So very few pinball machines use active high logic (unfortunately the Bally machine that I implemented switch matrices on was one of them). Because of that, some people had to switch the columns and rows of their switch matrix to make it work. Those days are now over. Change the python wing configuration from WING_SW_MATRIX_OUT to WING_SW_MATRIX_OUT_LOW and badda bing, it is now an active low switch matrix. I doubt if anyone will change the configuration of currently running machines, but future machines may benefit from this change.

One last big non-announcement. A new plank board is being created by Cobra18t. I even heard he ordered a prototype just a couple of days ago. We have been going back and forth with firmware and trying to get everything just right. I cut him a firmware version a day or two ago, and we both agree that it looks like it might be fully working with the limited test setup that he cobbled together. I’m not going to spill the beans and tell you what the new plank is, but I will let him announce it when he is good, ready, and happy with its performance.

So, yeah, I can support more features in the firmware (of course it makes the firmware more complex which some wonder why all the complexity (that comment made me chuckle to myself…hey, why is OPP code so complex, but I’m using all the Arduino framework, and a black pill)) but these features aren’t supported in MPF as of this moment. (Heck, Jan doesn’t even know about them unless he reads the blog). He mentioned half a year ago that it would be easy to support incandescent lamp intensities. I assume that also applies to supporting incandescent fading. The active low switch matrix should be very simple for MPF to support. Hopefully a kind soul will add the MPF support for these features.