Jump to: navigation, search

Sample Game Files

Custom (PDB)

Example Machine Config File (YAML) for P-ROC (sample_pdb.yaml)

sample_pdb.yaml

Example Machine Config File (YAML) for P3-ROC (simple.yaml)

  1. P-ROC Game Description file a sample machine using PDBs (PinballControllers.com Driver Boards) and Serial Switch Boards
PRGame:
    machineType: pdb
    numBalls: 4
PRFlippers:
    - flipperLwR
    - flipperLwL
PRBumpers:
    - slingl
    - slingr
PRSwitches:
    # **** Format ****
    # name:
    #   number: <number>
    #   type: <type>
    #
    #   <number> can be: x (x = 16 * Switch board addr + output number)
    #   <type> can be: 'NO' (normally open.  This is the default; so no need to use this)
    #                  'NC' (normally closed.  Common for optos)


    # flippers shown below are examples of dedicated switches
    flipperLwR:
        number: 0

    flipperLwL:
        number: 1

    # slings shown below are examples of matrix switches
    slingl:
        number: 2

    slingr:
        number: 3

# Coil numbering format: Ax-By-z:

# Capital letters are required, lower case letters represent the numbers:
# x : Board address (0-7)
# y : Bank address (0 for A, 1 for B)
# z : Output number (0-7)

PRCoils:
    flipperLwLMain: 
        number: A0-B1-0
    flipperLwLHold: 
        number: A0-B1-1
    flipperLwRMain: 
        number: A0-B1-2
    flipperLwRHold: 
        number: A0-B1-3
    slingl: 
        number: A0-B1-4
    slingr: 
        number: A0-B1-5
# Lamp numbering format: C-Ax-By-z:R-Am-Bn-p:
# Capital letters are required, lower case letters represent the numbers:
# For Columns (Source circuits - represented by the 'C')
# x : Column board address (0-7)
# y : Column bank address (0 for A, 1 for B)
# z : Output number (0-7)

# For Rows (Sink circuits - represented by the 'R')
# m : Row board address (0-7)
# n : Row bank address (0 for A, 1 for B)
# p : Output number (0-7)


PRLamps:
    testLamp:
        number: C-A1-B0-0:R-A1-B1-0
    VUK_right_b:
        number: C-A1-B0-0:R-A1-B1-1
    VUK_right_g:
        number: C-A1-B0-0:R-A1-B1-2
    VUK_left_g:
        number: C-A1-B0-0:R-A1-B1-3
    VUK_left_b:
        number: C-A1-B0-0:R-A1-B1-4
    VUK_left_r:
        number: C-A1-B0-0:R-A1-B1-5
PRDriverGlobals:
    lamp_matrix_strobe_time: 200
    use_watchdog: True
    watchdog_time: 1000

Simple Game Script (PDB)

import procgame.game
import pinproc 
game = procgame.game.GameController(machine_type=pinproc.MachineTypePDB)
game.load_config('simple.yaml')
game.enable_flippers(enable=True)
game.lamps.testLamp.schedule(schedule=0x00ff00ff, cycle_seconds=0, now=False)
game.run_loop()

WPC

Example Machine Config File (YAML) for WPC (JD.yaml)

JD.yaml

Simple Game Script (WPC)

import procgame.game
import pinproc 
game = procgame.game.GameController(machine_type=pinproc.MachineTypeWPC)
game.load_config('simple.yaml')
game.enable_flippers(enable=True)
game.lamps.testLamp.schedule(schedule=0x00ff00ff, cycle_seconds=0, now=False)
game.run_loop()

Simple Game Script (WPC95)

import procgame.game
import pinproc 
game = procgame.game.GameController(machine_type=pinproc.MachineTypeWPC95)
game.load_config('simple.yaml')
game.enable_flippers(enable=True)
game.lamps.testLamp.schedule(schedule=0x00ff00ff, cycle_seconds=0, now=False)
game.run_loop()

Simple Game Script (WPCAlphanumeric)

import procgame.game
import pinproc 
game = procgame.game.GameController(machine_type=pinproc.MachineTypeWPCAlphanumeric)
game.load_config('simple.yaml')
game.enable_flippers(enable=True)
game.lamps.testLamp.schedule(schedule=0x00ff00ff, cycle_seconds=0, now=False)
game.run_loop()

Stern

Example Machine Config File (YAML) for Stern Whitestar (LOTR.yaml)

LOTR.yaml

Example Machine Config File (YAML) for Stern SAM (POTC.yaml)

POTC.yaml

Simple Game Script (Stern Whitestar)

import procgame.game
import pinproc 
game = procgame.game.GameController(machine_type=pinproc.MachineTypeSternWhitestar)
game.load_config('simple.yaml')
game.enable_flippers(enable=True)
game.lamps.testLamp.schedule(schedule=0x00ff00ff, cycle_seconds=0, now=False)
game.run_loop()

Simple Game Script (Stern SAM)

import procgame.game
import pinproc 
game = procgame.game.GameController(machine_type=pinproc.MachineTypeSternSAM)
game.load_config('simple.yaml')
game.enable_flippers(enable=True)
game.lamps.testLamp.schedule(schedule=0x00ff00ff, cycle_seconds=0, now=False)
game.run_loop()