Ghostbusters¶
Extensive scripting, build guide, troubleshooting, VR implementation, and software setup for Stern's Ghostbusters (SPIKE).
VPinSPA Required
Ghostbusters requires VPinSPA (not standard VPinMAME) to run. See Software Setup section for installation details.
Scripting¶
RGB Lamp Control from ROM¶
Ghostbusters uses RGB lamps controlled directly from ROM output (not binary on/off). Custom subs needed:
Sub RGBLamp(object, AR, AG, AB)
Dim r, g, bl
r = LampState(aR+81)
g = LampState(aG+81)
bl = LampState(aB+81)
Object.IntensityScale = (r+g+(bl*2)) / 500
Object.ColorFull = RGB(r, g, bl)
Object.Color = RGB(r, g, bl)
End Sub
For flasher objects, divide by 1000 instead of 500. Underlying tray material should be colored before using DL method.
Lamp State Update Performance¶
Original Ghostbusters lamp script had major performance issues - ALL lamps updated every frame (no changed lamp filtering). No fading level checks - collections processed every timer loop. ROM change lamp array (chgLamp) wasn't used for filtering.
Performance fix: Use switch case in update loop to only process lamps with state changes. Massive CPU reduction.
Slimer Motor Position Control¶
Slimer motor position controlled via LampState value (not standard solenoid). Fix required:
if chgLamp(ii,0) = 281 Then
'write this straight to lampstate, so that slimer moves correctly
LampState(chgLamp(ii, 0)) = targetlvl
end if
Add this inside lamp timer loop around line 1931.
VPinSPA Lamp Modulation Issues¶
VPinSPA outputs modulated RGB lamp values (0-255), but fading behavior is backwards:
- Fade UP is slow (3 frames: 0→75→125→229)
- Fade OFF is instant (229→0 in one frame)
Should be reversed (slow fade out, fast fade in). Attempted fix with custom fading equations to smooth OFF transition, but difficult without breaking RGB behavior.
Cabinet Side Material Fading¶
Cabinet side artwork fading to black when GI off. Issue: MaterialColor sub sets RGB(0,0,0) when lamp off.
Fix - remap intensity range from 0-255 to 20-220:
Sub CabinetSideM(id)
Intensity = LampState(id + 81)
' Remap to prevent full black
Intensity = 20 + (Intensity * 200 / 255)
MaterialColor "CabSides", RGB(Intensity, Intensity, Intensity)
End Sub
Build Guide¶
Frosted Insert Jagged Edge Fix¶
To eliminate jagged edges on round/angled inserts:
- Add blended edge into flasher image itself
- Make cutout slightly larger so insert and flasher overlap
- Set flasher opacity to 99% so light emits through
- Top round insert works best with almost whole image in flasher
Rectangular inserts still show jagged edges with this method.
Insert Lighting with DisableLighting¶
Triangle inserts were too bright at center. Solution:
- Use DisableLighting setup for insert
- Mix DL with Bulb at -0.5 height
- Creates visible tray with haze and ball reflections
- Animated tray lightning works well when ROM outputs modulated values
Different material settings required for same-colored inserts to prevent GI bleed.
Right Ramp Ball Stuck Issue¶
Right ramp (Ramp3) had flat spot causing ball hangs. Multiple fixes attempted:
- Set Ramp3 top height to 81 (from 80)
- Remove AngMomZ hack that was masking issue
- Rework ramp segment points - manually offset vertically creating bumpy surface
- Curved section redesigned to clear plunger lane while using smooth vertical interpolation
Final fix (apophis): Completely reworked curvy ramp segment geometry to allow smooth height points without plunger lane interference.
Impulse Plunger Auto-Fire Bug¶
Plunger auto-firing on pullback (particularly with button, not analog plunger). Issue: impulse plunger switch position and trigger logic.
Fix: Rewrote impulse plunger code to prevent false triggers. Even after fix, occasionally fires on pullback with button (1 in 10).
Software Setup¶
VPinSPA Installation Requirements¶
Ghostbusters requires VPinSPA (not standard VPinMAME):
- Run installer (one-time setup)
- ROM files extract to
C:\Visual Pinball\VPinMAME\spagb100 - Contains
SternGB.dllandimage.bin(not standard .zip ROM format) - Can test ROM launch via VPinSPA test tool before launching table
- Requires Visual Studio 2012 C++ redistributable (x86)
- DirectDraw registry setting may need to be set to 1
ROM version available from Stern Pinball Arcade is 1.15 (not updated 1.17+ code from real machines).
VPinSPA DMD Extension Requirements¶
For altcolor DMD to work with VPinSPA:
- Use Freezy DMDExt 1.71 specifically (not latest) or 1.10.2+
- Place
dmddevice.dllanddmddevice.iniin VPinSPA folder (not main VPinMAME folder) - Altcolor files go in
VPinSPA/altcolor/subfolder - Name files:
pin2dmd.palandpin2dmd.vni
Different VPinSPA.dll builds exist - some work, some don't for flippers.
64-bit VPinSPA Registry Hack¶
Use with Caution
Creates DLL surrogate to bypass WOW64 protections. Potentially unsafe - could cause system instability.
Registry hack to run VPinSPA (32-bit DLL) in 64-bit VPX. Run as Administrator:
reg.exe ADD "HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{F389C8B7-144F-4C63-A2E3-246D168F9D3A}" /f /v AppID /t REG_SZ /d "{F389C8B7-144F-4C63-A2E3-246D168F9D3A}"
reg.exe ADD "HKEY_CLASSES_ROOT\WOW6432Node\AppID\{F389C8B7-144F-4C63-A2E3-246D168F9D3A}"
reg.exe ADD "HKEY_CLASSES_ROOT\WOW6432Node\AppID\{F389C8B7-144F-4C63-A2E3-246D168F9D3A}" /f /v DllSurrogate /t REG_SZ
64-bit VPinSPA Exit Hang Workaround¶
64-bit VPinSPA doesn't exit cleanly (dllhost.exe hangs). Brute force fix:
Sub Table1_Exit:Kill32BitCOMSurrogate():End Sub
Sub Kill32BitCOMSurrogate()
Dim objShell
Set objShell = CreateObject("WScript.Shell")
objShell.Run "taskkill /f /im dllhost.exe", 0, True
Set objShell = Nothing
End Sub
VR¶
Cabinet Side Reflection Technique¶
Brilliant technique for realistic sideblade reflections in VR:
- Place flashers outside cabinet on left/right
- Flashers mirror playfield lighting (inserts, GI, etc.)
- "Hide" primitive with alpha transparency masks flashers from outside view
- Set Hide primitive with high depth bias (150)
- Sideblade material slightly transparent (sides 99 material)
- Reflection moves correctly with head movement in VR
Works in desktop/FS mode too. First time this technique seen in VPX VR.
Troubleshooting¶
VPinSPA Flipper Not Working¶
Flippers not working until FastFlippersEnabled = True in script. Root cause: Different VPinSPA.dll builds in circulation.
Working build characteristics: Flippers work with FastFlippersEnabled = False. Proper delay settings in F11 menu (<3-5ms).
Bass.dll Sound Corruption Bug¶
VPX 10.8 early builds had bass.dll bug corrupting table sounds when saved. Symptoms:
- Flipper volume fluctuates/mutes randomly during play
- Issue permanent once file corrupted
- Cannot be fixed by re-importing sounds
Prevention: Only use VPX 10.8.1347+ (bug fixed). If file corrupted, must rebuild from pre-10.8 version.
Digital Nudge Not Working¶
Digital nudge broken - registers in ROM (tilt warnings) but no physical ball movement. Original code:
Fix: Use standard nudge format:
DoNudge method doesn't work with VPinSPA. Standard Nudge method required for physical ball deflection.
GI String Fading Bug¶
Left sling GI would randomly stay off. Root cause: VPinSPA outputs ROM test mode PF3 as channels 119 AND 123 simultaneously (should be 119 only).
Fix: Move left sling GI to different channel, add switch case logic to prevent fading level from not resetting.
VPinSPA CPU Usage¶
VPinSPA maxing CPU (100%) on older systems (i5-3570K). Issue persists with all table objects removed. Bottleneck: VPinSPA controller itself (not table). SternGB.dll inherently CPU-intensive on older CPUs.
Tip: Disable Windows Defender real-time protection for VPinSPA folder.
Game Knowledge¶
PKE Frenzy Scoring Strategy¶
Highest scoring strategy in Ghostbusters:
- PKE Frenzy mode = massive points
- Spam right ramp (ecto goggles) repeatedly
- Jackpot value increases with each hit
- Can reach billions with good ramp shooting
"Practice that ramp and when you get PKE frenzy boom." 6+ billion scores achievable by stacking PKE frenzies.
Resources¶
- VPinSPA source code: GitHub
- IPDB entry: Ghostbusters