Jump to: navigation, search

SkeletonGame

Revision as of 18:08, 21 February 2020 by FortyTwo (talk | contribs) (Created page with " == Skeleton Games HD Programming Reference. == This is meant to be a programming reference for commands, and simple snippets eventually. For setup and getting started with...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Skeleton Games HD Programming Reference.

This is meant to be a programming reference for commands, and simple snippets eventually. For setup and getting started with sample files start at: http://skeletongame.com/


Machine Config YAML: This is where you define your attached hardware sorted by board.

PD-16 (coil-driver board) Define coils or flashers on the PD board Ax-By-z x=board ID (0-16) must not conflict with any other pd-led or pd-16 y=bank on board bank A=0; bank B=1 z=switch id on that bank (0-7) pin 1 is switch ID 0 Tags; Need more detail whats all available, custom tags can also be used, see advanced section Example;

   trough:
       number: A0-B0-3
       pulseTime: 30   # the duration of the pulse, in ms.  Default is 32ms
   plunger:
       number: A0-B0-4
       tags: autoPlunger
       pulseTime: 30   #pulsetime is optional


SW-16 (switch input board) Switches can be Optos or standard, there are certian name reserved for special cases trough1 (or Trough1) must be numbers at end for each ball. troughJam shooter startbutton tilt exit down up enter

Example; PRSwitches:

   # **** Format ****
   # name:
   #   number: <number>
   #   type: <type>
   #
   #   <number> SW-16 board ID multiplied by 16 plus switch number. ID-0 bank-A Switch-0 is "0".  The second bank adds 8 or range is switch 8-15
   #   <type> can be: 'NO' (normally open.  This is the default; so no need to use this)
   #                  'NC' (normally closed.  Common for optos)
   flipperLwL:
       number: 8
       ballsearch: stop
   throughJam:
       number: 37 #21
       type: NC
       ballsearch: reset
       tags: troughJam,tilt_visible #advanced see yaml tags below
   StandUpRight:
       number: 41 #25
       ballsearch: reset
       tags: anyswitch

PD-LED LEDs can be single color or RGB

   #################################################################
   # LED numbering format: Ax-Rr-Gg-Bb
   # x = PD-LED board address
   # r = LED output number connected to the red input of an LED
   # g = LED output number connected to the green input of an LED
   # b = LED output number connected to the blue input of an LED
   #################################################################
   bonus01:
       number: A3-R0-G1-B2
       polarity: False
       tags: bonusMatrixLED
       label: '001 Bonus 1k' 
   startButton:
       number: A3-R83
       polarity: False




Coil

enable coil - self.game.coils.coilname.enable() - are there any arguments for this? turn on full power, usefull for lamps, warning can fry coils. enable coil - self.game.coils.coilname.disable() - are there any arguments for this? turn off power. pulse coil - self.game.coils.coilname.pulse() - are there any arguments for this? pulses coil with either default pulse or defined pulse in config YAML. pulse on pattern - self.game.coils.coilname.schedule(schedule=0x80808080, cycle_seconds=0, now=True) activates coildriver on a on off pattern. -schedule - 8 digit pattern based on intensity can be 1-f -cycle_seconds - no clue here -now=True/False - assume start time?

Example;

       self.game.coils.becon.enable()
       self.game.coils.becon.disable()
       self.game.coils.magnet.pulse()
       self.game.coils.scoopflasher.schedule(schedule=0x80808080, cycle_seconds=0, now=True)


Advanced

Code snippets for common things every program will use, and advanced concepts that are easy to master.

Custom Switch tags: Yaml changes; Code changes; Init/ use.