Jump to content



Photo
* * * * * 6 votes

FastFlips script (bypassing pinmame flipper callback)


  • Please log in to reply
440 replies to this topic

#241 Schlabber34

Schlabber34

    Enthusiast

  • Members
  • PipPipPip
  • 311 posts

  • Flag: Germany

  • Favorite Pinball: High Speed

Posted 10 July 2018 - 02:32 PM

Nevermind, forgot to hit the install button! Dummy!



#242 DJRobX

DJRobX

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 941 posts
  • Location:Valencia, CA

  • Flag: United States of America

  • Favorite Pinball: F14 Tomcat

Posted 10 July 2018 - 10:31 PM

I've made a new commit: Fast flips for:

 

Elvis, Gprix, Nascar, Ripleys, LOTR*, shrkysht, harl_a30, hiroclas, term3, playboys (Thanks Stumblor)

Also: rtycn, NGG update, ACDC 1.70h.

 

Additionally:  Fix GameOn solenoid instability when ModSol is in use.   This hopefully will remove the need for tweaks to tables that use VPMModSol=1.   The issue was a multi-threading problem - the code temporarily was juggling solenoids 28-32 (because they get moved to 37+ in some cases).   But VPM can possibly read the values while the calculation was occurring. 



#243 Wob

Wob

    Hobbyist

  • Members
  • PipPip
  • 32 posts

  • Flag: Australia

  • Favorite Pinball: AC\DC, MM, AFM, MB, TAG, TOM

Posted 10 July 2018 - 11:01 PM

Awesome @DJRobX, I am playing catch-up, after seeing the results in SAM and WPC-95 tables I am going back to edit more tables, focusing on any mentioned in the thread. You mentioned a possible fix for Video Mode, and I assume HSII is using a variation of it, but working out and adding that code is a little beyond me, just wondering if those earlier tables with Video Mode (Indiana Jones, Fish Tales, etc) could be transitioned to the solution you are using for WPC-95 tables as a solution to the flippers being active in video mode?

 

Also just after some clarification on cSingleLFlip and cSingleRFlip, it doesn't seem that all tables need this, but I have been adding it to all tables, matching up to any single flippers. Just wondering if this is best way forward or if it will have any negative effect?

 

Thanks for all your work,

Wob



#244 DJRobX

DJRobX

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 941 posts
  • Location:Valencia, CA

  • Flag: United States of America

  • Favorite Pinball: F14 Tomcat

Posted 10 July 2018 - 11:10 PM

Awesome @DJRobX, I am playing catch-up, after seeing the results in SAM and WPC-95 tables I am going back to edit more tables, focusing on any mentioned in the thread. You mentioned a possible fix for Video Mode, and I assume HSII is using a variation of it, but working out and adding that code is a little beyond me, just wondering if those earlier tables with Video Mode (Indiana Jones, Fish Tales, etc) could be transitioned to the solution you are using for WPC-95 tables as a solution to the flippers being active in video mode?

 

Yes.   Remember back when I said I added Fish Tales - that's why. :)   Fish Tales should no longer flip in video mode with the update.     If I supply a memory value that's better about telling us the activation state of the flippers, it replaces the SOL31 output with that value. 
 

It can be done for the other tables you mentioned as well.  Testing is just a pain in the butt since you have to get to the video mode to know if you got it right.   I haven't seen what HSII is doing, there are other possible solutions.    If a ball is sitting in the kicker/scoop that possibly activates a video mode, it could revert to ROM controlled flips or something like that too.



#245 Wob

Wob

    Hobbyist

  • Members
  • PipPip
  • 32 posts

  • Flag: Australia

  • Favorite Pinball: AC\DC, MM, AFM, MB, TAG, TOM

Posted 10 July 2018 - 11:17 PM

 

Awesome @DJRobX, I am playing catch-up, after seeing the results in SAM and WPC-95 tables I am going back to edit more tables, focusing on any mentioned in the thread. You mentioned a possible fix for Video Mode, and I assume HSII is using a variation of it, but working out and adding that code is a little beyond me, just wondering if those earlier tables with Video Mode (Indiana Jones, Fish Tales, etc) could be transitioned to the solution you are using for WPC-95 tables as a solution to the flippers being active in video mode?

 

Yes.   Remember back when I said I added Fish Tales - that's why. :)   Fish Tales should no longer flip in video mode with the update.     If I supply a memory value that's better about telling us the activation state of the flippers, it replaces the SOL31 output with that value. 
 

It can be done for the other tables you mentioned as well.  Testing is just a pain in the butt since you have to get to the video mode to know if you got it right.   I haven't seen what HSII is doing, there are other possible solutions.    If a ball is sitting in the kicker/scoop that possibly activates a video mode, it could revert to ROM controlled flips or something like that too.

 

 

Ahhh great, I assume no table changes are needed if a WPC table is updated to a memory address, since the code is the same (UseSolenoids = 2).

 

I read on the HSII table post that he was looking at a few table states to detect video mode, but I couldn't read it in the code, but unless it's obvious the code is beyond me.

 

It seemed to be a little over my head, but I'll read back and see if I can maybe help find memory addresses.



#246 DJRobX

DJRobX

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 941 posts
  • Location:Valencia, CA

  • Flag: United States of America

  • Favorite Pinball: F14 Tomcat

Posted 10 July 2018 - 11:42 PM

With AFM we noticed a mild side effect of cSingleLFlip = 0.  The game, despite not having upper flippers, still seems to monitor for the UL and UR flipper switches for health.   So the ROM will eventually give you a switch error at startup ("PRESS ENTER FOR TEST REPORT") if it doesn't see them activate.     However, because it repurposes the solenoids, we do need to tell the single flip stuff not to try and fire the solenoids.    Could probably fix this easily enough by pulsing the UR and UL switches in the flipper handlers or something.   So many tables report diagnostic issues that I'm not too bothered by the test report message, to be honest.  :)   



#247 toxie

toxie

    VPF Veteran

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

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 11 July 2018 - 12:15 PM

btw: i fixed simpsons pinball party fast flips in the meantime.. this should now also work with the next build..



#248 DJRobX

DJRobX

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 941 posts
  • Location:Valencia, CA

  • Flag: United States of America

  • Favorite Pinball: F14 Tomcat

Posted 11 July 2018 - 09:51 PM

*edit* I added apollo13, but after more research it's not necessary for this table.   The flipper "solenoids" are enable/disable flags and act just like the fast flip solenoid!   I'll leave it in there for consistency though since it makes the table easier to code   The VP9 table has faked enable/disabling and there may be some reason for that, too.    I also committed a separate apollo13.vbs file since the switches are so different for this table.


Edited by DJRobX, 11 July 2018 - 11:46 PM.


#249 DJRobX

DJRobX

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 941 posts
  • Location:Valencia, CA

  • Flag: United States of America

  • Favorite Pinball: F14 Tomcat

Posted 13 July 2018 - 05:26 AM

Carny released a new build over on the other site with more supported games.    I shared the exact list over there.


Edited by DJRobX, 13 July 2018 - 05:27 AM.


#250 Ben Logan

Ben Logan

    Pinball Wizard

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

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

  • Favorite Pinball: System 11

Posted 13 July 2018 - 05:44 AM

Thanks DJRobX and Carny!

#251 Stumblor

Stumblor

    Hobbyist

  • Members
  • PipPip
  • 28 posts
  • Location:London UK

  • Flag: United Kingdom

  • Favorite Pinball: CFTBL, Theatre of Magic

Posted 13 July 2018 - 09:36 AM

I think when tables are using the proper VPM flipper constants, you never see the flipper solenoids (annoying!).   They do however show up as dots on the bottom matrix (I think they're really the EOS switches or something like that) 

An alternative is to open core.c around line 1209 and remove that suppression.   Funny - after reading your comment I thought about doing that and figured I'd go hunt in the code for where that was happening.   My visual studio was just sitting on that line out of pure coincidence. 

 

 

Just to confirm, this is the change you were referring to?

 

 /*-- log solenoid number on the display (except flippers) --*/
          if ((!pmoptions.dmd_only && (allSol & 0x01)) //&&
              //((ii < CORE_FIRSTLFLIPSOL) || (ii >= CORE_FIRSTSIMSOL))) // remove suppression
  ) {

New memory locations found:

 

GODZILLA = 0x00000000

 

Will look at these next:

GOLDENEYE 
INDEPENDENCE DAY
LOST IN SPACE 
LOST WORLD JURASSIC PARK 
SPACE JAM 
STAR WARS TRILOGY 
VIPER NIGHT DRIVIN 
X FILES 
NFL 
STARSHIP TROOPERS 
STRIKER XTREME 


#252 Stumblor

Stumblor

    Hobbyist

  • Members
  • PipPip
  • 28 posts
  • Location:London UK

  • Flag: United Kingdom

  • Favorite Pinball: CFTBL, Theatre of Magic

Posted 13 July 2018 - 11:59 AM

Full list:
 
GODZILLA = 0x00000000
INDEPENDENCE DAY = id4 = 0x00000150
LOST IN SPACE = lostspc = 0x00000000
LOST WORLD JURASSIC PARK = jplstw22 = 0x00000000
SPACE JAM = spacejam = 0x0000014d
STAR WARS TRILOGY = swtril43 = 0x00000000
VIPER NIGHT DRIVIN = vipr_102 = 0x00000000
X FILES = xfiles = 0x00000000
NFL = nfl = 0x00000000
STARSHIP TROOPERS = startrp2 = 0x00000000
 
I think that's most of the remaining ones, except:
 
STRIKER XTREME - strikext & strxt_uk - I was getting a 'missing files' issue loading the roms. 
GOLDENEYE - gldneye - couldn't get any flipper solenoid indicators to fire on this one.


#253 Thalamus

Thalamus

    Pinball Wizard

  • Platinum Supporter
  • 4,984 posts

  • Flag: Norway

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

Posted 13 July 2018 - 12:06 PM

@stumblor : For roms - go to universe. Carny doesn't only keep us fed with the latest VPM builds, he also makes sure that site is always the best place to go for roms.


Edited by Thalamus, 13 July 2018 - 12:07 PM.

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


#254 Wob

Wob

    Hobbyist

  • Members
  • PipPip
  • 32 posts

  • Flag: Australia

  • Favorite Pinball: AC\DC, MM, AFM, MB, TAG, TOM

Posted 13 July 2018 - 12:36 PM

Hi everyone,

 

First off another BIG thank you to all that have contributed to FastFlips, I am finding fine ball control much better with it enabled.

 

I wanted to share my progress, I have made my way through my collection, looking at any table that had UseSolenoids to update for FastFlips, Hit rate has been very high. I don't have every table there is, but I have done quite a few, obviously not all version of each table will work the same, but it will let you know if the rom works, you just need to see if the scripts need tweaking.

 

I would like to give @DJRobX a HUGE Thank you, he is so generous with his time and knowledge, he guided me through a few simple fixes so I could work out some myself, for the more tricky one he fixed the scripts for me.

 

I have kept a spreadsheet in the hope it might help others get up to date with FastFlips.

 

First I'll just share my methodology, this is using the information available here and in the SAM Beta Thread.

 

First Steps

First load the table, hit F11 (You are watching the first ms time on the left flipper keypress to rotate line),

You need a ball in play to use the flippers so, insert coin, start game.

Now press the left flipper and make note of the number, my system pre FastFlips has somewhere between 5-20ms, varying quite a bit.

 

SAM Tables

Search for "_init" to find the table init sub, search for "end sub" to find the end of it then,

add "InitVpmFFlipsSAM" just before the end sub

 

Everything Else

Search for "UseSolenoid" this should be either =1 or =true, it can be on a line by itself, or a line with other variables, either way change it to;

"UseSolenoids=2"

 

This next part is optional, the cSingleLFlip and cSingleLFlip lines, after talking with Rob I decided to just add this to all tables matching up with single flippers, if it had 2 upper flippers then I did not add it.

I inserted there 2 lines directly after the line containing "UseSolenoid",

"Const cSingleLFlip = 0" (I then commented this line out if there was a upper left flipper)
"Const cSingleRFlip = 0" (I then commented this line out if there was a upper right flipper)
 
Next is not optional
Search for " vpmInit Me", if it exists, you are good to go, if not then;
Search for "_init" to find the table init sub and make the first line "vpmInit Me"
 
Last Steps
Reload the table and repeat the above steps, this time you should see much lower numbers, mine drop to under 1ms for almost all tables, a couple is between 1 and 2ms. HUGE improvement, and much more consistent.
If at this point your flippers don't work, or something funky is going on, check the Note column on my sheet, if I needed something extra it should be noted there, big fixes on pastebin, otherwise script fixing time.
 
So here is a link to my spreadsheet to help people know what tables I got working (most of them)

 

The Status Column 

Supported = Installed and Working

Included = The table has it baked in

Included (Alternative) = The Table Authors own FastFlips like solution

Unsupported = Not yet supported by FastFlips

Blank = I'm not there yet (only a few left)

 

I started to take not after the first 30 odd if I needed to add the vpmInit Me under the Table Init, see the last column.

 

I hope that helps someone, I'll update the last few tables in the sheet as I get to them.

 

Thanks,

Wob


Edited by Wob, 13 July 2018 - 12:37 PM.


#255 Thalamus

Thalamus

    Pinball Wizard

  • Platinum Supporter
  • 4,984 posts

  • Flag: Norway

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

Posted 13 July 2018 - 12:48 PM

A sheet with the tables might be what I need in order to force me to sit down and go through them all - appreciate the summary Wob !


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


#256 Stumblor

Stumblor

    Hobbyist

  • Members
  • PipPip
  • 28 posts
  • Location:London UK

  • Flag: United Kingdom

  • Favorite Pinball: CFTBL, Theatre of Magic

Posted 13 July 2018 - 01:19 PM

Brilliant work Wob very thorough!

#257 Wob

Wob

    Hobbyist

  • Members
  • PipPip
  • 32 posts

  • Flag: Australia

  • Favorite Pinball: AC\DC, MM, AFM, MB, TAG, TOM

Posted 13 July 2018 - 01:29 PM

Brilliant work Wob very thorough!

 

Thanks, just trying to give back to guys like you.



#258 jesperpark

jesperpark

    Enthusiast

  • Silver Supporter
  • 271 posts
  • Location:Edmonton Alberta Canada

  • Flag: Canada

  • Favorite Pinball: Medieval Madness

Posted 13 July 2018 - 01:58 PM

Wow HUGE thanks for the list @Wob

 

I do know having something like this makes it much easier, I have my own handwritten notes I have been working on.  I have not gotten as far as you, did not even realize the Gottlieb tables can be changed

 

A note to some newer people just trying this, it's not a visual thing like your flippers are faster( at least i never see it) but you will notice your shots seem easier to make and your scores go up



#259 DJRobX

DJRobX

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 941 posts
  • Location:Valencia, CA

  • Flag: United States of America

  • Favorite Pinball: F14 Tomcat

Posted 13 July 2018 - 04:08 PM

@Stumblor:  Thanks for the new addresses!   Got them in. 

I looked at GolenEye - it seems to be like Apollo13 (DMD even looks similar to it).   Fast flips not really necessary since Sol15/Sol16 are enable/disable.  I'll have to rename my new apollo13.vbs file to Sega2.vbs or something now.   :)    Striker Extreme looks to be at 0x00.  

 

Also committed Mustang LE (SAM) and Whodunnit.    Whodunnit, despite being on the WPC-S list, was not firing solenoid 31. 


Edited by DJRobX, 13 July 2018 - 06:02 PM.


#260 Stumblor

Stumblor

    Hobbyist

  • Members
  • PipPip
  • 28 posts
  • Location:London UK

  • Flag: United Kingdom

  • Favorite Pinball: CFTBL, Theatre of Magic

Posted 13 July 2018 - 07:55 PM

Great stuff.

 

So... what's left? From Capcom I think we're still missing:

 

Kingpin

Airborne

Breakshot

 

Anything else?