The FreeWPC toolkit lets you create your pinball controller software. It is currently available for Bally/Williams pinball machines developed from 1990-1999, which were based on their Williams Pinball Controller (WPC) boardset.

FreeWPC is a standalone system. In addition to the pinball-related bits, it brings its own multitasking OS.

There are many homebrew pinball projects these days. Here are some of the advantages that FreeWPC offers:

Open Source

FreeWPC is released under the GPL. You can inspect the source code, modify it, and share it as long as you agree to the terms and conditions of the GPL.

You don't need to buy any special equipment to play with FreeWPC. You can play FreeWPC versions of the WPC machines in the Visual Pinball emulator. If you have a ROM burner, you can install FreeWPC ROMs into your real machine, using the same exact hardware that you already have.

Like many open source projects, FreeWPC is developed using the Linux operating system. Compiling under Windows is possible if you install the Cygwin emulation environment.

Layered

FreeWPC is a clean, well-designed system that is divided into many different layers of functionality. The following architecture diagram illustrates this.

Starting from the bottom, the pinio layer provides access to the underlying machine hardware. These files are very platform-specific. Above that, the hardware managers are common drivers that use the pinio routines to manipulate the machine. The managers expose hardware APIs to the upperhalf of the software stack, which resembles the user space of a traditional OS.

Device drivers implement more complex logic, which typically manipulates different types of hardware simultaneously (e.g. operating coils and counting switches to keep track of the location of all pinballs). The common logic has all of the basic pinball algorithms for the game state machine, tracking high scores and replays, and so on. At the very top is the machine-specific rules logic -- the application -- that coordinates everything.

Optimal

FreeWPC has been written for performance. WPC uses a 2Mhz Motorola 68B09E processor to control everything but sound. There is simply not enough horsepower to be sloppy. The system has been refined continuously over the last 5 years. Performance data is still gathered regularly.

Hardened

Controlling high-powered mechanical devices is inherently dangerous. It is not unreasonable to consider how a software bug could trigger an unfortunate sequence of events, from damaging a few components to catching fire. FreeWPC was designed to minimize this risk as much as possible.

Tested

During all the years of development, FreeWPC has been tested extensively. The most fundamental algorithms have been verified to work properly, and the implementations have been refined and optimized repeatedly. Along the way, as bugs have arisen, the system has been improved to ensure that they don't happen again.

Portable

FreeWPC is written in the C programming language, except for a few parts written in assembly language for performance. Combined with the software abstractions, porting FreeWPC to new hardware should be much easier. Although only WPC is working at the moment, the code already contains traces of support for Sega Whitestar and Pinball 2000. And modifying it to support customized hardware would be just as easy. Ever wanted to make Funhouse a dot-matrix machine? Or have a small PC control a 1970's era game? Not impossible!

Even now, there is a second supported platform, called "native mode". It is still based on the WPC hardware, but programs are compiled to run directly on your development system. I/O physical accesses are emulated internally (without the need for PinMAME) and the builtin multitasking system is replaced with GNU pth. Native mode "draws" the state of the system (using ncurses) so you can see what is going on. And it works under Windows and Linux. The advantage of native mode is the ability to run traditional debuggers, like gdb. The only downsides are that it is not truly realtime anymore, and the 6809 assembly functions cannot be tested.

Copyright © 2007-2010 by Brian Dominy.