Skip to content

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:

  1. Add blended edge into flasher image itself
  2. Make cutout slightly larger so insert and flasher overlap
  3. Set flasher opacity to 99% so light emits through
  4. 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:

  1. Use DisableLighting setup for insert
  2. Mix DL with Bulb at -0.5 height
  3. Creates visible tray with haze and ball reflections
  4. 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:

  1. Set Ramp3 top height to 81 (from 80)
  2. Remove AngMomZ hack that was masking issue
  3. Rework ramp segment points - manually offset vertically creating bumpy surface
  4. 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):

  1. Run installer (one-time setup)
  2. ROM files extract to C:\Visual Pinball\VPinMAME\spagb100
  3. Contains SternGB.dll and image.bin (not standard .zip ROM format)
  4. Can test ROM launch via VPinSPA test tool before launching table
  5. Requires Visual Studio 2012 C++ redistributable (x86)
  6. 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:

  1. Use Freezy DMDExt 1.71 specifically (not latest) or 1.10.2+
  2. Place dmddevice.dll and dmddevice.ini in VPinSPA folder (not main VPinMAME folder)
  3. Altcolor files go in VPinSPA/altcolor/ subfolder
  4. Name files: pin2dmd.pal and pin2dmd.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:

  1. Place flashers outside cabinet on left/right
  2. Flashers mirror playfield lighting (inserts, GI, etc.)
  3. "Hide" primitive with alpha transparency masks flashers from outside view
  4. Set Hide primitive with high depth bias (150)
  5. Sideblade material slightly transparent (sides 99 material)
  6. 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:

If keycode = LeftTiltKey Then vpmNudge.DoNudge 75, 2

Fix: Use standard nudge format:

If keycode = LeftTiltKey Then Nudge 75, 2

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