Next: , Previous: Overview, Up: Top


2 Installation

This chapter explains how to install the software.

FreeWPC is mainly a toolkit, and thus is provided in source code format. However, periodically binary ROMs are compiled and published as well. If you are not a developer, but would like to experiment with FreeWPC, you can just download the binary packages and install them in your machine or in your emulator.

If you are a developer and want to write your own game code, for one of the existing games that FreeWPC has been ported to or for a brand new game, you need a source code package.

If you just want to browse the source code, you can view it online at the GitHub repository.

2.1 Binary Packages

Binary packages are available as .zip files, which contain .rom files. These ROMs replace the game ROM only (the U6 chip on the CPU board). If you want to test in a real machine, you need to burn a real EPROM from this file.

If you want to test under PinMAME, you need to copy the ROM file into your PinMAME roms directory; where this is depends on how you installed PinMAME. These directories typically contain .zip files of both the game ROM and sound ROMs together. You'll need to unzip the original file, replace the game ROM, then zip it back. Make sure to save your original game ROM file for when you want to revert back to the Williams code.

2.2 Source Code Packages

The following is a partial list of other programs which are used during the build process: gcc6809, dd, bc, zip, unzip, bash, Perl.

2.3 Directory Layout

The FreeWPC source code tree is organized into the following directories:

kernel/
The core pinball APIs, which are the user-level APIs used to read inputs and control outputs. As a game developer you mostly use the core APIs to interface to the hardware of the machine.

On hardware which requires bank switching (like WPC), these functions are kept in the fixed region of ROM that can be called at any time.

common/
Secondary pinball APIs, also called the Common Pinball Library. These functions are not in fixed ROM and may require bank switching to call.

They are mostly software-related APIs for common features that pinball machines have, like replay, match, and dot-matrix effects.

machine/machine/
The machine-specific files. Every machine has its own directory of files that are specific to it. Each file may or may not be placed into a bank switched region. Generally, you should put game code outside the fixed page as rules are not important enough to keep in system ROM. Custom device drivers must go into system ROM though.
platform/platform/
The platform-specific files. These are mostly used during initialization. Every new pinball hardware platform must define some files here.
cpu/cpu/
The CPU-specific files. For the 6809, these are mostly assembly language files which are optimized for high performance. There are also native versions here when compiling in simulation mode.
fonts/
All font files are kept here. Fonts are stored as normal C code that is compiled as usual, just with a .fon extension to denote that they are actually fonts. These files are autogenerated from more standard font files (like TrueType fonts) and then cleaned up.
drivers/
Driver templates for things like jets, slings, kickbacks, etc. These can be shared across all machines.
include/
All of the include files are kept in here or one of its subdirectories.
build/
Most output files which are not under source control, but generated during the build process, appear here.