Jump to content



Photo
* * * * * 6 votes

FastFlips script (bypassing pinmame flipper callback)


  • Please log in to reply
440 replies to this topic

#1 nFozzy

nFozzy

    Pinball Fan

  • Members
  • PipPipPipPip
  • 553 posts

  • Flag: ---------

  • Favorite Pinball: Pinbot

Posted 07 September 2017 - 09:22 AM

**Beta Update**

Okay have a new core ready for testing

 

This goes in the /scripts folder (backup your old core.vbs first in case something goes wrong)

https://www.dropbox....testar.zip?dl=0
 

cvpmFlips2 (FastFlips 2) beta 1 changelog

Redesigned to better support games from the solid-state flipper era, including previously unsupported games thanks to DJrobX and Stumblor!

- New Feature Switches from script to rom control after a delay (100ms default, vpmflips.RomControlDelay)
    -This works independently for each flipper, ex. the Thing Flip will not interfere even briefly with lower flippers
- New Feature - vpmFlips.Enabled. vpmFlips.Enabled = True / False will enable / disable fastflips. (This does the same thing as vpmflipsSAM.RomControl)
    -This may be necessary to manually disable fastflips for video mode on some games
- New method to disable upper flippers without getting rom errors from the double action cab switches: call helper subs NoUpperLeftFlipper, NoUpperRightFlipper
    -On SS games that reuse upper flipper COILS, call the appropriate helper subs from the table script: NoUpperLeftFlipper, NoUpperRightFlipper (for example AFM)
    -On SS games that reuse upper flipper SWITCHES, you will still need the cSingleLFlip/cSingleRFlip lines! (for example Indiana Jones reuses coils and switches and therefore needs BOTH!)
- Initializes using pulsetimer so the 'VpmInit Me' line is no longer necessary (this may change)

 

A note for WPC games and the beta core.vbs-

Later era WPCs often reuse the upper flipper coils for diverters. These diverters are otherwise identical to flippers, so the script can get confused.

 

If necessary, add these lines to the table script (anywhere under the loadVPM line)

NoUpperLeftFlipper
NoUpperRightFlipper

 

 

 

 

**Update**

Fastflips is part of the core scripts now (cvpmflips), and can be installed with minimal script modification

 

To install, works for VP8, VP9, VP10, whatever:

If the table's already using fastflips or it's own solution to the problem, don't bother :)

1. Open table script

2. Search for 'UseSolenoids' and change it's value to 2

3. Add the line 'VpmInit me' to the table _init section if it's not there already (search for '_init', it's usually Table1_Init or Table_Init)

 

Game compatibility:

This is designed primarily for pre-solid state flipper games.

Data East, Williams Fliptronics and WPC-Security games are compatible, (Addams Family through Jack*Bot) but any rom controlled flipper effects won't work. More info can be found in wpc.vbs.

 

These games are NOT compatible:

Old games: Zaccaria, LTD

New stuff: Sega Whitestar, (Apollo 13 / Goldeneye onward) WPC95, (Congo/AFM onward) and Capcom, Modern Stern.

 

Latest Hotfix 1/14/2018 (Indiana Jones fix, dead flippers fix for certain windows languages)

Install on top of the VP10.5 beta scripts

https://www.dropbox.... fix 2.zip?dl=0

 

****

 

By bypassing the pinmame flipper call and response, flippers will be more responsive and will have less randomness. Plenty of tables do this already, but it's underutilized. For games that predate solid state flippers, this is the proper way to do it.

 

I wanted a script that was as quick and simple to install as possible. I cleaned up my personal script for this and converted it into an object. so if anyone has any feedback on installation, compatibility issues, or how it could be simplified further, let me know. Here it is:

 

https://pastebin.com...K (version 1.0)

https://pastebin.com/912pL02q (version 1.1) (newest)

 

Should work for most games up to (but not including) WPC 95' / Whitestar / Capcom. I put all the game-on solenoid numbers that I'm aware of at the top of the script, but so far it's an incomplete list of US-made machines post-86'. Earlier solid states might need to piggyback off of a specific lamp instead of a solenoid.

 

Some helpful installation guides:

An example modified script https://www.diffchecker.com/1bXOCqdB

Youtube video from Slydog43 https://youtu.be/a1pQkwqxXCQ


Edited by nFozzy, 16 August 2018 - 06:21 AM.


#2 toxie

toxie

    VPF Veteran

  • VP Dev Team
  • PipPipPipPipPipPip
  • 5,734 posts
  • Location:berlin, germany

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 07 September 2017 - 11:00 AM

Great!

Do you have a suggestion how we could make this part of the core.vbs?



#3 nFozzy

nFozzy

    Pinball Fan

  • Members
  • PipPipPipPip
  • 553 posts

  • Flag: ---------

  • Favorite Pinball: Pinbot

Posted 07 September 2017 - 11:13 AM

Sure! It would work fine as a core script, just needs some more testing I think



#4 Slydog43

Slydog43

    Pinball Wizard

  • Platinum Supporter
  • 3,008 posts
  • Location:Hackettstown, NJ

  • Flag: United States of America

  • Favorite Pinball: Addams Family, All Williams 90's Games

Posted 07 September 2017 - 12:30 PM

does this change the response numbers given when hitting F11?  Seems like an incredible new technology. Thanks



#5 toxie

toxie

    VPF Veteran

  • VP Dev Team
  • PipPipPipPipPipPip
  • 5,734 posts
  • Location:berlin, germany

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 07 September 2017 - 12:35 PM

It should.. The numbers are measured from keypress until the flipper move does start/end..



#6 Ben Logan

Ben Logan

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 2,275 posts
  • Location:California

  • Flag: ---------

  • Favorite Pinball: System 11

Posted 08 September 2017 - 12:12 AM

Excellent! I've been pasting four lines of rotatetostart / rotatetoend code into flipper scripts for a few months now thanks to this forum. This looks a lot more sophisticated. What else does this code do, nFozzy? Where do we paste it? Beginning of flipper section of script?

Exciting news. Thanks!

#7 nFozzy

nFozzy

    Pinball Fan

  • Members
  • PipPipPipPip
  • 553 posts

  • Flag: ---------

  • Favorite Pinball: Pinbot

Posted 08 September 2017 - 12:21 AM

Paste the class at the bottom of the script, and then follow the instructions for the rest of the installation



#8 Ben Logan

Ben Logan

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 2,275 posts
  • Location:California

  • Flag: ---------

  • Favorite Pinball: System 11

Posted 08 September 2017 - 12:33 AM

When I use the four lines of code method I mentioned earlier, I know it's working when flippers remain operational after drain. If flippers aren't firing post drain (or pre start of game), does that mean FastFlips is not installed properly? Thanks for your patience with my questions. Totally appreciate your work here, nFozzy.

#9 nFozzy

nFozzy

    Pinball Fan

  • Members
  • PipPipPipPip
  • 553 posts

  • Flag: ---------

  • Favorite Pinball: Pinbot

Posted 08 September 2017 - 12:44 AM

You can check the flipper response time in the debug info (F11 in-game). If 'Left Keypress to Rotate" is <1ms, then it's working correctly. If not, then you need to comment out the pinmame flipper callbacks SolCallback(sLLFlipper) and SolCallback(sLRFlipper)



#10 gtxjoe

gtxjoe

    VPF Veteran

  • VIP
  • 5,151 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness, AbraCadabra



Contributor

Posted 08 September 2017 - 03:12 AM

I tried to integrate the script on 2 tables (Scared Stiff and High Speed) and failed to get it working.  Can you share an original script and a modified script from a converted table to see a working example?  

 

I have some ideas to try and make it easier to integrate but first I need to get it working :)



#11 nFozzy

nFozzy

    Pinball Fan

  • Members
  • PipPipPipPip
  • 553 posts

  • Flag: ---------

  • Favorite Pinball: Pinbot

Posted 08 September 2017 - 03:28 AM

IDK if this is the latest High Speed script, but hopefully this demonstrates how it install it.

https://www.diffchecker.com/1bXOCqdB

The flipper solenoid differs from game to game, for System 11 games it should be SolCallBack(23).

 

 

Scared Stiff is a WPC 95', so not eligible unfortunately.



#12 Thalamus

Thalamus

    Pinball Wizard

  • Platinum Supporter
  • 4,975 posts

  • Flag: Norway

  • Favorite Pinball: GOT, Alien Star, LOTR, TOM

Posted 08 September 2017 - 08:49 AM

Hmm. I tried to put this code into the Avatar mod I was about to release yesterday. Was curious. I must have messed up something I guess, because I could not get it to work. Like Ben, I want to thank you for sharing your knowledge around flipper physics.


From now on. I won't help anyone here at VPF. Please ask Noah why that is.


#13 ganjafarmer

ganjafarmer

    Enthusiast

  • Members
  • PipPipPip
  • 278 posts
  • Location:Poland

  • Flag: Poland

  • Favorite Pinball: Attack from Mars

Posted 08 September 2017 - 01:20 PM

I've tried to use it on High Speed II but i got script error

 

error.jpg


One day i'll build Vitalik statue out of used AMD gpu's.


#14 nFozzy

nFozzy

    Pinball Fan

  • Members
  • PipPipPipPip
  • 553 posts

  • Flag: ---------

  • Favorite Pinball: Pinbot

Posted 08 September 2017 - 08:21 PM

You'll have to point the object to the correct names in the table init section (SolLflipper and SolRflipper are just examples). If the script uses vpmSolFlipper, you'll have to create new flipper subs.

 

Avatar isn't eligible. This is mostly for games that predate solid state flippers. Fliptronics will technically work, but getting the rom controlled flippers to work properly would take a more complicated script.



#15 Slydog43

Slydog43

    Pinball Wizard

  • Platinum Supporter
  • 3,008 posts
  • Location:Hackettstown, NJ

  • Flag: United States of America

  • Favorite Pinball: Addams Family, All Williams 90's Games

Posted 08 September 2017 - 08:29 PM

I'm uploading a little video which I think shows it working

 

see video of adding script stuff to TAF

 

https://youtu.be/a1pQkwqxXCQ


Edited by Slydog43, 08 September 2017 - 08:52 PM.


#16 xenonph

xenonph

    I have Pinball Fever!

  • VIP
  • 4,127 posts
  • Location:Castle Rock, WA.

  • Flag: United States of America

  • Favorite Pinball: TRON Classic-Congo-Xenon-PINBOT-BOP-LOTR-A Real American Hero OPERATION PINBALL-Millionaire-Whirlwind-Krull-NFL-BlackKnight-FishTales

Contributor

Posted 08 September 2017 - 10:02 PM

Thank you so much for the video Steve!!

Exactly the info I needed to help understand how it works and how to implement it!!

Thank you NFozzy!!

Your work is appreciated!!

As Hauntfreaks said the other day, you learn something new everyday with this hobby!!

What a great community!!

Proud to be a part of it.

Carry on Sirs.


CHECK OUT THIS TUTORIAL http://www.vpforums....howtopic=32515
TO USE DB2S BACKGLASS PROGRAM WITH DESKTOP TABLES ON 1 MONITOR
 

#17 ganjafarmer

ganjafarmer

    Enthusiast

  • Members
  • PipPipPip
  • 278 posts
  • Location:Poland

  • Flag: Poland

  • Favorite Pinball: Attack from Mars

Posted 08 September 2017 - 10:43 PM

Fliptronics will technically work, but getting the rom controlled flippers to work properly would take a more complicated script.

 

Maybe when i finish the table you can help with script, right now i got 14-16ms (1000ms/60fps=16,666) so if i can get > 1ms it is huge improvement right?


One day i'll build Vitalik statue out of used AMD gpu's.


#18 nFozzy

nFozzy

    Pinball Fan

  • Members
  • PipPipPipPip
  • 553 posts

  • Flag: ---------

  • Favorite Pinball: Pinbot

Posted 08 September 2017 - 10:53 PM

The only problem with Fliptronics is that the rom-controlled flips (like the Thing flipper) won't work. High Speed II should work fine. Solenoid should be 31.



#19 Thalamus

Thalamus

    Pinball Wizard

  • Platinum Supporter
  • 4,975 posts

  • Flag: Norway

  • Favorite Pinball: GOT, Alien Star, LOTR, TOM

Posted 08 September 2017 - 10:55 PM

Thanks Slydog. Nice to know that I at least did it right. But, then again - thank you for showing me the uncomment feature. As a vim user I'm not a big fan of the editor in general. But, that was a neat feature that can come in handy.


From now on. I won't help anyone here at VPF. Please ask Noah why that is.


#20 Ben Logan

Ben Logan

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 2,275 posts
  • Location:California

  • Flag: ---------

  • Favorite Pinball: System 11

Posted 09 September 2017 - 01:33 AM

I'm uploading a little video which I think shows it working
 
see video of adding script stuff to TAF
 
https://youtu.be/a1pQkwqxXCQ


Thanks for the great video, Stephen. Excellent instructions. Watched your game room tour video while I was at it. Mind blowing! I'd never leave...