Update - February 2018
Today (or rather February) is all about pinball. This post includes a lot of exclusive information which I have not revealed publicly before, so.. enjoy!

Ghostbusters VPX

Update: FarSight Studios, the developer of Pinball Arcade, has requested that the website linked below removes the Ghostbusters VPX downloads. The admins then removed all related discussions, so most of the following links are dead.

When I finished most of the base work in OpenSWE1R (see my last post), I had little to do, so I got into playing (virtual) pinball again. While looking for Pinball stuff on YouTube, I also saw a video of Ghostbusters in the open-source VPX pinball simulator. Impressed by the artwork, I tried to find out more information.

I found the authors post on monsterbashpincab.com which said they were lacking ROM emulation (as I had assumed).

I already knew that the Ghostbusters pinball machine is Linux + ARM based (the hardware is called Stern Spike). I also knew that it was being emulated in the commercial "Pinball Arcade" simulator on Windows and gaming-consoles. So I wondered how they did it.

As I was regularily playing "Pinball Arcade" around that time I decided to take a look at how their emulation works. I knew most of their file formats from my past work anyway.

Turns out they have a DLL for each Spike table. Those DLLs contain the respectives game compiled for Windows / x86. That's probably a result of the partnership with Stern, the original maker of the real machine.

So it's not actually emulation, but using a special made version of the game.

After looking at the DLL I wrote a small proof-of-concept to interface with it, to make the "emulation" usable outside of Pinball Arcade.

However, after a couple of minutes I got bored with it and kept questioning my approach: Why limit emulation to those pinball tables which are simulated in Pinball Arcade?

That's where I branched off into what's described in the next section.

Anyhow, I later still finished my DLL approach, and informed the author of the Ghostbusters VPX table. Some private discussions with other people followed and eventually I uploaded my proof-of-concept DLL loader.

DJRobX then integrated my work into a fork of PinMAME, which was then being used by Tom Tower and Ninuzzu in the actual table simulation.

The result is working Ghostbusters simulation for VPX.

To be honest, it feels like I didn't do much work on this (couple hours of work). However, it still felt very rewarding as many people worked towards a common goal. Since the table got released I've also been getting some generous donations by members of the community. Thanks!

Stern Spike emulation

After questioning the DLL approach for Stern Spike emulation, I decided to look at proper emulation.

So I headed to the Stern website and downloaded their ROM updates for the real pinball tables.

I then reverse engineered their package format (SPK) to extract the updates.
To my knowledge, this was previously not done properly. Most people searched for Sterns original packaging tool (basically using a needle-in-haystack approach) within the older SPK update files. They then used that tool to extract the entire file. I didn't want to do that approach as it felt hacky and I didn't want to depend on copyrighted code to extract these files. Cracking the file format was easy enough anyway and only took half a day or so.

Once the updates had been extracted, I worked on Spike 1 emulation, which is used on older tables (2012 - 2016), including Ghostbusters which was mentioned before.

So let's get a bit more technical!

Those games were statically linked, so emulating them was as easy as running them through qemu-arm and emulating the connected hardware. I had a working emulator in a matter of hours, with only minor issues remaining.

To my knowledge, my emulator now emulates all released Spike 1 game code updates (but only on Linux hosts).

I then also spend some days on writing an automated parser for the official manuals to generate wiring information for emulation. Later I went overboard and added image recognition to figure out the switch and lamp positions on the playfield graphics, however, after 5 days of work on the image recognition I gave up as I couldn't make it work reliably.

These are example screenshots of WWE (including the simulated playfield lights) and Ghostbusters (both Spike 1 games):

With Spike 1 working, it only made sense to look into Spike 2 emulation, which is used on newer tables (2016 - 2018).

While both, Spike 1 and Spike 2 share the same connected node bus system, they replaced the CPU board. Games can also have a LCD instead of a DMD. This is reflected in the software.

Spike 2 games are dynamically linked, use a hardware h264 video decoder through gstreamer, OpenGL ES 3.x (including vendor specific extensions) and require a lot more computational power.

This makes them a lot harder to emulate. Full system emulation seems unfeasible to me.

Still, interested in the challenge, I started Spike 2 emulation using HLE. I don't want to get too much into the details, but the current state is that all Spike 2 game code updates seem to work, with "Star Wars" being the only game with major glitches (due to the 2 displays).

For now, emulation only works for games using Sterns "Radium" game engine. However, all released Spike 2 games currently do that.
Even non-"Radium" games might work, but I'm doing HLE emulation for features specifially used by the current engine.

These are example screenshots of Batman 66 and Star Wars (Both Spike 2 games):

However, in all games there are major memory leaks and smaller issues.
I assume they are easy to fix. I'm just too lazy to do it right now, as it feels like boring work. I prefer the research aspect typically, so when games worked fine I stopped caring.

The same limitation as for Spike 1 also apply: It only works on a Linux host currently. I will probably look for solutions for this, and will improve stability in the future.

So far, this project remains closed source. There's a handful of reasons for this:

  • I'm currently unemployed and I might still want to work for Stern or FarSight in the near future (best to not offend them)
  • The code is very hard to understand as it's full of macros and almost undocumented
  • It only runs on Linux, but VPX only runs on Windows, so nobody would be using it
  • Stern still has the option to add more security, so if they know how exactly the emulation works, they can actively prevent it from working more easily
  • Releasing it (especially for free) might negatively impact the industry as it might devalue the tables
  • I might want to sell parts of this code myself later. Possibly as a hardware emulation dongle for VPX which runs Linux and offloads work. Maybe also third party diagnostic tools for real pinball machines.

That being said, I'm currently considering many options.
If you have any ideas what to do with this or how I should go forward, leave a comment below or reach out to me elsewhere.

I'm very interested what the community thinks, as I'm not completly happy with most options myself.

While the code is not public, I will try to help others who also research these machines. Also, if your Stern Spike machine has CPU or nodebus issues, I'd be willing to help with my knowledge. Just contact me.

I also plan to update the Stern Spike code / documentation in Mission Pinball Framework (which was, coincidentally, written by my bachelor thesis supervisor).

Since my Spike work, I did look into emulation of Pinball 2000, Heighway Pinball and Jersey Jack Pinball machines, too. However, there are ethical, legal and technical reasons which make those less attractive right now. Maybe in the future?