The main game control program pgcp will be written in C. It will be a multi-threaded program, and will control the overall game flow, query and evaluate the switches, drive the solenoids that need to be activated by the control computer (most coils will be activated directly by the respective sensors under the playfield), lighten the playfield lamps, and control the backbox display and sound playback.

For each of the seperate tasks, there will be a thread of the main program. The threads and their interfaces are explained here.

Game flow

The game flow thread will control the overall behaviour of the pinball game. In general, it will give the player tasks to complete, will calculate the score for completed tasks and hit targets, and oversee "the big picture". For data exchange with the other threads, it will use memory areas protected by appropriate locking mechanisms.

Switch matrix

The switch matrix itself will be polled by the I/O control subsystem which generates messages to the iocd in case of an event on the switches. pgcp connects to the output port of iocd and evaluates the appropriate messages.

Solenoids

[tbd]

Lamp matrix

This thread controls the signalling to the lamp matrix port.

The lamp matrix is accesible as an two-dimensional array of byte values, representing the physical matrix. From this matrix, commands for the I/O control subsystem will be generated and sent to the iocd for orderly forwarding through the serial port.

Display

[tbd]

Sound

[tbd]


CategoryComputer CategoryPinball


THIS DATA IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DATA, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

All product and brand names mentioned on there pages and in the source code are registered names and/or trademarks of the respective owner and are mentioned for identification purposes only.

For a full copyright notice, please see this link. For imprint and contact information, please see http://www.thiemo.net/.

PinBall/GameSoftware/GameControlProgram (last edited 2006-10-30 17:55:07 by ThiemoNordenholz)