Virtual Driver

Virtual Driver

The virtual driver simulates every pinball hardware device in memory. It is a complete drop-in replacement for a hardware driver so you can develop and test .cade configurations on any workstation.

Configuration

The virtual driver is configured in a platform block within your Cade configuration file. All properties are optional and control the maximum number of each device type.

platform "virtual" "sim" {
  switch_count = 64
  coil_count   = 32
  light_count  = 128
  servo_count  = 8
}

Properties

PropertyTypeRequiredDefaultDescription
switch_countintNo64Number of virtual switch inputs
coil_countintNo32Number of virtual coil outputs
light_countintNo128Number of virtual light outputs
servo_countintNo8Number of virtual servo outputs

Simulated Capabilities

The virtual driver simulates every capability the runtime exposes:

Platform Capabilities

CapabilityValue
Transportvirtual
RGB lightsYes
PWM coilsYes
Firmware flippersYes
Firmware autofireYes
Address formatnumeric

Simulated Behavior

The virtual driver maintains in-memory state for each device type:

Event Injection

Tests and tooling can inject switch events directly. Injected events flow through the same path as real hardware inputs, so scoring and game logic react identically.

Use Cases

Diagnostics

The virtual driver reports the same diagnostics as hardware drivers: