Author Topic: Support WPC 8-Driver Board (Demo Man, Indiana Jones, etc.) in YAML, pypinproc  (Read 1289 times)

tomlogic

  • Wizard
  • *****
  • Posts: 113
    • View Profile
    • PinMAME for P-ROC/Linux
I've been making good process on my Demolition Man project, but I've reached a point where I'd like to properly support the 8-Driver Board.

See this thread (http://www.pinballcontrollers.com/forum/index.php?topic=1081.msg9592#msg9592) for some background, but basically on some WPC games (Demolition Man, Indiana Jones, Road Show, Star Trek: The Next Generation, and Twilight Zone) there's an auxiliary board used to drive an additional 8 outputs.

On Demolition Man, it drives flashers.  Without making changes, one of my flashers (I think C44) is always on, and it might have even blown my 20VDC fuse on the power driver board.

I've had to hard-code my builds of pypinproc (in pypinproc.cpp) and PinMAME (in src/p-roc/gameitems.cpp) to set switchConfig.use_column_8 to FALSE.  It's normally set to TRUE if the machine type is WPC.

In PinMAME, it might be possible to look at the YAML and set use_column_8 to TRUE only if machineType is WPC and the YAML doesn't contain coil numbered C37 to C44.  From what I'm seeing in pypinproc so far, it might not have enough knowledge of the game to make that decision.

I'm still learning the architecture of the codebase, so I'm at a loss on what the "correct" way to do this should be.  Is it possible with existing pypinproc APIs to change the switch configuration to not use column 8?  Should we default to not using it unless enabled?  Do changes need to extend beyond pypinproc and PinMAME and into libpinproc or pyprocgame?

I'm willing to work on a patch for PinMAME based on my idea of looking for coils C37 through C44 on WPC games to decide how to set use_column_8, if Gerry and others (Snux?) agree that it's a clean solution.  I'd rather defer to others for pypinproc changes.

-Tom

Snux

  • Wizard
  • *****
  • Posts: 779
  • Mark Sunnucks
    • View Profile
Hi Tom,

There were 2 trains of thought with this.  One was either add a new YAML entry (or scan for something, like you're suggesting).  The second was just to hardcode it, which in pinmame would be easy enough as it knows what game you're playing (and the list is never gonna change) and there are already a bunch of special things for specific games in there anyway from before it got 'P-ROCed'.

Hardcoding is a bit nasty though, so if you can derive the logic from the YAML sounds good to me.  If you get it working in pinmame I'll make the same change to the Windows build before I check it all back in soon.  For the pypinproc / pyprocgame piece, drop Compy an email as I think he looks after the code base there these days.
F14 Tomcat - Second Sortie

tomlogic

  • Wizard
  • *****
  • Posts: 113
    • View Profile
    • PinMAME for P-ROC/Linux
Snux,

I've pushed my change into my GitHub repo.  I'm pretty sure it's correct -- my DemoMan is working, and I dumped some debugging output while testing.

https://github.com/tomlogic/pinmame/commit/98b0fc023555a708c07d04c3b730ec637cc01f22

I'm going to explore the Python codebase now, to see if enough of the YAML is visible to that code for it to set things correctly.

UPDATE: I don't know the codebase well enough to feel confident modifying pypinproc.  The best idea I came up with was to update the global switch configuration to turn use_column_8 off if there's a function call referencing drivers 144-151 (corresponding to C37 to C44).  There isn't enough information visible the first time through PinPROC_switch_update_rule() to make a decision, as far as I can tell.

-Tom
« Last Edit: September 03, 2014, 10:11:51 PM by tomlogic »