Jump to content

How to add DOF (Direct Output Framework) support to any Future Pinball table.


TerryRed

Recommended Posts

  • Content Provider

********** How to Add DOF support to a Future Pinball table **********

 

by TerryRed

 

 

6W0SQPK.png

 

 

 

What will this do?

 

- this will add support for DOF (Direct Output Framework) for cabinet feedback and lighting

 

What this will not do

 

- this will NOT add SSF (surround sound feedback)

- this will NOT have all the same DOF features as TerryRed's PinEvent tables / mods

 

What does this need?

 

- latest DOF R3++ installed

 

http://mjrnet.org/pinscape/dll-updates.html

 

- latest version of BAM

 

https://www.ravarcade.pl/

 

What this does NOT use

 

- this does NOT use or require the PinEvent vbs files

- this does not use or require DOFLinx

- you should NOT have DOFLinx running when playing a table that uses this code (so both aren't accessing DOF at the same time)

 

 

PinEvent

 

Please, DO NOT use the name PinEvent when using this code, or when adding DOF to a FP table

 

PinEvent = TerryRed's FP tables / mods and pup-pack releases only

 

 

DO NOT use or modify my PinEvent DOF configs for my tables on DOF Config Tool!

 

  • I have VERY specific DOF configs that are designed to work only with my PinEvent table updates (they start with FP_PE)
  • everyone is free to use the standard FP DOF configs to mod other FP tables for DOF

 

 

****** How to do it ******

 

 

Copy the code below to the script of any Future Pinball table under Option Explicit

 


'/////////////////////// iCOM BAM PLUG-IN - USE COM OBJECTS ////////////////////////////

' The iCOM plug-in for BAM must be installed and enabled in the BAM Plug-ins menu!

' This will allow programs such as DOF, Pinup Player, and more to work directly with Future Pinball.

Dim icom : Set icom = xBAM.Get("icom") ' "icom" is name of "icom.dll" in BAM\Plugins dir

Function CreateObject(className)       
   Set CreateObject = icom.CreateObject(className)   
End Function

'///////////////////////////////////////////////////////////////////////////////////////


'//////////////////////// DOF: STARTUP & CONTROL SECTION   /////////////////////////////

' This is used for the startup and control of DOF (Direct Output Framework)

Dim useDOF: useDOF = false
Dim DOFStatus:DofStatus=false
Dim DOFObject
Dim cGamename

Sub DOFStart(DOFProfile)  'Start DOF Session
	if DofStatus=true then Exit Sub
	if useDOF=true Then
		Set DOFObject = CreateObject("DirectOutput.ComObject")
			If DOFObject is Nothing Then 
				AddDebugText "DOF is not installed or detected"
				useDOF=false
				DofStatus=false
			else
				DOFObject.Init "B2SServer","",DOFProfile  
				DOFStatus=true
				AddDebugText "Start DOF"
			end if
	End if
end sub

Sub DOFClose()  'PinEvent - Close out DOF session. Add this to FuturePinball_EndPlay()
	if DOFStatus=false then Exit Sub
	DOFStatus=false
	DOFObject.Finish()
	Set DOFObject=nothing     
end sub

Sub dof(dID,dValue)
	if DOFStatus=false then Exit Sub
	if dValue=0 Then DOFObject.UpdateNamedTableElement "E"&dID,0
	if dValue=1 Then DOFObject.UpdateNamedTableElement "E"&dID,1
	if dValue=2 Then 
		DOFObject.UpdateNamedTableElement "E"&dID,1
		DOFObject.UpdateNamedTableElement "E"&dID,0
	End If
end Sub

' Usage: dof(dID,dValue)

' dID = DOF Exxx trigger
' dValue = trigger action. 0 = off, 1 = on, 2 = pulse

' Example:

' dof 103,1

' The above example will trigger DOF event E103 as ON


'///////////////////////////////////////////////////////////////////////////////////////


'////////////// START DOF ////////////////

useDOF = true                   ' enable DOF
cGamename = "FP_TABLE_NAME"     ' name of this table's DOF Config as listed on the "DOF Config Tool" web site
DOFStart(cGamename)             ' check for DOF - If found, then start DOF Session

'/////////////////////////////////////////

 

 

Make sure you replace FP_TABLE_NAME in the above code with the "rom" name used for the table on DOF Config Tool

 

 

Make sure you add the command DOFClose to the FuturePinball_EndPlay() sub, to close out the DOF session when you exit the table.

 

 

Sub FuturePinball_EndPlay()
    DOFClose()
End Sub

 

 

****** DOF COMMAND ******

 

Use the DOF command throughout your table script to trigger the DOF event for whatever feedback / lighting you want

 

dof(dID,dValue)

 

dID = DOF Exxx trigger

dValue = trigger action. 0 = off, 1 = on, 2 = pulse

 

Example:

 

dof 103,1

 

The above example will trigger DOF event E103 as ON

 

dof 103,0

 

The above example will trigger DOF event E103 as OFF

 

dof 103,2

 

The above example will trigger DOF event E103 for a short pulsed duration

 

 

 

****** DOF Config Tool Commands ******

 

You will only use Exxx commands with DOF Config Tool since all FP tables don't use roms.

 

For more info about creating DOF Config Tool configs and using my DOF Config Creator sheet, see this post:

 

https://vpuniverse.com/forums/topic/3865-dof-config-creator-create-and-add-mx-led-effects-and-dof-configs-to-dof-config-tool-the-easy-way/

 

 

 

 

 

Those are the essentials you need to get started.

 

To be CLEAR... I am NOT giving support for this! All the info you need is provided. Do the work!

 

Again, please do NOT use the name PinEvent when referring to adding DOF to a FP table. The name PinEvent is used only for TerryRed releases.

 

Thank you.

Link to comment
Share on other sites

  • 3 months later...
On 4/10/2021 at 5:27 PM, TerryRed said:

********** How to Add DOF support to a Future Pinball table **********

 

by TerryRed

 

 

6W0SQPK.png

 

 

 

What will this do?

 

- this will add support for DOF (Direct Output Framework) for cabinet feedback and lighting

 

What this will not do

 

- this will NOT add SSF (surround sound feedback)

- this will NOT have all the same DOF features as TerryRed's PinEvent tables / mods

 

What does this need?

 

- latest DOF R3++ installed

 

http://mjrnet.org/pinscape/dll-updates.html

 

- latest version of BAM

 

https://www.ravarcade.pl/

 

What this does NOT use

 

- this does NOT use or require the PinEvent vbs files

- this does not use or require DOFLinx

- you should NOT have DOFLinx running when playing a table that uses this code (so both aren't accessing DOF at the same time)

 

 

PinEvent

 

Please, DO NOT use the name PinEvent when using this code, or when adding DOF to a FP table

 

PinEvent = TerryRed's FP tables / mods and pup-pack releases only

 

 

DO NOT use or modify my PinEvent DOF configs for my tables on DOF Config Tool!

 

  • I have VERY specific DOF configs that are designed to work only with my PinEvent table updates (they start with FP_PE)
  • everyone is free to use the standard FP DOF configs to mod other FP tables for DOF

 

 

****** How to do it ******

 

 

Copy the code below to the script of any Future Pinball table under Option Explicit

 


'/////////////////////// iCOM BAM PLUG-IN - USE COM OBJECTS ////////////////////////////

' The iCOM plug-in for BAM must be installed and enabled in the BAM Plug-ins menu!

' This will allow programs such as DOF, Pinup Player, and more to work directly with Future Pinball.

Dim icom : Set icom = xBAM.Get("icom") ' "icom" is name of "icom.dll" in BAM\Plugins dir

Function CreateObject(className)       
   Set CreateObject = icom.CreateObject(className)   
End Function

'///////////////////////////////////////////////////////////////////////////////////////


'//////////////////////// DOF: STARTUP & CONTROL SECTION   /////////////////////////////

' This is used for the startup and control of DOF (Direct Output Framework)

Dim useDOF: useDOF = false
Dim DOFStatus:DofStatus=false
Dim DOFObject
Dim cGamename

Sub DOFStart(DOFProfile)  'Start DOF Session
	if DofStatus=true then Exit Sub
	if useDOF=true Then
		Set DOFObject = CreateObject("DirectOutput.ComObject")
			If DOFObject is Nothing Then 
				AddDebugText "DOF is not installed or detected"
				useDOF=false
				DofStatus=false
			else
				DOFObject.Init "B2SServer","",DOFProfile  
				DOFStatus=true
				AddDebugText "Start DOF"
			end if
	End if
end sub

Sub DOFClose()  'PinEvent - Close out DOF session. Add this to FuturePinball_EndPlay()
	if DOFStatus=false then Exit Sub
	DOFStatus=false
	DOFObject.Finish()
	Set DOFObject=nothing     
end sub

Sub dof(dID,dValue)
	if DOFStatus=false then Exit Sub
	if dValue=0 Then DOFObject.UpdateNamedTableElement "E"&dID,0
	if dValue=1 Then DOFObject.UpdateNamedTableElement "E"&dID,1
	if dValue=2 Then 
		DOFObject.UpdateNamedTableElement "E"&dID,1
		DOFObject.UpdateNamedTableElement "E"&dID,0
	End If
end Sub

' Usage: dof(dID,dValue)

' dID = DOF Exxx trigger
' dValue = trigger action. 0 = off, 1 = on, 2 = pulse

' Example:

' dof 103,1

' The above example will trigger DOF event E103 as ON


'///////////////////////////////////////////////////////////////////////////////////////


'////////////// START DOF ////////////////

useDOF = true                   ' enable DOF
cGamename = "FP_TABLE_NAME"     ' name of this table's DOF Config as listed on the "DOF Config Tool" web site
DOFStart(cGamename)             ' check for DOF - If found, then start DOF Session

'/////////////////////////////////////////

 

 

Make sure you replace FP_TABLE_NAME in the above code with the "rom" name used for the table on DOF Config Tool

 

 

Make sure you add the command DOFClose to the FuturePinball_EndPlay() sub, to close out the DOF session when you exit the table.

 

 

Sub FuturePinball_EndPlay()
    DOFClose()
End Sub

 

 

****** DOF COMMAND ******

 

Use the DOF command throughout your table script to trigger the DOF event for whatever feedback / lighting you want

 

dof(dID,dValue)

 

dID = DOF Exxx trigger

dValue = trigger action. 0 = off, 1 = on, 2 = pulse

 

Example:

 

dof 103,1

 

The above example will trigger DOF event E103 as ON

 

dof 103,0

 

The above example will trigger DOF event E103 as OFF

 

dof 103,2

 

The above example will trigger DOF event E103 for a short pulsed duration

 

 

 

****** DOF Config Tool Commands ******

 

You will only use Exxx commands with DOF Config Tool since all FP tables don't use roms.

 

For more info about creating DOF Config Tool configs and using my DOF Config Creator sheet, see this post:

 

https://vpuniverse.com/forums/topic/3865-dof-config-creator-create-and-add-mx-led-effects-and-dof-configs-to-dof-config-tool-the-easy-way/

 

 

 

 

 

Those are the essentials you need to get started.

 

To be CLEAR... I am NOT giving support for this! All the info you need is provided. Do the work!

 

Again, please do NOT use the name PinEvent when referring to adding DOF to a FP table. The name PinEvent is used only for TerryRed releases.

 

Thank you.

Will this work even if the table isn't listed on DOF Config Tool site?

Link to comment
Share on other sites

  • Content Provider

It needs to be added to DOF Config Tool.

 

There are already many of the most popular FP tables added there already (most are blank). They all start with FP:

 

Do not use those that start with FP-PE, as those are specifically for my PinEvent updates.

 

image.thumb.png.7ad0cbb1ac1e6fa2c39f2c59adc6388a.png

 

 

Link to comment
Share on other sites

16 hours ago, TerryRed said:

It needs to be added to DOF Config Tool.

 

There are already many of the most popular FP tables added there already (most are blank). They all start with FP:

 

Do not use those that start with FP-PE, as those are specifically for my PinEvent updates.

 

image.thumb.png.7ad0cbb1ac1e6fa2c39f2c59adc6388a.png

 

 

What's the process to get them added? There's some great FP tables I would love to add DOF to. I watched all your tutorials and I am ready to get started!

Link to comment
Share on other sites

  • Content Provider

Only submit the name for a table you are actively working on though.... and these need to be tables you know that can be re-posted for everyone to download (everyone else will need the modded table to use the DOF config).

 

Don't ask for tables to be added if you don't know it they can be shared with everyone, etc. Some "active" authors don't want any mods to their tables... even if it's only to add DOF.

 

Check the entire list to be sure the table isn't already on there.

Link to comment
Share on other sites

51 minutes ago, outhere said:

Post a list of the games with the name of the rom if the game already has one and maybe somebody will add them to the DOF website

Thanks!

Pinup Jukebox the 80s- VPX

Dark Crystal -VPX

Never Ending Story - VPX

Deal or No Deal - FP

oo7 Casino Royale - FP

007 50th Anniversary - FP

Black Knight Swords of Rage - FP

Cadash - FP

Classic Panic - FP

Fist of the North Star - FP

Galaga - FP

Gradius - FP

World Tour - FP

The King of Dragons - FP

Mega Man - FP

Moon Patrol - FP

Psycho Pinball trick or Treat - FP

Psycho Pinball Wild West - FP

Rocket Derby - FP

Space Invaders - FP

Spy vs Spy - FP

Stepmania - FP

Willow - FP

 

 

 

 

Link to comment
Share on other sites

33 minutes ago, TerryRed said:

Only submit the name for a table you are actively working on though.... and these need to be tables you know that can be re-posted for everyone to download (everyone else will need the modded table to use the DOF config).

 

Don't ask for tables to be added if you don't know it they can be shared with everyone, etc. Some "active" authors don't want any mods to their tables... even if it's only to add DOF.

 

Check the entire list to be sure the table isn't already on there.

Sorry read your post after. The main one I want is Pinup Jukebox the 80s- VPX for now.

Link to comment
Share on other sites

  • Content Provider

This is a "Future Pinball" DOF post... not VPX. :) The code above won't work for VPX.... nor should you need it for most VPX tables, to add DOF.

 

If you want VPX tables added to DOF config tool... create a separate post for that. If you have a mix of both tables to add, make a new separate post for all the tables you want to add.

 

If the PUP JukeBox table is a mod of another VPX table... then it probably already has some form of DOF for it based on the rom its using. Same goes for may other VPX tables. Most are just re-skins of another table that already has DOF added to it. If that is the case... then there is no point of adding it to DOF Config Tool as it already has a DOf config created for the rom its using.

 

Also many FP tables for example... are not "complete" tables at all. They are just a table with no actual real gameplay / code, and basically just show some cycling lights and allow the ball to roll around. Tables like that should not be added to DOF Config Tool until they are a "complete" table of quality and gameplay. Most everything uploaded from fast draw as an example are tables that are not complete table with actual gameplay. DOF is the very last thing to be added to a table. This is important, because if a table was poorly coded, or is a wip and not complete... adding DOF may result in a solenoid or shaker,etc being stuck on due to poor code or a change on code later on by someone who doesnt have DOf,etc.

 

Again... only submit tables actually being worked on that are "complete" quality tables... one at a time if needed. Don't expect all tables submitted to be added for the above reasons.

 

Also, include a link for each table (wherever it is currently) that is being updated to get an idea of what the table is.

 

Again, please do this in your own separate post instead of this one.

Link to comment
Share on other sites

16 minutes ago, TerryRed said:

This is a "Future Pinball" DOF post... not VPX. :) The code above won't work for VPX.... nor should you need it for most VPX tables, to add DOF.

 

If you want VPX tables added to DOF config tool... create a separate post for that. If you have a mix of both tables to add, make a new separate post for all the tables you want to add.

 

If the PUP JukeBox table is a mod of another VPX table... then it probably already has some form of DOF for it based on the rom its using.

 

Also many FP tables for example... are not "complete" tables at all. They are just a table with no actual real gameplay / code, and basically just show some cycling lights and allow the ball to roll around. Tables like that should not be added to DOF Config Tool until they are a "complete" table of quality and gameplay.

 

Again... only submit tables actually being worked on that are "complete" quality tables... one at a time if needed. Don't expect all tables submitted to be added for the above reasons.

 

Also, include a link for each table (wherever it is currently) that is being updated to get an idea of what the table is.

 

Again, please do this in your own separate post instead of this one.

 Edited the above. Did not know there were any rules in regard to DOF. I misunderstood since the post said add DOF to any FP table and didn't notice the need for it to be on DOF config. I just want to add DOF for my own personal use, not to share if it's not allowed. I spent 8 months putting this together, haven;t shared tables, sold tables or anything. I am just curious why I can't mod a table for personal use? I respect all the authors and the time they put in, but i've modded tables to fit my personal perferences and would never share that without permission. Just my 2 cents.

Link to comment
Share on other sites

  • Content Provider

Yes, you can add DOF "support" to any FP table... but you still need to rely on DOF Config Tool for it to work using the above code (just like VPX does) and you also need to mod the entire table.

 

Not all tables get added to DOF Config Tool from FP or VPX. If a table is to be added... its with the intention and understanding that it will be a quality "complete" table that will be made available  to everyone. If people are running these tables on their cabinet, they assume it won't possibly cause something to run poorly, and possibly cause damage (from a solenoid stuck on, shaker running non stop,etc)

 

Like I mention above... an incomplete table can be dangerous to add DOF to. The reason why most VPX tables get DOf is because they are controlled by VPinMAME and the rom... so there isn't a concern for incomplete or dangerous code... or mods to table code down the line from someone who doesnt have DOf on a cabinet,etc.

 

If a personally modded table is not available to everyone.... then adding it to the "community" site of DOF Config Tool, makes no sense either.

 

If you just want to add DOF to your own personal mods of FP tables (that won't be shared,etc)... you can use DOFLinx to do that, which does not require DOF Config Tool at all.

 

 

 

 

Link to comment
Share on other sites

4 minutes ago, TerryRed said:

Yes, you can add DOF "support" to any FP table... but you still need to rely on DOF Config Tool for it to work using the above code (just like VPX does) and you also need to mod the entire table.

 

Not all tables get added to DOF Config Tool from FP or VPX. If a table is to be added... its with the intention and understanding that it will be a quality "complete" table that will be made available  to everyone. If people are running these tables on their cabinet, they assume it won't possibly cause something to run poorly, and possibly cause damage (from a solenoid stuck on, shaker running non stop,etc)

 

If a personally modded table is not available to everyone.... then adding it to the "community" site of DOF Config Too, makes no sense either.

 

If you just want to add DOF to your own personal mods of FP tables... you can use DOFLinx to do that, which does not require DOF Config Tool at all.

 

 

 

 

Thank you for the clarification. There's a lot of info on vpin and it's not always easy to learn about them all until something comes up.Can you point me to where I can learn how to add DOF to FP tables using DOF Linx?

Link to comment
Share on other sites

  • Content Provider
Just now, mrbrightside80 said:

Thank you for the clarification. There's a lot of info on vpin and it's not always easy to learn about them all until something comes up.Can you point me to where I can learn how to add DOF to FP tables using DOF Linx?

 

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...