Six Million Dollar Man, The (Bally, 1978) VPX7.2 Sound MOD

VPX Bally SS Recreation Six Million Dollar Man, The (Bally, 1978) VPX7.2 Sound MOD v2.3 VPX7.2

No permission to download
Solid State Machines

xenonph

Administrator
Staff member
Site Supporters
Joined
Nov 10, 2015
Messages
3,208
Solutions
24
Reaction score
2,844
Points
151
Favorite Pinball Machine
Congo
xenonph submitted a new resource:

Six Million Dollar Man, The (Bally, 1978) VPX - A sound Mod of allknowing2012's table.

Six Million Dollar Man, The (Bally 1978) v2.2 Sound MOD
by 32assassin, allknowing2012, Xenonph
IPD No. 2165

Thanks to
32assassin for the primitive updates
Hauntfreaks for the Graphics Work
Arngrim for DOF

A sound Mod of allknowing2012's table.
I first want to thank allknowing2012 for allowing mods without permission.
I also want to thank him and anyone else who helped make this table come to life. Including 32assassin, Hauntfreaks, and...

Read more about this resource...
 
I have downloaded Six Million Dollar Man and the ROM and it still won't work. Why?
 
I have downloaded Six Million Dollar Man and the ROM and it still won't work. Why?
Did you place the smman rom in your roms folder?

What happens when you start the table? Do you get any error messages?
 
Yes I did and and I get several error messages.
 
ub Table1_Init
vpmInit Me
On Error Resume Next
With Controller
.GameName = cGameName
.Games(cGameName).Settings.Value("sound")=0 '1 TURNS ON ROM SOUNDS
If Err Then MsgBox "Can't start Game" & cGameName & vbNewLine & Err.Description : Exit Sub
.SplashInfoLine = "Six Million Dollar Man,The (Bally 1978) v2.2"& vbNewLine &"Sound Mod by Xenonph"& vbNewLine &"VPX Table by Allknowing2012-32assassin-HF-Arngrim"
.HandleMechanics=0
.HandleKeyboard=0
.ShowDMDOnly=1
.ShowFrame=0
.ShowTitle=0
.hidden = 1

If Err Then MsgBox Err.Description
End With
On Error Goto 0
Controller.SolMask(0)=0
vpmTimer.AddTimer 2000,"Controller.SolMask(0)=&Hffffffff'" 'ignore all solenoids - then add the timer to renable all the solenoids after 2 seconds
Controller.Run
If Err Then MsgBox Err.Description
On Error Goto 0

PinMAMETimer.Interval=PinMAMEInterval
PinMAMETimer.Enabled=1:playsound"BM01":Bumper3.timerinterval=95000:Bumper3.timerenabled=1

'Nudging
vpmNudge.TiltSwitch = 7
vpmNudge.Sensitivity = 5
vpmNudge.TiltObj = Array(Bumper1,Bumper2,Bumper3,LeftSlingshot,RightSlingShot)

'**Trough
Set bsTrough = New cvpmBallStack
bsTrough.InitSw 0,8,0,0,0,0,0,0
bsTrough.InitKick BallRelease, 45, 8
bsTrough.InitExitSnd SoundFX("BallRelease",DOFContactors),"solenoid"
bsTrough.Balls = 1

'**Saucer
Set bsSaucer = New cvpmBallStack
bsSaucer.InitSaucer sw32, 32, 180, 5
bsSaucer.KickForceVar = 2
bsSaucer.KickAngleVar = 2
bsSaucer.InitExitSnd SoundFX("popper",DOFContactors),"solon"

Set dtR=New cvpmDropTarget
dtR.InitDrop Array(sw1,sw2,sw3,sw4,sw5),Array(1,2,3,4,5)
dtR.InitSnd SoundFX("DTDrop",DOFContactors),"DTReset"
LoadLUT
End Sub

'**********************************************************************************************************
'Plunger code
'**********************************************************************************************************

Sub Table1_KeyDown(ByVal KeyCode)
If KeyDownHandler(keycode) Then Exit Sub
If keycode = LeftMagnaSave Then bLutActive = True
If keycode = RightMagnaSave And bLutActive= True Then NextLUT: End If
If keycode = PlungerKey Then Plunger.Pullback:playsound "plungerpull"
End Sub

Sub Table1_KeyUp(ByVal KeyCode)
If keycode = LeftMagnaSave Then bLutActive = False
If KeyCode = 6 Then
Dim x
x = INT(6 * RND(1) )
Select Case x
Case 0:stopSound"BM00":stopSound"BM00a":stopSound"BM30":stopSound"BM20":stopSound"BM55":stopSound"BM64":playSound"BM00"
Case 1:stopSound"BM00":stopSound"BM00a":stopSound"BM30":stopSound"BM20":stopSound"BM55":stopSound"BM64":playSound"BM00a"
Case 2:stopSound"BM00":stopSound"BM00a":stopSound"BM30":stopSound"BM20":stopSound"BM55":stopSound"BM64":playSound"BM30"
Case 3:stopSound"BM00":stopSound"BM00a":stopSound"BM30":stopSound"BM20":stopSound"BM55":stopSound"BM64":playSound"BM20"
Case 4:stopSound"BM00":stopSound"BM00a":stopSound"BM30":stopSound"BM20":stopSound"BM55":stopSound"BM64":playSound"BM55"
Case 5:stopSound"BM00":stopSound"BM00a":stopSound"BM30":stopSound"BM20":stopSound"BM55":stopSound"BM64":playSound"BM64"
End Select
Flr.enabled=true:Flr.interval=200:Flashoff.enabled=true:Flashoff.interval=2000
end if
If KeyCode = 4 Then
Dim y
y = INT(6 * RND(1) )
Select Case y
Case 0:stopSound"BM00":stopSound"BM00a":stopSound"BM30":stopSound"BM20":stopSound"BM55":stopSound"BM64":playSound"BM00"
Case 1:stopSound"BM00":stopSound"BM00a":stopSound"BM30":stopSound"BM20":stopSound"BM55":stopSound"BM64":playSound"BM00a"
Case 2:stopSound"BM00":stopSound"BM00a":stopSound"BM30":stopSound"BM20":stopSound"BM55":stopSound"BM64":playSound"BM30"
Case 3:stopSound"BM00":stopSound"BM00a":stopSound"BM30":stopSound"BM20":stopSound"BM55":stopSound"BM64":playSound"BM20"
Case 4:stopSound"BM00":stopSound"BM00a":stopSound"BM30":stopSound"BM20":stopSound"BM55":stopSound"BM64":playSound"BM55"
Case 5:stopSound"BM00":stopSound"BM00a":stopSound"BM30":stopSound"BM20":stopSound"BM55":stopSound"BM64":playSound"BM64"
End Select
Flr.enabled=true:Flr.interval=200:Flashoff.enabled=true:Flashoff.interval=2000
end if
If KeyCode = 2 Then
EndMusic:stopSound"BM00":stopSound"BM00a":stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM29":stopSound"BM30":Bumper1.timerenabled=0:Bumper2.timerenabled=0:sw32.timerenabled=0:Bumper3.timerenabled=0:sw32.timerenabled=0
Dim v
v = INT(8 * RND(1) )
Select Case v
Case 0:stopSound"BM02":stopSound"BM03":stopSound"BM04":stopSound"BM05":stopSound"BM41":stopSound"BM43":stopSound"BM56":stopSound"BM62":playsound("BM02"):Drain.timerinterval=6000:Drain.timerenabled=1
Case 1:stopSound"BM02":stopSound"BM03":stopSound"BM04":stopSound"BM05":stopSound"BM41":stopSound"BM43":stopSound"BM56":stopSound"BM62":playsound("BM03"):Drain.timerinterval=6000:Drain.timerenabled=1
Case 2:stopSound"BM02":stopSound"BM03":stopSound"BM04":stopSound"BM05":stopSound"BM41":stopSound"BM43":stopSound"BM56":stopSound"BM62":playsound("BM04"):Drain.timerinterval=6000:Drain.timerenabled=1
Case 3:stopSound"BM02":stopSound"BM03":stopSound"BM04":stopSound"BM05":stopSound"BM41":stopSound"BM43":stopSound"BM56":stopSound"BM62":playsound("BM05"):Drain.timerinterval=4000:Drain.timerenabled=1
Case 4:stopSound"BM02":stopSound"BM03":stopSound"BM04":stopSound"BM05":stopSound"BM41":stopSound"BM43":stopSound"BM56":stopSound"BM62":playsound("BM41"):Drain.timerinterval=1000:Drain.timerenabled=1
Case 5:stopSound"BM02":stopSound"BM03":stopSound"BM04":stopSound"BM05":stopSound"BM41":stopSound"BM43":stopSound"BM56":stopSound"BM62":playsound("BM43"):Drain.timerinterval=4000:Drain.timerenabled=1
Case 6:stopSound"BM02":stopSound"BM03":stopSound"BM04":stopSound"BM05":stopSound"BM41":stopSound"BM43":stopSound"BM56":stopSound"BM62":playsound("BM56"):Drain.timerinterval=2000:Drain.timerenabled=1
Case 7:stopSound"BM02":stopSound"BM03":stopSound"BM04":stopSound"BM05":stopSound"BM41":stopSound"BM43":stopSound"BM56":stopSound"BM62":playsound("BM62"):Drain.timerinterval=3000:Drain.timerenabled=1


End Select

End If
If KeyUpHandler(keycode) Then Exit Sub
If keycode = PlungerKey Then
PlaySound"Plunger"
Plunger.Fire

End If

End Sub

'**********************************************************************************************************

Sub Trigger1_Hit()
StopSound"BM10":sw2.timerenabled=0:sw3.timerenabled=0
StopSound"BM29"
PlaySound"BM30" :Drain.timerenabled=0
Dim w
w = INT(10 * RND(1) )
Select Case w
Case 0:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":playSound"BM20":Bumper1.timerinterval=0000:Bumper1.timerenabled=1
Case 1:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":playSound"BM21":Bumper1.timerinterval=0000:Bumper1.timerenabled=1
Case 2:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":playSound"BM22":Bumper1.timerinterval=0000:Bumper1.timerenabled=1
Case 3:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":playSound"BM23":Bumper1.timerinterval=0000:Bumper1.timerenabled=1
Case 4:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":playSound"BM25":Bumper1.timerinterval=0000:Bumper1.timerenabled=1
Case 5:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":playSound"BM26":Bumper1.timerinterval=0000:Bumper1.timerenabled=1
Case 6:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":playSound"BM27":Bumper1.timerinterval=0000:Bumper1.timerenabled=1
Case 7:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":playSound"BM28":Bumper1.timerinterval=0000:Bumper1.timerenabled=1
Case 8:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":playSound"BM31":Bumper1.timerinterval=0000:Bumper1.timerenabled=1
Case 9:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":playSound"BM32":Bumper1.timerinterval=0000:Bumper1.timerenabled=1

End Select
End Sub

Sub BallRelease_unHit():Drain.timerinterval=5000:Drain.timerenabled=1:Bumper3.timerenabled=0:sw1.timerenabled=0:End Sub


' Drain hole
Sub Drain_Hit:playsound"drain":bsTrough.addball me:Bumper1.timerenabled=0:Bumper2.timerenabled=0:drain.timerenabled=0:sw1.timerenabled=0:sw32.timerenabled=0:Bumper3.timerinterval=10000:Bumper3.timerenabled=1
Dim x
x = INT(26 * RND(1) )
Select Case x
Case 0:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM42"
Case 1:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM44"
Case 2:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM47"
Case 3:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM48"
Case 4:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM49"
Case 5:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM50"
Case 6:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM51"
Case 7:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM52"
Case 8:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM53"
Case 9:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM54"
Case 10:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM58"
Case 11:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM59"
Case 12:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM60"
Case 13:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM61"
Case 14:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM63"
Case 15:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM65"
Case 16:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM66"
Case 17:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM67"
Case 18:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM68"
Case 19:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM02"
Case 20:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM03"
Case 21:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM04"
Case 22:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM05"
Case 23:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM07"
Case 24:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM12"
Case 25:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM11"

End Select

End Sub

Sub drain_timer
Dim x
x = INT(2 * RND(1) )
Select Case x
Case 0:stopSound"BM00":stopSound"BM00a":playSound"BM10":sw32.timerinterval=6000:sw32.timerenabled=1
Case 1:stopSound"BM00":stopSound"BM00a":playSound"BM10":sw32.timerinterval=6000:sw32.timerenabled=1

End Select
Drain.timerenabled=0
End Sub

' Saucer Hit
Sub sw32_Hit:bsSaucer.AddBall 0
Flu.enabled=true:Flu.interval=300
Dim x
x = INT(7 * RND(1) )
Select Case x
Case 0:stopSound"BM40":stopSound"BM45":stopSound"BM46":stopSound"BM55":stopSound"BM57":stopSound"BM64":playSound"BM40"
Case 1:stopSound"BM40":stopSound"BM45":stopSound"BM46":stopSound"BM55":stopSound"BM57":stopSound"BM64":playSound"BM45"
Case 2:stopSound"BM40":stopSound"BM45":stopSound"BM46":stopSound"BM55":stopSound"BM57":stopSound"BM64":playSound"BM46"
Case 3:stopSound"BM40":stopSound"BM45":stopSound"BM46":stopSound"BM55":stopSound"BM57":stopSound"BM64":playSound"BM55"
Case 4:stopSound"BM40":stopSound"BM45":stopSound"BM46":stopSound"BM55":stopSound"BM57":stopSound"BM64":playSound"BM57"
Case 5:stopSound"BM40":stopSound"BM45":stopSound"BM46":stopSound"BM55":stopSound"BM57":stopSound"BM64":playSound"BM64"
Case 6:stopSound"BM40":stopSound"BM45":stopSound"BM46":stopSound"BM55":stopSound"BM57":stopSound"BM64":playSound"BM00a"

End Select

End Sub

Sub sw32_unHit:
Flashoff.enabled=true

End Sub

Sub sw32_timer
Dim x
x = INT(2 * RND(1) )
Select Case x
Case 0:stopSound"BM00":stopSound"BM00a":playSound"BM10":Drain.timerinterval=6000:Drain.timerenabled=1
Case 1:stopSound"BM00":stopSound"BM00a":playSound"BM10":Drain.timerinterval=6000:Drain.timerenabled=1

End Select
sw32.timerenabled=0
End Sub

'SlingShots
Sub LeftSlingshot_Slingshot:vpmTimer.PulseSw 36:End Sub
Sub RightSlingshot_Slingshot:vpmTimer.PulseSw 37:End Sub

'Spinner
Sub Spinner2_Spin():vpmTimer.pulsesw 20 : playsound"fx_spinner":FlashLevel2 = 1 : FlasherFlash2_Timer:FlashLevel4 = 1 : FlasherFlash4_Timer : End Sub ' bug
Sub Spinner1_Spin():vpmTimer.pulsesw 21 : playsound"fx_spinner":FlashLevel2 = 1 : FlasherFlash2_Timer:FlashLevel4 = 1 : FlasherFlash4_Timer : End Sub

'Bumpers
Sub Bumper1_Hit:vpmTimer.pulsesw 38 : playsound SoundFX("fx_bumper1",DOFContactors):stopSound"BM25":playSound"BM25":FlashLevel2 = 1 : FlasherFlash2_Timer: End Sub

Sub Bumper1_timer
Dim x
x = INT(3 * RND(1) )
Select Case x
Case 0:stopSound"BM00":stopSound"BM00a":playSound"BM08":Bumper2.timerinterval=24000:Bumper2.timerenabled=1
Case 1:stopSound"BM00":stopSound"BM00a":playSound"BM09":Bumper2.timerinterval=15000:Bumper2.timerenabled=1
Case 2:stopSound"BM00":stopSound"BM00a":playSound"BM06":Bumper2.timerinterval=17000:Bumper2.timerenabled=1
End Select
Bumper1.timerenabled=0
End Sub

Sub Bumper2_Hit:vpmTimer.pulsesw 39 : playsound SoundFX("fx_bumper2",DOFContactors):stopSound"BM25":playSound"BM25":FlashLevel4 = 1 : FlasherFlash4_Timer: End Sub

Sub Bumper2_timer
Dim x
x = INT(3 * RND(1) )
Select Case x
Case 0:stopSound"BM00":stopSound"BM00a":playSound"BM08":Bumper1.timerinterval=24000:Bumper1.timerenabled=1
Case 1:stopSound"BM00":stopSound"BM00a":playSound"BM09":Bumper1.timerinterval=15000:Bumper1.timerenabled=1
Case 2:stopSound"BM00":stopSound"BM00a":playSound"BM06":Bumper1.timerinterval=17000:Bumper1.timerenabled=1
End Select
Bumper2.timerenabled=0
End Sub

Sub Bumper3_Hit:vpmTimer.pulsesw 40 : playsound SoundFX("fx_bumper3",DOFContactors):stopSound"BM25":playSound"BM25":FlashLevel2 = 1 : FlasherFlash2_Timer:FlashLevel4 = 1 : FlasherFlash4_Timer: End Sub

Sub Bumper3_timer
Dim x
x = INT(3 * RND(1) )
Select Case x
Case 0:stopSound"BM00":stopSound"BM00a":playSound"BM08":sw1.timerinterval=44000:sw1.timerenabled=1
Case 1:stopSound"BM00":stopSound"BM00a":playSound"BM09":sw1.timerinterval=35000:sw1.timerenabled=1
Case 2:stopSound"BM00":stopSound"BM00a":playSound"BM06":sw1.timerinterval=37000:sw1.timerenabled=1

End Select
Bumper3.timerenabled=0
End Sub

'Drop Targets
Sub Sw1_Hit:dtR.Hit 1 :playSound"BM20":End Sub

Sub Sw1_timer
Dim x
x = INT(3 * RND(1) )
Select Case x
Case 0:stopSound"BM00":stopSound"BM00a":playSound"BM01":Bumper3.timerinterval=100000:Bumper3.timerenabled=1
Case 1:stopSound"BM00":stopSound"BM00a":playSound"BM01":Bumper3.timerinterval=100000:Bumper3.timerenabled=1
Case 2:stopSound"BM00":stopSound"BM00a":playSound"BM01":Bumper3.timerinterval=100000:Bumper3.timerenabled=1

End Select
Sw1.timerenabled=0
End Sub

Sub Sw2_Hit:dtR.Hit 2 :playSound"BM20":End Sub

Sub Sw2_timer
Dim x
x = INT(2 * RND(1) )
Select Case x
Case 0:stopSound"BM00":stopSound"BM00a":playSound"BM10":sw3.timerinterval=6000:sw3.timerenabled=1
Case 1:stopSound"BM00":stopSound"BM00a":playSound"BM10":sw3.timerinterval=6000:sw3.timerenabled=1

End Select
Sw2.timerenabled=0
End Sub

Sub Sw3_Hit:dtR.Hit 3 :playSound"BM20":End Sub

Sub Sw3_timer
Dim x
x = INT(2 * RND(1) )
Select Case x
Case 0:stopSound"BM00":stopSound"BM00a":playSound"BM10":sw2.timerinterval=6000:sw2.timerenabled=1
Case 1:stopSound"BM00":stopSound"BM00a":playSound"BM10":sw2.timerinterval=6000:sw2.timerenabled=1

End Select
Sw3.timerenabled=0
End Sub

Sub Sw4_Hit:dtR.Hit 4 :playSound"BM20":End Sub
Sub Sw5_Hit:dtR.Hit 5 :playSound"BM20":End Sub

'Stand Up Targets
Sub sw22_Hit:vpmTimer.PulseSw 22:playSound"BM20":End Sub
Sub sw23_Hit:vpmTimer.PulseSw 23:playSound"BM20":End Sub
Sub sw24_Hit:vpmTimer.PulseSw 24:playSound"BM20":End Sub
Sub sw27_Hit:vpmTimer.PulseSw 27:playSound"BM20":End Sub
Sub sw28_Hit:vpmTimer.PulseSw 28:playSound"BM20":End Sub
Sub sw29_Hit:vpmTimer.PulseSw 29:playSound"BM20":End Sub

'Trigger Wires
Sub sw14_Hit:Controller.Switch(14) = 1:playSound "rollover":playSound "BM00":End Sub
Sub sw14_UnHit:Controller.Switch(14) = 0:End Sub
Sub sw15_Hit:Controller.Switch(15) = 1:playSound "rollover":playSound "BM00":End Sub
Sub sw15_UnHit:Controller.Switch(15) = 0:End Sub
Sub sw35a_Hit:Controller.Switch(35) = 1:playSound "rollover":playSound "BM00":DOF 101, 1:End Sub
Sub sw35a_UnHit:Controller.Switch(35) = 0:DOF 101, 0:End Sub
Sub sw35b_Hit:Controller.Switch(35) = 1:playSound "rollover":playSound "BM00":DOF 102, 1:End Sub
Sub sw35b_UnHit:Controller.Switch(35) = 0:DOF 102, 0:End Sub
Sub sw17_Hit:Controller.Switch(17) = 1:playSound "rollover":playSound "BM00":End Sub
Sub sw17_UnHit:Controller.Switch(17) = 0:End Sub
Sub sw18_Hit:Controller.Switch(18) = 1:playSound "rollover":playSound "BM00":End Sub
Sub sw18_UnHit:Controller.Switch(18) = 0:End Sub

'Star Triggers
Sub sw25a_Hit:Controller.Switch(25) = 1:playSound "rollover":End Sub
Sub sw25a_UnHit:Controller.Switch(25) = 0:End Sub
Sub sw25b_Hit:Controller.Switch(25) = 1:playSound "rollover":End Sub
Sub sw25b_UnHit:Controller.Switch(25) = 0:End Sub
Sub sw26_Hit:Controller.Switch(26) = 1:playSound "rollover":End Sub
Sub sw26_UnHit:Controller.Switch(26) = 0:End Sub


Set Lights(1)=Light1
Set Lights(2)=Light2
Set Lights(3)=Light3
Lights(4)=array(Light4,Light4a)
Lights(5)=array(Light5,Light5a)
Set Lights(6)=Light6
Set Lights(7)=Light7
Set Lights(8)=Light8
Set Lights(9)=Light9
Lights(10)=array(Light10,Light10a)
Set Lights(11)=Light11
Set Lights(12)=Light12
Set Lights(17)=Light17
Set Lights(18)=Light18
Set Lights(19)=Light19
Lights(20)=array(Light20,Light20a)
Set Lights(22)=Light22
Set Lights(23)=Light23
Set Lights(24)=Light24
Set Lights(25)=Light25
Lights(26)=array(Light26,Light26a)
'Lights(27)=array(Light27,Light27a)
Set Lights(28)=Light28
Set Lights(33)=Light33
Set Lights(34)=Light34
Set Lights(35)=Light35
Lights(36)=array(Light36,Light36a)
Set Lights(37)=Light37
Set Lights(38)=Light38
Set Lights(39)=Light39
Set Lights(40)=Light40
Lights(42)=array(Light42,Light42a)
Set Lights(44)=Light44
Set Lights(49)=Light49
Set Lights(50)=Light50
Set Lights(51)=Light51
Lights(52)=array(Light52,Light52a)
Lights(53)=array(Light53,Light53a) ' bug was 52
Set Lights(54)=Light54
Set Lights(55)=Light55
Set Lights(56)=Light56
Set Lights(57)=Light57
Set Lights(58)=Light58
Set Lights(59)=Light59

'Backglass Lights
'Set Lights(14)=Light14 'player 1
'Set Lights(15)=Light15 'player 5
'Set Lights(29)=Light29 'high score
'Set Lights(30)=Light30 'player 2
'Set Lights(31)=Light31 'player 6
'Set Lights(41)=Light41 'ballinplay
'Set Lights(45)=Light45 'game over
'Set Lights(46)=Light46 'player 3
'Set Lights(61)=Light61 'tilt
'Set Lights(62)=Light62 'player 4



'**********************************************************************************************************
'Digital Display
'**********************************************************************************************************
Dim Digits(40)

' 1st Player
Digits(0) = Array(LED10,LED11,LED12,LED13,LED14,LED15,LED16)
Digits(1) = Array(LED20,LED21,LED22,LED23,LED24,LED25,LED26)
Digits(2) = Array(LED30,LED31,LED32,LED33,LED34,LED35,LED36)
Digits(3) = Array(LED40,LED41,LED42,LED43,LED44,LED45,LED46)
Digits(4) = Array(LED50,LED51,LED52,LED53,LED54,LED55,LED56)
Digits(5) = Array(LED60,LED61,LED62,LED63,LED64,LED65,LED66)

' 2nd Player
Digits(6) = Array(LED70,LED71,LED72,LED73,LED74,LED75,LED76)
Digits(7) = Array(LED80,LED81,LED82,LED83,LED84,LED85,LED86)
Digits(8) = Array(LED90,LED91,LED92,LED93,LED94,LED95,LED96)
Digits(9) = Array(LED100,LED101,LED102,LED103,LED104,LED105,LED106)
Digits(10) = Array(LED110,LED111,LED112,LED113,LED114,LED115,LED116)
Digits(11) = Array(LED120,LED121,LED122,LED123,LED124,LED125,LED126)

' 3rd Player
Digits(12) = Array(LED130,LED131,LED132,LED133,LED134,LED135,LED136)
Digits(13) = Array(LED140,LED141,LED142,LED143,LED144,LED145,LED146)
Digits(14) = Array(LED150,LED151,LED152,LED153,LED154,LED155,LED156)
Digits(15) = Array(LED160,LED161,LED162,LED163,LED164,LED165,LED166)
Digits(16) = Array(LED170,LED171,LED172,LED173,LED174,LED175,LED176)
Digits(17) = Array(LED180,LED181,LED182,LED183,LED184,LED185,LED186)

' 4th Player
Digits(18) = Array(LED190,LED191,LED192,LED193,LED194,LED195,LED196)
Digits(19) = Array(LED200,LED201,LED202,LED203,LED204,LED205,LED206)
Digits(20) = Array(LED210,LED211,LED212,LED213,LED214,LED215,LED216)
Digits(21) = Array(LED220,LED221,LED222,LED223,LED224,LED225,LED226)
Digits(22) = Array(LED230,LED231,LED232,LED233,LED234,LED235,LED236)
Digits(23) = Array(LED240,LED241,LED242,LED243,LED244,LED245,LED246)


Digits(24) = Array(LED250,LED251,LED252,LED253,LED254,LED255,LED256)
Digits(25) = Array(LED260,LED261,LED262,LED263,LED264,LED265,LED266)
Digits(26) = Array(LED270,LED271,LED272,LED273,LED274,LED275,LED276)
Digits(27) = Array(LED280,LED281,LED282,LED283,LED284,LED285,LED286)
Digits(28) = Array(LED4,LED2,LED6,LED7,LED5,LED1,LED3)
Digits(29) = Array(LED18,LED9,LED27,LED28,LED19,LED8,LED17)

' Balls
Digits(30) = Array(LED39,LED37,LED48,LED49,LED47,LED29,LED38)
Digits(31) = Array(LED67,LED58,LED69,LED77,LED68,LED57,LED59)
Digits(32) = Array(LED88,LED79,LED97,LED98,LED89,LED78,LED87)
Digits(33) = Array(LED109,LED107,LED118,LED119,LED117,LED99,LED108)
Digits(34) = Array(LED137,LED128,LED139,LED147,LED138,LED127,LED129)
Digits(35) = Array(LED158,LED149,LED167,LED168,LED159,LED148,LED157)

Digits(36) = Array(LED179,LED177,LED188,LED189,LED187,LED169,LED178)
Digits(37) = Array(LED207,LED198,LED209,LED217,LED208,LED197,LED199)

Digits(38) = Array(LED228,LED219,LED237,LED238,LED229,LED218,LED227)
Digits(39) = Array(LED249,LED247,LED258,LED259,LED257,LED239,LED248)




Sub DisplayTimer_Timer
Dim ChgLED,ii,num,chg,stat,obj
ChgLed = Controller.ChangedLEDs(&Hffffffff, &Hffffffff)
If Not IsEmpty(ChgLED) Then
If DesktopMode = True Then
For ii = 0 To UBound(chgLED)
num = chgLED(ii, 0) : chg = chgLED(ii, 1) : stat = chgLED(ii, 2)
if (num < 40) then
For Each obj In Digits(num)
If chg And 1 Then obj.State = stat And 1
chg = chg\2 : stat = stat\2
Next
else
'if char(stat) > "" then msg(num) = char(stat)
end if
next
end if
end if
End Sub
'**********************************************************************************************************

'Bally Six million dollar man
'From Inkochnito's addition in the previous pinmame table
Sub editDips
Dim vpmDips : Set vpmDips = New cvpmDips
With vpmDips
.AddForm 700,400,"The Six Million Dollar Man - DIP switches"
.AddChk 7,10,180,Array("Match feature",&H00100000)'dip 21
.AddChk 205,10,115,Array("Credits display",&H00080000)'dip 20
.AddFrame 2,30,190,"Maximum credits",&H00070000,Array("10 credits",&H00010000,"15 credits",&H00020000,"25 credits",&H00040000,"40 credits",&H00070000)'dip 17&18&19
.AddFrame 2,106,190,"Sound features",&H80000080,Array("chime effects",&H80000000,"chime and tunes",0,"noise",&H00000080,"noises and tunes",&H80000080)'dip 8&32
.AddFrame 2,184,190,"High score feature",&H00006000,Array("no award",0,"extra ball",&H00004000,"replay",&H00006000)'dip 14&15
.AddFrame 2,248,190,"50,000 special",&H10000000,Array("3X on 1 ball = special",0,"2X on 1 ball = special",&H10000000)'dip 29
.AddFrame 205,30,190,"High score to date",&H00000060,Array("no award",0,"1 credit",&H00000020,"2 credits",&H00000040,"3 credits",&H00000060)'dip 6&7
.AddFrame 205,106,190,"Balls per game", 32768,Array("3 balls",0,"5 balls", 32768)'dip 16
.AddFrame 205,152,190,"Outlane special",&H00200000,Array("alternates from side to side",0,"both lanes lite for special",&H00200000)'dip 22
.AddFrame 205,200,190,"Saucer adjustment",&H00400000,Array ("saucer starts at 3,000",0,"saucer starts at 5,000",&H00400000)'dip 23
.AddFrame 205,248,190,"Upper and lower O target",&H00800000,Array("are not tied",0,"are tied together",&H00800000)'dip 24
'dip 30&31 not used
.AddLabel 50,310,300,20,"After hitting OK, press F3 to reset game with new settings."
.ViewDips
End With
End Sub
Set vpmShowDips = GetRef("editDips")


'**********************************************************************************************************
'**********************************************************************************************************


'*****GI Lights On
dim xx

For each xx in GI:xx.State = 1: Next


'**********Sling Shot Animations
' Rstep and Lstep are the variables that increment the animation
'****************
Dim RStep, Lstep

Sub RightSlingShot_Slingshot
PlaySound SoundFX("right_slingshot",DOFContactors), 0, 1, 0.05, 0.05
FlashLevel3 = 1 : FlasherFlash3_Timer
Dim x
x = INT(2 * RND(1) )
Select Case x
Case 0:playSound"BM23"
Case 1:playSound"BM27"

End Select
vpmTimer.PulseSw 36
RSling.Visible = 0
RSling1.Visible = 1
sling1.TransZ = -20
RStep = 0
RightSlingShot.TimerEnabled = 1
End Sub

Sub RightSlingShot_Timer
Select Case RStep
Case 3:RSLing1.Visible = 0:RSLing2.Visible = 1:sling1.TransZ = -10
Case 4:RSLing2.Visible = 0:RSLing.Visible = 1:sling1.TransZ = 0:RightSlingShot.TimerEnabled = 0:
End Select
RStep = RStep + 1
End Sub

Sub LeftSlingShot_Slingshot
PlaySound SoundFX("left_slingshot",DOFContactors),0,1,-0.05,0.05
FlashLevel1 = 1 : FlasherFlash1_Timer
Dim x
x = INT(2 * RND(1) )
Select Case x
Case 0:playSound"BM23"
Case 1:playSound"BM27"

End Select
vpmTimer.PulseSw 37
LSling.Visible = 0
LSling1.Visible = 1
sling2.TransZ = -20
LStep = 0
LeftSlingShot.TimerEnabled = 1
End Sub

Sub LeftSlingShot_Timer
Select Case LStep
Case 3:LSLing1.Visible = 0:LSLing2.Visible = 1:sling2.TransZ = -10
Case 4:LSLing2.Visible = 0:LSLing.Visible = 1:sling2.TransZ = 0:LeftSlingShot.TimerEnabled = 0:
End Select
LStep = LStep + 1
End Sub



' *********************************************************************
' Supporting Ball & Sound Functions
' *********************************************************************

Function Vol(ball) ' Calculates the Volume of the sound based on the ball speed
Vol = Csng(BallVel(ball)*0.4 + 6)
End Function

Function Pan(ball) ' Calculates the pan for a ball based on the X position on the table. "table1" is the name of the table
Dim tmp
tmp = ball.x * 2 / table1.width-1
If tmp > 0 Then
Pan = Csng(tmp ^10)
Else
Pan = Csng(-((- tmp) ^10) )
End If
End Function

Function Pitch(ball) ' Calculates the pitch of the sound based on the ball speed
Pitch = BallVel(ball) * 20
End Function

Function BallVel(ball) 'Calculates the ball speed
BallVel = INT(SQR((ball.VelX ^2) + (ball.VelY ^2) ) )
End Function

'*****************************************
' JP's VP10 Rolling Sounds
'*****************************************

Const tnob = 5 ' total number of balls
ReDim rolling(tnob)
InitRolling

Sub InitRolling
Dim i
For i = 0 to tnob
rolling(i) = False
Next
End Sub

Sub RollingTimer_Timer()
Dim BOT, b
BOT = GetBalls

' stop the sound of deleted balls
For b = UBound(BOT) + 1 to tnob
rolling(b) = False
StopSound("fx_ballrolling" & b)
Next

' exit the sub if no balls on the table
If UBound(BOT) = -1 Then Exit Sub

' play the rolling sound for each ball
For b = 0 to UBound(BOT)
If BallVel(BOT(b) ) > 1 AND BOT(b).z < 30 Then
rolling(b) = True
PlaySound("fx_ballrolling" & b), -1, Vol(BOT(b) ), Pan(BOT(b) ), 0, Pitch(BOT(b) ), 1, 0
Else
If rolling(b) = True Then
StopSound("fx_ballrolling" & b)
rolling(b) = False
End If
End If
Next
End Sub

'**********************
' Ball Collision Sound
'**********************

Sub OnBallBallCollision(ball1, ball2, velocity)
PlaySound("fx_collide"), 0, Csng(velocity) ^2 / 2000, Pan(ball1), 0, Pitch(ball1), 0, 0
End Sub



'************************************
' What you need to add to your table
'************************************

' a timer called RollingTimer. With a fast interval, like 10
' one collision sound, in this script is called fx_collide
' as many sound files as max number of balls, with names ending with 0, 1, 2, 3, etc
' for ex. as used in this script: fx_ballrolling0, fx_ballrolling1, fx_ballrolling2, fx_ballrolling3, etc


'******************************************
' Explanation of the rolling sound routine
'******************************************

' sounds are played based on the ball speed and position

' the routine checks first for deleted balls and stops the rolling sound.

' The For loop goes through all the balls on the table and checks for the ball speed and
' if the ball is on the table (height lower than 30) then then it plays the sound
' otherwise the sound is stopped, like when the ball has stopped or is on a ramp or flying.

' The sound is played using the VOL, PAN and PITCH functions, so the volume and pitch of the sound
' will change according to the ball speed, and the PAN function will change the stereo position according
' to the position of the ball on the table.


'**************************************
' Explanation of the collision routine
'**************************************

' The collision is built in VP.
' You only need to add a Sub OnBallBallCollision(ball1, ball2, velocity) and when two balls collide they
' will call this routine. What you add in the sub is up to you. As an example is a simple Playsound with volume and paning
' depending of the speed of the collision.


Sub Pins_Hit (idx)
PlaySound "pinhit_low", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0
End Sub

Sub Targets_Hit (idx)
PlaySound SoundFX("target",DOFContactors), 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0
End Sub

Sub Metals_Thin_Hit (idx)
PlaySound "metalhit_thin", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End Sub

Sub Metals_Medium_Hit (idx)
PlaySound "metalhit_medium", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End Sub

Sub Metals2_Hit (idx)
PlaySound "metalhit2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End Sub

Sub Gates_Hit (idx)
PlaySound "gate4", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End Sub

Sub Spinner_Spin
PlaySound "fx_spinner",0,.25,0,0.25
End Sub

Sub Rubbers_Hit(idx)
dim finalspeed
finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
If finalspeed > 20 then
PlaySound "fx_rubber2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End if
If finalspeed >= 6 AND finalspeed <= 20 then
RandomSoundRubber()
End If
End Sub

Sub Posts_Hit(idx)
dim finalspeed
finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
If finalspeed > 16 then
PlaySound "fx_rubber2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End if
If finalspeed >= 6 AND finalspeed <= 16 then
RandomSoundRubber()
End If
End Sub

Sub RandomSoundRubber()
Select Case Int(Rnd*3)+1
Case 1 : PlaySound "rubber_hit_1", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
Case 2 : PlaySound "rubber_hit_2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
Case 3 : PlaySound "rubber_hit_3", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End Select
End Sub

Sub LeftFlipper_Collide(parm)
RandomSoundFlipper()
End Sub

Sub RightFlipper_Collide(parm)
RandomSoundFlipper()
End Sub

Sub RandomSoundFlipper()
Select Case Int(Rnd*3)+1
Case 1 : PlaySound "flip_hit_1", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
Case 2 : PlaySound "flip_hit_2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
Case 3 : PlaySound "flip_hit_3", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End Select
End Sub

'*************
' JP'S LUT
'*************

Dim bLutActive, LUTImage
Dim xl
Sub LoadLUT
bLutActive = False
xl = LoadValue(cGameName, "LUTImage")
If(xl <> "") Then LUTImage = xl Else LUTImage = 0
UpdateLUT
End Sub

Sub SaveLUT
SaveValue cGameName, "LUTImage", LUTImage
End Sub

Sub NextLUT: LUTImage = (LUTImage +1 ) MOD 15: UpdateLUT: SaveLUT: End Sub

Sub UpdateLUT
Select Case LutImage
Case 0: Table1.ColorGradeImage = "LUT0"
Case 1: Table1.ColorGradeImage = "LUT1"
Case 2: Table1.ColorGradeImage = "LUT2"
Case 3: Table1.ColorGradeImage = "LUT3"
Case 4: Table1.ColorGradeImage = "LUT4"
Case 5: Table1.ColorGradeImage = "LUT5"
Case 6: Table1.ColorGradeImage = "LUT6"
Case 7: Table1.ColorGradeImage = "LUT7"
Case 8: Table1.ColorGradeImage = "LUT8"
Case 9: Table1.ColorGradeImage = "LUT9"
Case 10: Table1.ColorGradeImage = "LUT10"
Case 11: Table1.ColorGradeImage = "LUT11"
Case 12: Table1.ColorGradeImage = "LUT12"
Case 13: Table1.ColorGradeImage = "LUT13"
Case 14: Table1.ColorGradeImage = "LUT14"
Case 15: Table1.ColorGradeImage = "LUT15"
End Select
End Sub


Sub Table1_Exit():Controller.Stop:Controller.Games("smmanc").Settings.Value("sound")=1: End Sub
Machine 'smmanc' (Six Million Dollar Man, The (7-digit
 
ub Table1_Init
vpmInit Me
On Error Resume Next
With Controller
.GameName = cGameName
.Games(cGameName).Settings.Value("sound")=0 '1 TURNS ON ROM SOUNDS
If Err Then MsgBox "Can't start Game" & cGameName & vbNewLine & Err.Description : Exit Sub
.SplashInfoLine = "Six Million Dollar Man,The (Bally 1978) v2.2"& vbNewLine &"Sound Mod by Xenonph"& vbNewLine &"VPX Table by Allknowing2012-32assassin-HF-Arngrim"
.HandleMechanics=0
.HandleKeyboard=0
.ShowDMDOnly=1
.ShowFrame=0
.ShowTitle=0
.hidden = 1

If Err Then MsgBox Err.Description
End With
On Error Goto 0
Controller.SolMask(0)=0
vpmTimer.AddTimer 2000,"Controller.SolMask(0)=&Hffffffff'" 'ignore all solenoids - then add the timer to renable all the solenoids after 2 seconds
Controller.Run
If Err Then MsgBox Err.Description
On Error Goto 0

PinMAMETimer.Interval=PinMAMEInterval
PinMAMETimer.Enabled=1:playsound"BM01":Bumper3.timerinterval=95000:Bumper3.timerenabled=1

'Nudging
vpmNudge.TiltSwitch = 7
vpmNudge.Sensitivity = 5
vpmNudge.TiltObj = Array(Bumper1,Bumper2,Bumper3,LeftSlingshot,RightSlingShot)

'**Trough
Set bsTrough = New cvpmBallStack
bsTrough.InitSw 0,8,0,0,0,0,0,0
bsTrough.InitKick BallRelease, 45, 8
bsTrough.InitExitSnd SoundFX("BallRelease",DOFContactors),"solenoid"
bsTrough.Balls = 1

'**Saucer
Set bsSaucer = New cvpmBallStack
bsSaucer.InitSaucer sw32, 32, 180, 5
bsSaucer.KickForceVar = 2
bsSaucer.KickAngleVar = 2
bsSaucer.InitExitSnd SoundFX("popper",DOFContactors),"solon"

Set dtR=New cvpmDropTarget
dtR.InitDrop Array(sw1,sw2,sw3,sw4,sw5),Array(1,2,3,4,5)
dtR.InitSnd SoundFX("DTDrop",DOFContactors),"DTReset"
LoadLUT
End Sub

'**********************************************************************************************************
'Plunger code
'**********************************************************************************************************

Sub Table1_KeyDown(ByVal KeyCode)
If KeyDownHandler(keycode) Then Exit Sub
If keycode = LeftMagnaSave Then bLutActive = True
If keycode = RightMagnaSave And bLutActive= True Then NextLUT: End If
If keycode = PlungerKey Then Plunger.Pullback:playsound "plungerpull"
End Sub

Sub Table1_KeyUp(ByVal KeyCode)
If keycode = LeftMagnaSave Then bLutActive = False
If KeyCode = 6 Then
Dim x
x = INT(6 * RND(1) )
Select Case x
Case 0:stopSound"BM00":stopSound"BM00a":stopSound"BM30":stopSound"BM20":stopSound"BM55":stopSound"BM64":playSound"BM00"
Case 1:stopSound"BM00":stopSound"BM00a":stopSound"BM30":stopSound"BM20":stopSound"BM55":stopSound"BM64":playSound"BM00a"
Case 2:stopSound"BM00":stopSound"BM00a":stopSound"BM30":stopSound"BM20":stopSound"BM55":stopSound"BM64":playSound"BM30"
Case 3:stopSound"BM00":stopSound"BM00a":stopSound"BM30":stopSound"BM20":stopSound"BM55":stopSound"BM64":playSound"BM20"
Case 4:stopSound"BM00":stopSound"BM00a":stopSound"BM30":stopSound"BM20":stopSound"BM55":stopSound"BM64":playSound"BM55"
Case 5:stopSound"BM00":stopSound"BM00a":stopSound"BM30":stopSound"BM20":stopSound"BM55":stopSound"BM64":playSound"BM64"
End Select
Flr.enabled=true:Flr.interval=200:Flashoff.enabled=true:Flashoff.interval=2000
end if
If KeyCode = 4 Then
Dim y
y = INT(6 * RND(1) )
Select Case y
Case 0:stopSound"BM00":stopSound"BM00a":stopSound"BM30":stopSound"BM20":stopSound"BM55":stopSound"BM64":playSound"BM00"
Case 1:stopSound"BM00":stopSound"BM00a":stopSound"BM30":stopSound"BM20":stopSound"BM55":stopSound"BM64":playSound"BM00a"
Case 2:stopSound"BM00":stopSound"BM00a":stopSound"BM30":stopSound"BM20":stopSound"BM55":stopSound"BM64":playSound"BM30"
Case 3:stopSound"BM00":stopSound"BM00a":stopSound"BM30":stopSound"BM20":stopSound"BM55":stopSound"BM64":playSound"BM20"
Case 4:stopSound"BM00":stopSound"BM00a":stopSound"BM30":stopSound"BM20":stopSound"BM55":stopSound"BM64":playSound"BM55"
Case 5:stopSound"BM00":stopSound"BM00a":stopSound"BM30":stopSound"BM20":stopSound"BM55":stopSound"BM64":playSound"BM64"
End Select
Flr.enabled=true:Flr.interval=200:Flashoff.enabled=true:Flashoff.interval=2000
end if
If KeyCode = 2 Then
EndMusic:stopSound"BM00":stopSound"BM00a":stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM29":stopSound"BM30":Bumper1.timerenabled=0:Bumper2.timerenabled=0:sw32.timerenabled=0:Bumper3.timerenabled=0:sw32.timerenabled=0
Dim v
v = INT(8 * RND(1) )
Select Case v
Case 0:stopSound"BM02":stopSound"BM03":stopSound"BM04":stopSound"BM05":stopSound"BM41":stopSound"BM43":stopSound"BM56":stopSound"BM62":playsound("BM02"):Drain.timerinterval=6000:Drain.timerenabled=1
Case 1:stopSound"BM02":stopSound"BM03":stopSound"BM04":stopSound"BM05":stopSound"BM41":stopSound"BM43":stopSound"BM56":stopSound"BM62":playsound("BM03"):Drain.timerinterval=6000:Drain.timerenabled=1
Case 2:stopSound"BM02":stopSound"BM03":stopSound"BM04":stopSound"BM05":stopSound"BM41":stopSound"BM43":stopSound"BM56":stopSound"BM62":playsound("BM04"):Drain.timerinterval=6000:Drain.timerenabled=1
Case 3:stopSound"BM02":stopSound"BM03":stopSound"BM04":stopSound"BM05":stopSound"BM41":stopSound"BM43":stopSound"BM56":stopSound"BM62":playsound("BM05"):Drain.timerinterval=4000:Drain.timerenabled=1
Case 4:stopSound"BM02":stopSound"BM03":stopSound"BM04":stopSound"BM05":stopSound"BM41":stopSound"BM43":stopSound"BM56":stopSound"BM62":playsound("BM41"):Drain.timerinterval=1000:Drain.timerenabled=1
Case 5:stopSound"BM02":stopSound"BM03":stopSound"BM04":stopSound"BM05":stopSound"BM41":stopSound"BM43":stopSound"BM56":stopSound"BM62":playsound("BM43"):Drain.timerinterval=4000:Drain.timerenabled=1
Case 6:stopSound"BM02":stopSound"BM03":stopSound"BM04":stopSound"BM05":stopSound"BM41":stopSound"BM43":stopSound"BM56":stopSound"BM62":playsound("BM56"):Drain.timerinterval=2000:Drain.timerenabled=1
Case 7:stopSound"BM02":stopSound"BM03":stopSound"BM04":stopSound"BM05":stopSound"BM41":stopSound"BM43":stopSound"BM56":stopSound"BM62":playsound("BM62"):Drain.timerinterval=3000:Drain.timerenabled=1


End Select

End If
If KeyUpHandler(keycode) Then Exit Sub
If keycode = PlungerKey Then
PlaySound"Plunger"
Plunger.Fire

End If

End Sub

'**********************************************************************************************************

Sub Trigger1_Hit()
StopSound"BM10":sw2.timerenabled=0:sw3.timerenabled=0
StopSound"BM29"
PlaySound"BM30" :Drain.timerenabled=0
Dim w
w = INT(10 * RND(1) )
Select Case w
Case 0:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":playSound"BM20":Bumper1.timerinterval=0000:Bumper1.timerenabled=1
Case 1:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":playSound"BM21":Bumper1.timerinterval=0000:Bumper1.timerenabled=1
Case 2:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":playSound"BM22":Bumper1.timerinterval=0000:Bumper1.timerenabled=1
Case 3:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":playSound"BM23":Bumper1.timerinterval=0000:Bumper1.timerenabled=1
Case 4:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":playSound"BM25":Bumper1.timerinterval=0000:Bumper1.timerenabled=1
Case 5:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":playSound"BM26":Bumper1.timerinterval=0000:Bumper1.timerenabled=1
Case 6:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":playSound"BM27":Bumper1.timerinterval=0000:Bumper1.timerenabled=1
Case 7:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":playSound"BM28":Bumper1.timerinterval=0000:Bumper1.timerenabled=1
Case 8:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":playSound"BM31":Bumper1.timerinterval=0000:Bumper1.timerenabled=1
Case 9:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":playSound"BM32":Bumper1.timerinterval=0000:Bumper1.timerenabled=1

End Select
End Sub

Sub BallRelease_unHit():Drain.timerinterval=5000:Drain.timerenabled=1:Bumper3.timerenabled=0:sw1.timerenabled=0:End Sub


' Drain hole
Sub Drain_Hit:playsound"drain":bsTrough.addball me:Bumper1.timerenabled=0:Bumper2.timerenabled=0:drain.timerenabled=0:sw1.timerenabled=0:sw32.timerenabled=0:Bumper3.timerinterval=10000:Bumper3.timerenabled=1
Dim x
x = INT(26 * RND(1) )
Select Case x
Case 0:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM42"
Case 1:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM44"
Case 2:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM47"
Case 3:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM48"
Case 4:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM49"
Case 5:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM50"
Case 6:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM51"
Case 7:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM52"
Case 8:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM53"
Case 9:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM54"
Case 10:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM58"
Case 11:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM59"
Case 12:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM60"
Case 13:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM61"
Case 14:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM63"
Case 15:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM65"
Case 16:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM66"
Case 17:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM67"
Case 18:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM68"
Case 19:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM02"
Case 20:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM03"
Case 21:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM04"
Case 22:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM05"
Case 23:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM07"
Case 24:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM12"
Case 25:stopSound"BM01":stopSound"BM06":stopSound"BM08":stopSound"BM09":stopSound"BM10":stopSound"BM27":playSound"BM11"

End Select

End Sub

Sub drain_timer
Dim x
x = INT(2 * RND(1) )
Select Case x
Case 0:stopSound"BM00":stopSound"BM00a":playSound"BM10":sw32.timerinterval=6000:sw32.timerenabled=1
Case 1:stopSound"BM00":stopSound"BM00a":playSound"BM10":sw32.timerinterval=6000:sw32.timerenabled=1

End Select
Drain.timerenabled=0
End Sub

' Saucer Hit
Sub sw32_Hit:bsSaucer.AddBall 0
Flu.enabled=true:Flu.interval=300
Dim x
x = INT(7 * RND(1) )
Select Case x
Case 0:stopSound"BM40":stopSound"BM45":stopSound"BM46":stopSound"BM55":stopSound"BM57":stopSound"BM64":playSound"BM40"
Case 1:stopSound"BM40":stopSound"BM45":stopSound"BM46":stopSound"BM55":stopSound"BM57":stopSound"BM64":playSound"BM45"
Case 2:stopSound"BM40":stopSound"BM45":stopSound"BM46":stopSound"BM55":stopSound"BM57":stopSound"BM64":playSound"BM46"
Case 3:stopSound"BM40":stopSound"BM45":stopSound"BM46":stopSound"BM55":stopSound"BM57":stopSound"BM64":playSound"BM55"
Case 4:stopSound"BM40":stopSound"BM45":stopSound"BM46":stopSound"BM55":stopSound"BM57":stopSound"BM64":playSound"BM57"
Case 5:stopSound"BM40":stopSound"BM45":stopSound"BM46":stopSound"BM55":stopSound"BM57":stopSound"BM64":playSound"BM64"
Case 6:stopSound"BM40":stopSound"BM45":stopSound"BM46":stopSound"BM55":stopSound"BM57":stopSound"BM64":playSound"BM00a"

End Select

End Sub

Sub sw32_unHit:
Flashoff.enabled=true

End Sub

Sub sw32_timer
Dim x
x = INT(2 * RND(1) )
Select Case x
Case 0:stopSound"BM00":stopSound"BM00a":playSound"BM10":Drain.timerinterval=6000:Drain.timerenabled=1
Case 1:stopSound"BM00":stopSound"BM00a":playSound"BM10":Drain.timerinterval=6000:Drain.timerenabled=1

End Select
sw32.timerenabled=0
End Sub

'SlingShots
Sub LeftSlingshot_Slingshot:vpmTimer.PulseSw 36:End Sub
Sub RightSlingshot_Slingshot:vpmTimer.PulseSw 37:End Sub

'Spinner
Sub Spinner2_Spin():vpmTimer.pulsesw 20 : playsound"fx_spinner":FlashLevel2 = 1 : FlasherFlash2_Timer:FlashLevel4 = 1 : FlasherFlash4_Timer : End Sub ' bug
Sub Spinner1_Spin():vpmTimer.pulsesw 21 : playsound"fx_spinner":FlashLevel2 = 1 : FlasherFlash2_Timer:FlashLevel4 = 1 : FlasherFlash4_Timer : End Sub

'Bumpers
Sub Bumper1_Hit:vpmTimer.pulsesw 38 : playsound SoundFX("fx_bumper1",DOFContactors):stopSound"BM25":playSound"BM25":FlashLevel2 = 1 : FlasherFlash2_Timer: End Sub

Sub Bumper1_timer
Dim x
x = INT(3 * RND(1) )
Select Case x
Case 0:stopSound"BM00":stopSound"BM00a":playSound"BM08":Bumper2.timerinterval=24000:Bumper2.timerenabled=1
Case 1:stopSound"BM00":stopSound"BM00a":playSound"BM09":Bumper2.timerinterval=15000:Bumper2.timerenabled=1
Case 2:stopSound"BM00":stopSound"BM00a":playSound"BM06":Bumper2.timerinterval=17000:Bumper2.timerenabled=1
End Select
Bumper1.timerenabled=0
End Sub

Sub Bumper2_Hit:vpmTimer.pulsesw 39 : playsound SoundFX("fx_bumper2",DOFContactors):stopSound"BM25":playSound"BM25":FlashLevel4 = 1 : FlasherFlash4_Timer: End Sub

Sub Bumper2_timer
Dim x
x = INT(3 * RND(1) )
Select Case x
Case 0:stopSound"BM00":stopSound"BM00a":playSound"BM08":Bumper1.timerinterval=24000:Bumper1.timerenabled=1
Case 1:stopSound"BM00":stopSound"BM00a":playSound"BM09":Bumper1.timerinterval=15000:Bumper1.timerenabled=1
Case 2:stopSound"BM00":stopSound"BM00a":playSound"BM06":Bumper1.timerinterval=17000:Bumper1.timerenabled=1
End Select
Bumper2.timerenabled=0
End Sub

Sub Bumper3_Hit:vpmTimer.pulsesw 40 : playsound SoundFX("fx_bumper3",DOFContactors):stopSound"BM25":playSound"BM25":FlashLevel2 = 1 : FlasherFlash2_Timer:FlashLevel4 = 1 : FlasherFlash4_Timer: End Sub

Sub Bumper3_timer
Dim x
x = INT(3 * RND(1) )
Select Case x
Case 0:stopSound"BM00":stopSound"BM00a":playSound"BM08":sw1.timerinterval=44000:sw1.timerenabled=1
Case 1:stopSound"BM00":stopSound"BM00a":playSound"BM09":sw1.timerinterval=35000:sw1.timerenabled=1
Case 2:stopSound"BM00":stopSound"BM00a":playSound"BM06":sw1.timerinterval=37000:sw1.timerenabled=1

End Select
Bumper3.timerenabled=0
End Sub

'Drop Targets
Sub Sw1_Hit:dtR.Hit 1 :playSound"BM20":End Sub

Sub Sw1_timer
Dim x
x = INT(3 * RND(1) )
Select Case x
Case 0:stopSound"BM00":stopSound"BM00a":playSound"BM01":Bumper3.timerinterval=100000:Bumper3.timerenabled=1
Case 1:stopSound"BM00":stopSound"BM00a":playSound"BM01":Bumper3.timerinterval=100000:Bumper3.timerenabled=1
Case 2:stopSound"BM00":stopSound"BM00a":playSound"BM01":Bumper3.timerinterval=100000:Bumper3.timerenabled=1

End Select
Sw1.timerenabled=0
End Sub

Sub Sw2_Hit:dtR.Hit 2 :playSound"BM20":End Sub

Sub Sw2_timer
Dim x
x = INT(2 * RND(1) )
Select Case x
Case 0:stopSound"BM00":stopSound"BM00a":playSound"BM10":sw3.timerinterval=6000:sw3.timerenabled=1
Case 1:stopSound"BM00":stopSound"BM00a":playSound"BM10":sw3.timerinterval=6000:sw3.timerenabled=1

End Select
Sw2.timerenabled=0
End Sub

Sub Sw3_Hit:dtR.Hit 3 :playSound"BM20":End Sub

Sub Sw3_timer
Dim x
x = INT(2 * RND(1) )
Select Case x
Case 0:stopSound"BM00":stopSound"BM00a":playSound"BM10":sw2.timerinterval=6000:sw2.timerenabled=1
Case 1:stopSound"BM00":stopSound"BM00a":playSound"BM10":sw2.timerinterval=6000:sw2.timerenabled=1

End Select
Sw3.timerenabled=0
End Sub

Sub Sw4_Hit:dtR.Hit 4 :playSound"BM20":End Sub
Sub Sw5_Hit:dtR.Hit 5 :playSound"BM20":End Sub

'Stand Up Targets
Sub sw22_Hit:vpmTimer.PulseSw 22:playSound"BM20":End Sub
Sub sw23_Hit:vpmTimer.PulseSw 23:playSound"BM20":End Sub
Sub sw24_Hit:vpmTimer.PulseSw 24:playSound"BM20":End Sub
Sub sw27_Hit:vpmTimer.PulseSw 27:playSound"BM20":End Sub
Sub sw28_Hit:vpmTimer.PulseSw 28:playSound"BM20":End Sub
Sub sw29_Hit:vpmTimer.PulseSw 29:playSound"BM20":End Sub

'Trigger Wires
Sub sw14_Hit:Controller.Switch(14) = 1:playSound "rollover":playSound "BM00":End Sub
Sub sw14_UnHit:Controller.Switch(14) = 0:End Sub
Sub sw15_Hit:Controller.Switch(15) = 1:playSound "rollover":playSound "BM00":End Sub
Sub sw15_UnHit:Controller.Switch(15) = 0:End Sub
Sub sw35a_Hit:Controller.Switch(35) = 1:playSound "rollover":playSound "BM00":DOF 101, 1:End Sub
Sub sw35a_UnHit:Controller.Switch(35) = 0:DOF 101, 0:End Sub
Sub sw35b_Hit:Controller.Switch(35) = 1:playSound "rollover":playSound "BM00":DOF 102, 1:End Sub
Sub sw35b_UnHit:Controller.Switch(35) = 0:DOF 102, 0:End Sub
Sub sw17_Hit:Controller.Switch(17) = 1:playSound "rollover":playSound "BM00":End Sub
Sub sw17_UnHit:Controller.Switch(17) = 0:End Sub
Sub sw18_Hit:Controller.Switch(18) = 1:playSound "rollover":playSound "BM00":End Sub
Sub sw18_UnHit:Controller.Switch(18) = 0:End Sub

'Star Triggers
Sub sw25a_Hit:Controller.Switch(25) = 1:playSound "rollover":End Sub
Sub sw25a_UnHit:Controller.Switch(25) = 0:End Sub
Sub sw25b_Hit:Controller.Switch(25) = 1:playSound "rollover":End Sub
Sub sw25b_UnHit:Controller.Switch(25) = 0:End Sub
Sub sw26_Hit:Controller.Switch(26) = 1:playSound "rollover":End Sub
Sub sw26_UnHit:Controller.Switch(26) = 0:End Sub


Set Lights(1)=Light1
Set Lights(2)=Light2
Set Lights(3)=Light3
Lights(4)=array(Light4,Light4a)
Lights(5)=array(Light5,Light5a)
Set Lights(6)=Light6
Set Lights(7)=Light7
Set Lights(8)=Light8
Set Lights(9)=Light9
Lights(10)=array(Light10,Light10a)
Set Lights(11)=Light11
Set Lights(12)=Light12
Set Lights(17)=Light17
Set Lights(18)=Light18
Set Lights(19)=Light19
Lights(20)=array(Light20,Light20a)
Set Lights(22)=Light22
Set Lights(23)=Light23
Set Lights(24)=Light24
Set Lights(25)=Light25
Lights(26)=array(Light26,Light26a)
'Lights(27)=array(Light27,Light27a)
Set Lights(28)=Light28
Set Lights(33)=Light33
Set Lights(34)=Light34
Set Lights(35)=Light35
Lights(36)=array(Light36,Light36a)
Set Lights(37)=Light37
Set Lights(38)=Light38
Set Lights(39)=Light39
Set Lights(40)=Light40
Lights(42)=array(Light42,Light42a)
Set Lights(44)=Light44
Set Lights(49)=Light49
Set Lights(50)=Light50
Set Lights(51)=Light51
Lights(52)=array(Light52,Light52a)
Lights(53)=array(Light53,Light53a) ' bug was 52
Set Lights(54)=Light54
Set Lights(55)=Light55
Set Lights(56)=Light56
Set Lights(57)=Light57
Set Lights(58)=Light58
Set Lights(59)=Light59

'Backglass Lights
'Set Lights(14)=Light14 'player 1
'Set Lights(15)=Light15 'player 5
'Set Lights(29)=Light29 'high score
'Set Lights(30)=Light30 'player 2
'Set Lights(31)=Light31 'player 6
'Set Lights(41)=Light41 'ballinplay
'Set Lights(45)=Light45 'game over
'Set Lights(46)=Light46 'player 3
'Set Lights(61)=Light61 'tilt
'Set Lights(62)=Light62 'player 4



'**********************************************************************************************************
'Digital Display
'**********************************************************************************************************
Dim Digits(40)

' 1st Player
Digits(0) = Array(LED10,LED11,LED12,LED13,LED14,LED15,LED16)
Digits(1) = Array(LED20,LED21,LED22,LED23,LED24,LED25,LED26)
Digits(2) = Array(LED30,LED31,LED32,LED33,LED34,LED35,LED36)
Digits(3) = Array(LED40,LED41,LED42,LED43,LED44,LED45,LED46)
Digits(4) = Array(LED50,LED51,LED52,LED53,LED54,LED55,LED56)
Digits(5) = Array(LED60,LED61,LED62,LED63,LED64,LED65,LED66)

' 2nd Player
Digits(6) = Array(LED70,LED71,LED72,LED73,LED74,LED75,LED76)
Digits(7) = Array(LED80,LED81,LED82,LED83,LED84,LED85,LED86)
Digits(8) = Array(LED90,LED91,LED92,LED93,LED94,LED95,LED96)
Digits(9) = Array(LED100,LED101,LED102,LED103,LED104,LED105,LED106)
Digits(10) = Array(LED110,LED111,LED112,LED113,LED114,LED115,LED116)
Digits(11) = Array(LED120,LED121,LED122,LED123,LED124,LED125,LED126)

' 3rd Player
Digits(12) = Array(LED130,LED131,LED132,LED133,LED134,LED135,LED136)
Digits(13) = Array(LED140,LED141,LED142,LED143,LED144,LED145,LED146)
Digits(14) = Array(LED150,LED151,LED152,LED153,LED154,LED155,LED156)
Digits(15) = Array(LED160,LED161,LED162,LED163,LED164,LED165,LED166)
Digits(16) = Array(LED170,LED171,LED172,LED173,LED174,LED175,LED176)
Digits(17) = Array(LED180,LED181,LED182,LED183,LED184,LED185,LED186)

' 4th Player
Digits(18) = Array(LED190,LED191,LED192,LED193,LED194,LED195,LED196)
Digits(19) = Array(LED200,LED201,LED202,LED203,LED204,LED205,LED206)
Digits(20) = Array(LED210,LED211,LED212,LED213,LED214,LED215,LED216)
Digits(21) = Array(LED220,LED221,LED222,LED223,LED224,LED225,LED226)
Digits(22) = Array(LED230,LED231,LED232,LED233,LED234,LED235,LED236)
Digits(23) = Array(LED240,LED241,LED242,LED243,LED244,LED245,LED246)


Digits(24) = Array(LED250,LED251,LED252,LED253,LED254,LED255,LED256)
Digits(25) = Array(LED260,LED261,LED262,LED263,LED264,LED265,LED266)
Digits(26) = Array(LED270,LED271,LED272,LED273,LED274,LED275,LED276)
Digits(27) = Array(LED280,LED281,LED282,LED283,LED284,LED285,LED286)
Digits(28) = Array(LED4,LED2,LED6,LED7,LED5,LED1,LED3)
Digits(29) = Array(LED18,LED9,LED27,LED28,LED19,LED8,LED17)

' Balls
Digits(30) = Array(LED39,LED37,LED48,LED49,LED47,LED29,LED38)
Digits(31) = Array(LED67,LED58,LED69,LED77,LED68,LED57,LED59)
Digits(32) = Array(LED88,LED79,LED97,LED98,LED89,LED78,LED87)
Digits(33) = Array(LED109,LED107,LED118,LED119,LED117,LED99,LED108)
Digits(34) = Array(LED137,LED128,LED139,LED147,LED138,LED127,LED129)
Digits(35) = Array(LED158,LED149,LED167,LED168,LED159,LED148,LED157)

Digits(36) = Array(LED179,LED177,LED188,LED189,LED187,LED169,LED178)
Digits(37) = Array(LED207,LED198,LED209,LED217,LED208,LED197,LED199)

Digits(38) = Array(LED228,LED219,LED237,LED238,LED229,LED218,LED227)
Digits(39) = Array(LED249,LED247,LED258,LED259,LED257,LED239,LED248)




Sub DisplayTimer_Timer
Dim ChgLED,ii,num,chg,stat,obj
ChgLed = Controller.ChangedLEDs(&Hffffffff, &Hffffffff)
If Not IsEmpty(ChgLED) Then
If DesktopMode = True Then
For ii = 0 To UBound(chgLED)
num = chgLED(ii, 0) : chg = chgLED(ii, 1) : stat = chgLED(ii, 2)
if (num < 40) then
For Each obj In Digits(num)
If chg And 1 Then obj.State = stat And 1
chg = chg\2 : stat = stat\2
Next
else
'if char(stat) > "" then msg(num) = char(stat)
end if
next
end if
end if
End Sub
'**********************************************************************************************************

'Bally Six million dollar man
'From Inkochnito's addition in the previous pinmame table
Sub editDips
Dim vpmDips : Set vpmDips = New cvpmDips
With vpmDips
.AddForm 700,400,"The Six Million Dollar Man - DIP switches"
.AddChk 7,10,180,Array("Match feature",&H00100000)'dip 21
.AddChk 205,10,115,Array("Credits display",&H00080000)'dip 20
.AddFrame 2,30,190,"Maximum credits",&H00070000,Array("10 credits",&H00010000,"15 credits",&H00020000,"25 credits",&H00040000,"40 credits",&H00070000)'dip 17&18&19
.AddFrame 2,106,190,"Sound features",&H80000080,Array("chime effects",&H80000000,"chime and tunes",0,"noise",&H00000080,"noises and tunes",&H80000080)'dip 8&32
.AddFrame 2,184,190,"High score feature",&H00006000,Array("no award",0,"extra ball",&H00004000,"replay",&H00006000)'dip 14&15
.AddFrame 2,248,190,"50,000 special",&H10000000,Array("3X on 1 ball = special",0,"2X on 1 ball = special",&H10000000)'dip 29
.AddFrame 205,30,190,"High score to date",&H00000060,Array("no award",0,"1 credit",&H00000020,"2 credits",&H00000040,"3 credits",&H00000060)'dip 6&7
.AddFrame 205,106,190,"Balls per game", 32768,Array("3 balls",0,"5 balls", 32768)'dip 16
.AddFrame 205,152,190,"Outlane special",&H00200000,Array("alternates from side to side",0,"both lanes lite for special",&H00200000)'dip 22
.AddFrame 205,200,190,"Saucer adjustment",&H00400000,Array ("saucer starts at 3,000",0,"saucer starts at 5,000",&H00400000)'dip 23
.AddFrame 205,248,190,"Upper and lower O target",&H00800000,Array("are not tied",0,"are tied together",&H00800000)'dip 24
'dip 30&31 not used
.AddLabel 50,310,300,20,"After hitting OK, press F3 to reset game with new settings."
.ViewDips
End With
End Sub
Set vpmShowDips = GetRef("editDips")


'**********************************************************************************************************
'**********************************************************************************************************


'*****GI Lights On
dim xx

For each xx in GI:xx.State = 1: Next


'**********Sling Shot Animations
' Rstep and Lstep are the variables that increment the animation
'****************
Dim RStep, Lstep

Sub RightSlingShot_Slingshot
PlaySound SoundFX("right_slingshot",DOFContactors), 0, 1, 0.05, 0.05
FlashLevel3 = 1 : FlasherFlash3_Timer
Dim x
x = INT(2 * RND(1) )
Select Case x
Case 0:playSound"BM23"
Case 1:playSound"BM27"

End Select
vpmTimer.PulseSw 36
RSling.Visible = 0
RSling1.Visible = 1
sling1.TransZ = -20
RStep = 0
RightSlingShot.TimerEnabled = 1
End Sub

Sub RightSlingShot_Timer
Select Case RStep
Case 3:RSLing1.Visible = 0:RSLing2.Visible = 1:sling1.TransZ = -10
Case 4:RSLing2.Visible = 0:RSLing.Visible = 1:sling1.TransZ = 0:RightSlingShot.TimerEnabled = 0:
End Select
RStep = RStep + 1
End Sub

Sub LeftSlingShot_Slingshot
PlaySound SoundFX("left_slingshot",DOFContactors),0,1,-0.05,0.05
FlashLevel1 = 1 : FlasherFlash1_Timer
Dim x
x = INT(2 * RND(1) )
Select Case x
Case 0:playSound"BM23"
Case 1:playSound"BM27"

End Select
vpmTimer.PulseSw 37
LSling.Visible = 0
LSling1.Visible = 1
sling2.TransZ = -20
LStep = 0
LeftSlingShot.TimerEnabled = 1
End Sub

Sub LeftSlingShot_Timer
Select Case LStep
Case 3:LSLing1.Visible = 0:LSLing2.Visible = 1:sling2.TransZ = -10
Case 4:LSLing2.Visible = 0:LSLing.Visible = 1:sling2.TransZ = 0:LeftSlingShot.TimerEnabled = 0:
End Select
LStep = LStep + 1
End Sub



' *********************************************************************
' Supporting Ball & Sound Functions
' *********************************************************************

Function Vol(ball) ' Calculates the Volume of the sound based on the ball speed
Vol = Csng(BallVel(ball)*0.4 + 6)
End Function

Function Pan(ball) ' Calculates the pan for a ball based on the X position on the table. "table1" is the name of the table
Dim tmp
tmp = ball.x * 2 / table1.width-1
If tmp > 0 Then
Pan = Csng(tmp ^10)
Else
Pan = Csng(-((- tmp) ^10) )
End If
End Function

Function Pitch(ball) ' Calculates the pitch of the sound based on the ball speed
Pitch = BallVel(ball) * 20
End Function

Function BallVel(ball) 'Calculates the ball speed
BallVel = INT(SQR((ball.VelX ^2) + (ball.VelY ^2) ) )
End Function

'*****************************************
' JP's VP10 Rolling Sounds
'*****************************************

Const tnob = 5 ' total number of balls
ReDim rolling(tnob)
InitRolling

Sub InitRolling
Dim i
For i = 0 to tnob
rolling(i) = False
Next
End Sub

Sub RollingTimer_Timer()
Dim BOT, b
BOT = GetBalls

' stop the sound of deleted balls
For b = UBound(BOT) + 1 to tnob
rolling(b) = False
StopSound("fx_ballrolling" & b)
Next

' exit the sub if no balls on the table
If UBound(BOT) = -1 Then Exit Sub

' play the rolling sound for each ball
For b = 0 to UBound(BOT)
If BallVel(BOT(b) ) > 1 AND BOT(b).z < 30 Then
rolling(b) = True
PlaySound("fx_ballrolling" & b), -1, Vol(BOT(b) ), Pan(BOT(b) ), 0, Pitch(BOT(b) ), 1, 0
Else
If rolling(b) = True Then
StopSound("fx_ballrolling" & b)
rolling(b) = False
End If
End If
Next
End Sub

'**********************
' Ball Collision Sound
'**********************

Sub OnBallBallCollision(ball1, ball2, velocity)
PlaySound("fx_collide"), 0, Csng(velocity) ^2 / 2000, Pan(ball1), 0, Pitch(ball1), 0, 0
End Sub



'************************************
' What you need to add to your table
'************************************

' a timer called RollingTimer. With a fast interval, like 10
' one collision sound, in this script is called fx_collide
' as many sound files as max number of balls, with names ending with 0, 1, 2, 3, etc
' for ex. as used in this script: fx_ballrolling0, fx_ballrolling1, fx_ballrolling2, fx_ballrolling3, etc


'******************************************
' Explanation of the rolling sound routine
'******************************************

' sounds are played based on the ball speed and position

' the routine checks first for deleted balls and stops the rolling sound.

' The For loop goes through all the balls on the table and checks for the ball speed and
' if the ball is on the table (height lower than 30) then then it plays the sound
' otherwise the sound is stopped, like when the ball has stopped or is on a ramp or flying.

' The sound is played using the VOL, PAN and PITCH functions, so the volume and pitch of the sound
' will change according to the ball speed, and the PAN function will change the stereo position according
' to the position of the ball on the table.


'**************************************
' Explanation of the collision routine
'**************************************

' The collision is built in VP.
' You only need to add a Sub OnBallBallCollision(ball1, ball2, velocity) and when two balls collide they
' will call this routine. What you add in the sub is up to you. As an example is a simple Playsound with volume and paning
' depending of the speed of the collision.


Sub Pins_Hit (idx)
PlaySound "pinhit_low", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0
End Sub

Sub Targets_Hit (idx)
PlaySound SoundFX("target",DOFContactors), 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0
End Sub

Sub Metals_Thin_Hit (idx)
PlaySound "metalhit_thin", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End Sub

Sub Metals_Medium_Hit (idx)
PlaySound "metalhit_medium", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End Sub

Sub Metals2_Hit (idx)
PlaySound "metalhit2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End Sub

Sub Gates_Hit (idx)
PlaySound "gate4", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End Sub

Sub Spinner_Spin
PlaySound "fx_spinner",0,.25,0,0.25
End Sub

Sub Rubbers_Hit(idx)
dim finalspeed
finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
If finalspeed > 20 then
PlaySound "fx_rubber2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End if
If finalspeed >= 6 AND finalspeed <= 20 then
RandomSoundRubber()
End If
End Sub

Sub Posts_Hit(idx)
dim finalspeed
finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
If finalspeed > 16 then
PlaySound "fx_rubber2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End if
If finalspeed >= 6 AND finalspeed <= 16 then
RandomSoundRubber()
End If
End Sub

Sub RandomSoundRubber()
Select Case Int(Rnd*3)+1
Case 1 : PlaySound "rubber_hit_1", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
Case 2 : PlaySound "rubber_hit_2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
Case 3 : PlaySound "rubber_hit_3", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End Select
End Sub

Sub LeftFlipper_Collide(parm)
RandomSoundFlipper()
End Sub

Sub RightFlipper_Collide(parm)
RandomSoundFlipper()
End Sub

Sub RandomSoundFlipper()
Select Case Int(Rnd*3)+1
Case 1 : PlaySound "flip_hit_1", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
Case 2 : PlaySound "flip_hit_2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
Case 3 : PlaySound "flip_hit_3", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
End Select
End Sub

'*************
' JP'S LUT
'*************

Dim bLutActive, LUTImage
Dim xl
Sub LoadLUT
bLutActive = False
xl = LoadValue(cGameName, "LUTImage")
If(xl <> "") Then LUTImage = xl Else LUTImage = 0
UpdateLUT
End Sub

Sub SaveLUT
SaveValue cGameName, "LUTImage", LUTImage
End Sub

Sub NextLUT: LUTImage = (LUTImage +1 ) MOD 15: UpdateLUT: SaveLUT: End Sub

Sub UpdateLUT
Select Case LutImage
Case 0: Table1.ColorGradeImage = "LUT0"
Case 1: Table1.ColorGradeImage = "LUT1"
Case 2: Table1.ColorGradeImage = "LUT2"
Case 3: Table1.ColorGradeImage = "LUT3"
Case 4: Table1.ColorGradeImage = "LUT4"
Case 5: Table1.ColorGradeImage = "LUT5"
Case 6: Table1.ColorGradeImage = "LUT6"
Case 7: Table1.ColorGradeImage = "LUT7"
Case 8: Table1.ColorGradeImage = "LUT8"
Case 9: Table1.ColorGradeImage = "LUT9"
Case 10: Table1.ColorGradeImage = "LUT10"
Case 11: Table1.ColorGradeImage = "LUT11"
Case 12: Table1.ColorGradeImage = "LUT12"
Case 13: Table1.ColorGradeImage = "LUT13"
Case 14: Table1.ColorGradeImage = "LUT14"
Case 15: Table1.ColorGradeImage = "LUT15"
End Select
End Sub


Sub Table1_Exit():Controller.Stop:Controller.Games("smmanc").Settings.Value("sound")=1: End Sub
Machine 'smmanc' (Six Million Dollar Man, The (7-digit

What was the error message that popped up?
What you wrote is the whole table script, and does not tell me the error.

What error message pops up when you try to start the table?
 
Line: 273
Game ROMs for 'smmanc' (Six Million Dollar Man, The (7-
I have already downloaded ROM
 
Line: 273
Game ROMs for 'smmanc' (Six Million Dollar Man, The (7-
I have already downloaded ROM
Try going into your VPinMAME folder, and you will find a Setup.exe file.
Double click that and run it.
A window will pop up, and now click Install button at top of window.
Capture.PNG

Now try the table and see if it works.


EDIT:
Also try these 3 roms I added as attachment.
Move the 3 roms into your roms folder, located in your VPinMAME folder.
 

Attachments

  • Six Million Dollar Man roms.zip
    15.2 KB · Views: 6
It still says ROM is missing and YP/Name can't find it.
 

Attachments

  • Six Million Dollar Man roms.zip
    15.2 KB · Views: 3
What do I do with them?
 
As you can see, I am only a beginner at computers
 
If you have problems, I added each rom seperately as attachments, so just download all 3 and move to your roms folder.
 

Attachments

  • smman.zip
    4.8 KB · Views: 1
  • smmanb.zip
    5.1 KB · Views: 1
  • smmanc.zip
    5 KB · Views: 1
Still doesn't work
 
Still doesn't work
Are you able to run any table that requires a rom?
Maybe try gtxjoe's tutorial here, to help you get tables that require roms working..
 
No. the only ones work are without the ROM
 
No. the only ones work are without the ROM
Ok try gtxjoes tutorial here..

Specifically the Next, try a Solid State (SS) table that requires a ROM file.
 
What is a solid state table?
 
What is a solid state table?
A Solid State table either has scoring LED's, or a DMD, unlike Electro-Mechanical (EM) that only has reels.
These Solid State tables require a rom.
 
VP Form dees not work on my computer unless I register and then I get a message. "This Website Is Not Safe.".
 
VP Form dees not work on my computer unless I register and then I get a message. "This Website Is Not Safe.".
I assure you, the VPForums site is safe.

Are you moving the roms, into your rom folder? (rom folder is located in your VPinMAME folder)
Try downloading the 3 Six Million Dollar Man roms I added as attachment above.
Do not unzip the roms.
Just move them into your roms folder.
 
For some reason it says ROM is missing and I put them in the rom folder
 
General chit-chat
Help Users
You can interact with the ChatGPT Bot in any Chat Room and there is a dedicated room. The command is /ai followed by a space and then your ? or inquiry.
ie: /ai What is a EM Pinball Machine?
  • No one is chatting at the moment.
      Chat Bot Mibs Chat Bot Mibs: A-Whistler19 has left the room.
      Back
      Top