Skip to content
sworrlPublic

About

Fair-Play MP-70 hockey scoreboard automation, Phone Remote PWA, and Liquid Glass OBS/CasparCG broadcast graphics in Rust (Windows + Debian).

Topics

Resources

Stars

5 stars

Watchers

1 watching

Forks

Repository files navigation

SLAP v3.3 (Scoreboard Live Automation Platform)

SLAP v3.3

It's been a while.. our skills have increased since the old Python/Flask build, so we went ahead and rewrote the whole thing in Rust. Claude was NOT used anywhere in version 3.0, 3.1, 3.2, or 3.3.

SLAP pulls live RS-232 serial data out of a Fair-Play MP-70 scoreboard controller and drives HTML broadcast graphics over WebSockets, plus optional CasparCG AMCP output. Everything compiles into one self-contained executable (slap.exe on Windows, slap on Debian/Ubuntu Linux) with all web pages, overlays, team logos, historic game playtests, and sample captures baked right inside. You can run the single binary by itself out of Downloads or /usr/bin/slap, or clone the repo and run SLAP-Setup.bat / ./slap-manage.sh.

Install and Download

Option A: Single Standalone Binary or .deb Package

  1. Grab your platform file from GitHub Releases:
    • Windows: slap.exe (single EXE) or SLAP-v3.3.0-win64.zip.
    • Debian / Ubuntu (amd64): slap_3.3.0_amd64.deb (sudo apt install ./slap_3.3.0_amd64.deb), standalone slap-linux-amd64, or SLAP-v3.3.0-linux-amd64.tar.gz.
  2. Windows double-click: Hides the console window, puts the fiery-puck icon in your system tray, and opens http://localhost:8080 in your browser automatically. Right-click the tray icon anytime to open overlays, toggle the scorebug, start the simulator, or quit.
  3. Debian desktop or terminal: Launches SLAP Scoreboard from the application launcher or slap --no-caspar --open (opens http://127.0.0.1:8080 via xdg-open), and installs a user systemd unit (systemctl --user enable --now slap.service) for headless/bench setups.

Option B: Build, Deploy, Update, and Uninstall From Source (Zero Experience)

Both platforms ship idempotent scripts that install build tools and Rust automatically if missing, run cargo test, build an optimized release binary, install OBS scenes (SLAP_Broadcast.json), set up app shortcuts/launchers, and stay safe to re-run anytime:

Windows (SLAP-Setup.bat / slap-manage.ps1)

Double-click SLAP-Setup.bat in the repo root, or run in PowerShell:

.\slap-manage.ps1 -Action install           # Build from source + install + shortcuts + OBS scene
.\slap-manage.ps1 -Action install -WithOBS  # Same, plus portable OBS Studio 33.0.3 (no admin prompt)
.\slap-manage.ps1 -Action update            # Git pull, re-test, rebuild, redeploy cleanly
.\slap-manage.ps1 -Action package           # Build dist\slap.exe, dist\SLAP-v3.3.0-win64.zip, SHA256SUMS.txt
.\slap-manage.ps1 -Action doctor            # Check Rust, installed exe hash, OBS scene, DB, and COM ports
.\slap-manage.ps1 -Action uninstall         # Remove exe, shortcuts, PATH entry (keeps saved teams DB unless -PurgeData)

Debian / Ubuntu Linux (slap-manage.sh)

chmod +x slap-manage.sh
./slap-manage.sh install             # Auto-installs libudev-dev + Rust if needed, builds, installs ~/.local/bin/slap + .desktop + OBS scene + dialout
./slap-manage.sh install --with-obs  # Same, plus obs-studio via apt
./slap-manage.sh install --service   # Same, plus enables and starts user systemd unit slap.service
./slap-manage.sh update              # Git pull, re-test, rebuild, redeploy cleanly
./slap-manage.sh package             # Build dist/slap-linux-amd64, .tar.gz, slap_3.3.0_amd64.deb, and SHA256SUMS-linux.txt
./slap-manage.sh doctor              # Check OS, Rust, libudev, dialout group, systemd unit, OBS scene, DB, and /dev/ttyUSB*
./slap-manage.sh uninstall           # Remove binary, desktop entries, icon, systemd unit (keeps DB unless --purge-data)

Note on Debian RS-232 permissions: ./slap-manage.sh install adds your user to the dialout group so /dev/ttyUSB0 opens without sudo (log out and back in once if you just joined dialout). OBS Scene Collections install to %APPDATA%\obs-studio\basic\scenes\SLAP_Broadcast.json on Windows and ~/.config/obs-studio/basic/scenes/SLAP_Broadcast.json on Debian.

Live Control Room and Guided Launchpad

SLAP Live Control Room

Double-clicking slap.exe (or using the Desktop / Start Menu shortcuts) opens SLAP in a dedicated local desktop app window (msedge --app=... or Chrome --app=..., falling back to your default browser) and puts a status balloon plus icon in the system tray. If SLAP is already running in the tray, launching it again pops the Control Room window back open instead of failing on port 8080.

The Live Ops tab opens with a Guided Launchpad card confirming SLAP v3.3 IS RUNNING, your local and phone LAN addresses, a 4-step game-day checklist, and one-click buttons to connect RS-232 serial, run the built-in simulator, launch the 1988 Red Wings video playtest, pair a phone remote, or copy the OBS Scorebug URL.

Right below the checklist sits the System Readiness & Auto-Installer scanner (GET /api/system/components), which checks your USB-RS232 adapter (FTDI/CP210x/Prolific/CH340 chipset + Linux dialout permission), OBS Studio, the SLAP_Broadcast.json scene collection, Desktop/App shortcuts, Phone LAN / Private Firewall status, Local App Browser, SQLite DB, and optional CasparCG. Anything SLAP can install or configure itself (portable OBS Studio or apt OBS, the embedded OBS scene collection, desktop shortcuts, FTDI driver helper, dialout group fix, firewall rule) runs automatically in one click (POST /api/system/install).

Phone Remote Control, Device ACL, PWA, and Issue Reporting

SLAP Mobile LAN Remote

Point any phone on the same Wi-Fi network at http://<PC-LAN-IP>:8080/remote (or click Phone Remote in the top bar of the Control Room and scan the offline-generated QR code). Phones visiting the root URL / redirect to /remote automatically unless you tap Open Full Desktop Control Room.

  • Device ACL (Phone Pairing & Revoke): Read-only scoreboard pages (/ and /remote) stay viewable, while all scoreboard, overlay, goal, penalty, team, and installer control routes block unauthenticated LAN devices (HTTP 403) until the phone pairs via QR token, enters the rotating 6-digit PIN shown under Phone Remote, or gets approved in one click by the host operator. Paired devices use an HttpOnly SHA-256 token stored in SQLite (authorized_devices) and can be revoked individually or all at once (Revoke All) from localhost; ACL administration endpoints reject non-localhost callers even from paired phones.
  • PWA + Shake-to-Report + Desktop Issue Reporter: /remote registers /sw.js and /manifest.json so phones can install it via Install Phone App (beforeinstallprompt or iOS Add to Home Screen). Shaking your phone (or tapping BUG on mobile / Report Issue in the desktop top bar / tray menu) auto-captures a PNG screenshot plus full system diagnostics (SLAP version, component checks, live MP-70 game state, raw packet hex, and browser console errors), saves the bundle locally under issue_reports/, and submits to GitHub Issues via gh when signed in or opens a pre-filled GitHub Issue link (POST /api/system/report-issue).
  • SCORE Deck: Big team-colored +1 HOME GOAL and +1 AWAY GOAL pads, scorer dropdowns synced from the active roster, +1 / -1 shots and goal corrections, Scorebug ON AIR rocker, arena horn/stinger/buzzer bar, and 2m / 4m / 5m quick penalty buttons.
  • GFX Deck: Two-column switcher keys for Goal Fanfare, Power Play bugs, Penalty Box, Instant Replay, Game Intro, Period Summary, Three Stars, Player Card, Ticker, and CLEAR ALL OVERLAYS.
  • CLOCK Deck: Period selector (1, 2, 3, OT, SO), clock presets, manual MM:SS entry, simulator start/stop, and capture replay controls.
  • TEAMS Deck: One-tap HOME / AWAY switching from your saved SQLite team database, plus Add to Home Screen support via /manifest.json.
  • Windows Firewall: On first launch over Wi-Fi, allow SLAP on Private networks in Windows Defender Firewall so phones on the LAN can reach port 8080.

Archive.org Video Overlay Playtest

SLAP Video Overlay Playtest

Open the Video Playtest tab (or click Playtest: 1988 Red Wings on Live Ops) to test every overlay directly on top of real Archive.org hockey footage out of the box:

  • 1988 Red Wings vs Blues (Game 5, 3rd Period): April 27, 1988 at Joe Louis Arena (WKBD TV-50 broadcast, DET 4 - STL 3), with synced chapter jumps to Bozek's 3-2 goal, Chabot's 3-3 tie, Tim Higgins's 2:25 game winner, and the final minute tenths countdown.
  • 1980 Miracle on Ice (USA vs USSR): February 22, 1980 Lake Placid ABC broadcast (USA 4 - URS 3).

Loading a playtest automatically applies team colors, crests, and real rosters, then feeds generated 11-byte C and 57-byte H MP-70 frames synced to video playback time (-5s/+5s offset nudge included).

Reusable Team and Roster Database

Under Teams & Database, teams and rosters persist in SQLite (%LOCALAPPDATA%\slap\slap.db on Windows or ~/.local/share/slap/slap.db on Debian, inside saved_teams and saved_players). Save any club once with its full name, 3-letter tag, crest upload, primary/secondary colors, and jersey roster, then click Set Home or Set Away before puck drop. Goal splashes, penalty boxes, lower thirds, and three stars pull those saved player names, logos, and colors automatically.

Broadcast Graphics

Scorebug

SLAP Live Scorebug

Shows period, final-minute tenths clock, team crests and glass color fills, scores, shots on goal, and an advantaged-team power-play pill listing penalized jersey numbers.

Goal Celebration Splash

SLAP Goal Celebration Splash

Fires automatically when a score increases from live MP-70 packets, capture replay, video playtest, or manual controls, tinted dynamically to the scoring club's colors with Canvas sparks/bubbles, spinning beacon rays, scorer card, and optional WebAudio goal horn.

Overlay Manager

SLAP Overlays Tab

Protocol Lab

SLAP Protocol Lab

Shows real-time frames-per-second sparkline, raw hex and ASCII off the wire, decoded frame history, .bin raw stream recording, and a color-coded byte-by-byte breakdown of both C clock frames and H hockey frames.

Fair-Play MP-70 Serial Protocol Breakdown

Physical Interface and Serial Settings

A Fair-Play MP-70 / MP-50 console outputs live data on two separate connectors:

  1. Scoreboard Driver Jacks (1/4-inch): Differential pulse-width BCD signals for the physical arena digits.
  2. RS-232 Telemetry Port (DB-9 Male): Continuous, unprompted ASCII packets framed with STX and ETX. This is the port SLAP reads through a standard null-modem RS-232 to USB adapter.
Parameter Setting Notes
Baud rate 9600 (standard) Older configurations occasionally run 19200
Framing 8N1 (8 data, no parity, 1 stop) No hardware or software flow control
Console setting ProLine (VIDEO CHAR? = NO) Use YES only for plain-text VCG fallback
Packet cadence ~20 to 25 frames/sec combined Controller broadcasts alternating H and C frames continuously

Framing and Sport Tags

Every ProLine packet follows one wire envelope:

0x02 (STX) + <Tag Byte> + <Fixed ASCII Payload> + 0x03 (ETX)

SLAP's stream extractor handles partial USB reads, garbage noise between packets, and nested-STX resync (if a truncated packet starts a new 0x02 before the previous 0x03, the buffer snaps directly to the newer STX). In hockey mode two packet tags appear on the wire:

Tag (packet[1]) Purpose Total Wire Length Notes
C (0x43) Game Clock and Period 11 bytes Shared across all MP-70 firmware revisions tested
H (0x48) Hockey Scores, SOG, Penalties 55 bytes or 57 bytes Depends on console firmware (Ver. 3.08d vs Ver. 3.08e+)

(Note: Trans-Lux's official MP70-DB9_protocol.pdf also documents tags A/T Baseball, B/S Basketball, F Football, L Lacrosse, R Soccer, V/Y Volleyball, and W/G Wrestling.)

Game Clock Frame (C Frame, 11 Bytes Exact)

Identical across Trans-Lux MP70-DB9_protocol.pdf Table 9, the Feb 16, 2026 rink capture, and the Sept 3, 2026 rink capture:

Offset Len Field Format & Wire Behavior
[0] 1 STX Always 0x02
[1] 1 Frame Type 'C' (0x43)
[2..4] 2 Minutes Right-justified ASCII ('10', ' 9', or ' ' under 1 min)
[4..6] 2 Seconds '00' through '59'
[6] 1 Tenths Space ' ' when clock >= 1:00; '0'-'9' under 1:00
[7] 1 Period '1', '2', '3', 'O' (Overtime), etc.
[8..10] 2 Shot Clock / Aux Unused in hockey ('60' on Feb unit, '10' on Sept unit)
[10] 1 ETX Always 0x03

Wire examples decoded:

  • 02 43 31 30 30 30 20 31 31 30 03 ("C1000 110"): 10:00, Period 1, SC 10
  • 02 43 20 39 35 39 20 31 31 30 03 ("C 959 110"): 9:59, Period 1, SC 10
  • 02 43 20 20 34 35 33 32 31 30 03 ("C 453210"): 0:45.3 (tenths active), Period 2
  • 02 43 20 37 35 36 20 32 36 30 03 ("C 756 260"): 7:56, Period 2, SC 60

Critical detail: Hockey H frames do not contain the period byte. SLAP reads Period exclusively from C frame byte [7].

Hockey State Frame (H Frame): 55-Byte vs 57-Byte Comparison

Comparing the official vendor PDF (Ver. 3.08d Table 10) and Feb 2026 capture against the Sept 2026 live rink unit (Ver. 3.08e+ ProLine) shows mirrored Home and Visitor halves (26 bytes per half vs 27 bytes per half). The 57-byte unit appends 1 extra byte ('2') at the end of each side's half ([28] Home, [55] Visitor):

Field Width 55B Home 55B Visitor 57B Home 57B Visitor Encoding Details
Framing / Tag 2 [0..2] [0..2] [0..2] [0..2] 0x02 (STX), 'H' (0x48)
Team Name 10 [2..12] [28..38] [2..12] [29..39] Blank spaces unless programmed on console
Score 2 [12..14] [38..40] [12..14] [39..41] Right-justified (' 0'..'27'..'99')
Shots on Goal 2 [14..16] [40..42] [14..16] [41..43] Spaces if console operator leaves SOG blank
Penalty 1 Player # 2 [16..18] [42..44] [16..18] [43..45] Right-justified jersey ('79', ' 9')
Penalty 1 Minutes 2 [18..20] [44..46] [18..20] [45..47] Space-padded (' 0', ' 1', '10')
Penalty 1 Seconds 2 [20..22] [46..48] [20..22] [47..49] Zero-padded ('00'..'59')
Penalty 2 Player # 2 [22..24] [48..50] [22..24] [49..51] Touches Pen 1 Sec with NO delimiter
Penalty 2 Minutes 2 [24..26] [50..52] [24..26] [51..53] Space-padded
Penalty 2 Seconds 2 [26..28] [52..54] [26..28] [53..55] Zero-padded ('00'..'59')
Extra Flag Byte 1 none none [28] [55] Constant '2' (0x32) on Sept 2026 unit
ETX 1 [54] [54] [56] [56] 0x03

Decoding Rules and Real Hardware Quirks Verified on the Wire

  • No Whitespace Splitting: When both penalty slots on one side are active, Pen 1 Seconds ([20..22]) runs straight into Pen 2 Player # ([22..24]) with zero delimiter byte. Always slice by exact offset, never split_whitespace().
  • 10-Minute Misconducts: Penalty time is 2B space-padded minutes + 2B seconds (' 100' = 1:00, '1000' = 10:00). Both minute characters must be parsed cleanly.
  • Uncompacted Slot 2 Persistence: When Penalty Slot 1 expires while Slot 2 is still counting down, the MP-70 clears Slot 1 ([16..22]) to spaces and leaves Slot 2 sitting in [22..28] rather than shifting it up.
  • Blank SOG Preservation: Many rinks do not wire or key in Shots on Goal on the console, leaving bytes [14..16] and [41..43] as spaces (0x20). SLAP preserves manual SOG clicks in the WebUI whenever console SOG bytes are blank instead of overwriting them with 0.
  • Two-Digit Scores: Verified up to 27 and 13 ("27", "13" across both digits) on live capture frames.

Real 57-Byte Captured Frame Breakdown

Sample ASCII from tests/fixtures/mp70_57byte_live.log (Home 27, Away 13, Home Slot 1 #93 1:07, Home Slot 2 #24 1:30):

[0..2]   0x02 'H'          Frame start + Hockey tag
[2..12]  "          "      Home Name (blank)
[12..14] "27"              Home Score = 27
[14..16] "  "              Home SOG (blank -> preserve WebUI SOG)
[16..22] "93 107"          Home Pen 1: #93, " 1" min "07" sec -> 1:07
[22..28] "24 130"          Home Pen 2: #24, " 1" min "30" sec -> 1:30 (no delimiter between "07" and "24")
[28]     "2"               Home Extra Byte
[29..39] "          "      Visitor Name (blank)
[39..41] "13"              Visitor Score = 13
[41..55] "              "  Visitor SOG + Pen 1 + Pen 2 (blank)
[55]     "2"               Visitor Extra Byte
[56]     0x03              ETX

Auto-Detection vs Manual Protocol Mode

By default (--protocol auto), MP70Parser inspects frame length and STX/ETX bounds (57B vs 55B vs >=80B legacy) and locks onto the detected strategy after 3 matching H packets. Rink operators never need to memorize a power-on key combination to check controller firmware. If you want to force a layout on the bench, pick mp70_hockey_57, mp70_hockey_55, mp70_legacy_80, or ascii in the Protocol Variant Selector dropdown or --protocol.

Full notes and the original vendor manual live in docs/PROTOCOL_NOTES.md and docs/MP70-DB9_protocol.pdf.

Device Dataflow, Messages, and Exact Timing

Every input packet and operator tap follows a deterministic path through SLAP (src/core/app_state.rs, src/output/caspar.rs, src/web/mod.rs):

Source -> Destination Transport / Protocol Exact Payload / Command Timing & Trigger Condition
MP-70 Console (DB-9) -> SLAP RS-232 (9600 8N1), TX-only wire Alternating 11B C and 55B/57B H frames Continuous ~20 to 25 frames/sec
SLAP -> /ws (On Connect) WebSocket JSON state_update, teams_update, roster_update Sent immediately once per client handshake
SLAP -> /ws (On C Frame) WebSocket JSON state_update (clock, period, clock tenths, shot clock), serial_frame Sent only when decoded time/period/shot-clock changes (~1 Hz >= 1:00; ~10 Hz < 1:00)
SLAP -> /ws (On H Frame) WebSocket JSON state_update, penalties (with roster names), shots (if non-blank), goal (if score increased) ~10 to 12 H updates/sec during game play
Operator (/remote, Control Room) -> SLAP -> /ws HTTP POST -> WS broadcast /api/goal, /api/state, /api/penalty, /api/bug/*, /api/horn, /api/overlay/*, /api/team-db/{id}/apply Immediate (< 5 ms LAN fan-out to all overlays, desktop tabs, and phones)
SLAP -> CasparCG (127.0.0.1:5250) TCP AMCP text commands CG <ch>-<layer> UPDATE 1 "<json>" (every H frame); INVOKE 1 "goal:HOME|AWAY" (on goal); INVOKE 1 "show|hide" Real-time on each H frame, goal event, or bug toggle
SLAP -> Local Storage SQLite + raw file stream slap.db (games, game_events, saved_teams, saved_players, authorized_devices) + logs/serial_recording_*.bin Explicit game/team/device actions or continuous raw byte tap when Record is active

Live Possession and Machine Vision Auto-Attribution API

Because an MP-70 scoreboard only emits team totals and never jersey numbers for goals, SLAP runs an in-memory Possession Tracker (ttl_secs default 15s, configurable 10s/15s/25s) fed in real time by 1-tap jersey chips on both / and /remote OR by an external computer-vision / rink-camera pipeline:

POST /api/possession
Content-Type: application/json
X-SLAP-Token: <paired device token when calling over LAN>

{
  "team": "home",
  "number": "19",
  "name": "S. YZERMAN",
  "source": "vision",
  "confidence": 0.94
}
  • When the MP-70 H packet increments the Home or Away score while that team's last touch is still fresh (<= ttl_secs), SLAP automatically fires the Goal Celebration Splash with that carrier's jersey/name plus up to 2 recent different-player touches from the same team as primary/secondary assists.
  • Low-confidence vision updates below min_confidence (0.50 default) are ignored automatically so noisy detections never overwrite a human spotter tap, and stale/cleared possession falls back cleanly to #00 Team Goal.

Operator WebSocket & REST Message Matrix

  • state_update: Master JSON snapshot holding game (scores, SOG, clock, clock_tenths, period, active penalties, detected protocol_variant) plus bug_visible, serial_connected, replay_active, simulator_running, and caspar_connected. Every overlay (/scorebug, /overlay/penalty, /overlay/shots) and control surface (/, /remote) stays synced from this single event.
  • goal: Carries team (home/away), team_name, logo, primary_color, secondary_color, scorer number and name, assists, period, time, and duration. Fires automatically on MP-70 score jumps (with a default #00 team goal) or immediately from the desktop / phone +1 GOAL pad with the selected roster player.
  • penalties & shots: Broadcast after H frames (and manual overrides) so /overlay/penalty and /overlay/shots update without waiting for page reloads. When a console leaves SOG bytes blank (0x20), SLAP keeps the operator's tapped SOG count intact instead of zeroing it out.
  • horn: { "kind": "goal" | "pp" | "buzzer" }, letting a Control Room or phone tap trigger audio stingers across connected browser tabs when SFX is enabled.

Connection Methods and Inline MITM Analysis

Ways to Wire and Control SLAP

  1. Direct USB-to-RS-232 Null-Modem (Standard Rink Setup): MP-70 DB-9 -> null-modem adapter -> USB-serial cable -> Windows laptop or Debian mini PC running SLAP (COM3 / /dev/ttyUSB0).
  2. Ethernet / Cat6 Serial Server (ser2net, Moxa, StarTech): Plug a serial-to-Ethernet adapter at the scorer's table (ser2net on a Raspberry Pi or Debian box is built right into Linux) so a broadcast workstation or OBS rig up in the press box reads the scoreboard over rink Ethernet/Wi-Fi.
  3. Wi-Fi Microcontroller Bridge (ESP32 + MAX3232): Battery/USB-powered wireless RS-232 sender taped behind the scorer console when running cables across a rink concourse is not allowed.
  4. Phone / Tablet LAN Remote (/remote): Parent volunteer stands at glass level or stays in the scorekeeper booth running goals, scorers, shots, overlays, and horns from their phone over rink Wi-Fi while the main laptop runs OBS cleanly backstage.
  5. OBS Studio Scene & Relay Triggers (obs-websocket v5, default port 4455): SLAP overlays run as clean 1920x1080 Browser Sources in OBS today; adding outbound obs-websocket automation lets a goal event auto-save an OBS Replay Buffer highlight clip.
  6. Multi-Rink / Press-Box Hubs: Two-to-four small Debian SBCs (one per rink sheet) pushing WebSocket/HTTP telemetry to one central broadcast desk or tournament lobby wall display.

Can You MITM the MP-70 / SLAP System? Does It Make Sense?

Yes, inline serial MITM (man-in-the-middle pass-through on the RS-232 telemetry line) makes real engineering sense in four specific scenarios, with one hard hardware limit:

Scenario How Inline MITM Works Verdict
1. Active Tap / Splitter Next to LiveBarn or Arena Gear Passive DB-9 Y-cables drag down RS-232 voltage levels or risk grounding issues when two receivers share one MP-70 DB-9 jack. Reading TX on Port A and actively re-transmitting clean frames out Port B drives both SLAP and a second system safely. Makes a lot of sense
2. Firmware Dialect Bridge (57B <-> 55B) Newer Ver. 3.08e+ consoles output 57-byte H packets that break older 55-byte receivers (which expect no extra '2' bytes). An inline pass-through translates live 57B frames into exact 55B frames on TX Port B. High value for legacy displays
3. Enriching Blank Console Fields Downstream Most rinks leave team names and Shots on Goal blank on the MP-70 console (spaces). A MITM node can splice team names and phone-tapped SOG into outbound H frames so downstream TV hardware gets complete stats. Practical on mixed rigs
4. Bench Hardware Emulator Playing a real capture (.log / .bin) out a physical TX serial port at 9600 8N1 lets you test hardware scorebug boxes or external CG gear on your workbench without an actual MP-70. Great for testing
Controlling the Arena Wall Board / Clock? The DB-9 serial port on an MP-70 is telemetry output. The overhead arena scoreboard and game horn run off the separate 1/4-inch differential BCD jacks. Cannot MITM wall board via DB-9

Real-World Use Cases

  • Youth & Minor Hockey Parent Streams (Phone Remote + OBS): One parent sets up a tripod/laptop on private Wi-Fi running OBS with /scorebug + /overlay/goal, scans the /remote QR code on their phone, and taps scorer names, shots, and goal splashes from behind the glass without touching a mouse.
  • High School, Junior & College Press-Box Broadcasts: Direct RS-232 capture over 9600 8N1 plus CasparCG TCP 5250 AMCP output for live SDI key/fill switchers (11B C tenths accuracy under 1:00 and automatic 27-score support).
  • Arena Lobby & Concourse Scoreboard TVs: Point any kiosk browser or Raspberry Pi Chromium kiosk mode at /scorebug or /overlay/shots over LAN to mirror rink scores in the lobby.
  • Dual-System Rink Coexistence: Feed OBS overlays locally while passing RS-232 telemetry cleanly alongside existing rink cameras or building TVs.
  • Pre-Game Bench Testing & Training: Train new volunteers at home using Video Playtest (1988 Red Wings or 1980 Miracle on Ice on Archive.org) or the tests/fixtures/ replay deck before game day.
  • Team & Season Record Keeping: Keep reusable team colors, crests, rosters, and game event logs (goals, penalties, season leaders) inside one portable SQLite file (slap.db).

Quick Start (CLI Flags)

Flag Default Description
-c, --config <FILE> embedded default.json JSON config override
-p, --port <PORT> 8080 Web server port
--host <HOST> 0.0.0.0 Web server bind address
--serial <PORT> COM3 / /dev/ttyUSB0 RS-232 serial device
--baud <RATE> 9600 Serial baud rate
--protocol <MODE> auto auto, mp70_hockey_57, mp70_hockey_55, mp70_legacy_80, ascii
--replay <FILE> none Replay a .log hex dump or raw .bin capture on startup
--replay-speed <MULT> 1.0 Initial replay playback speed multiplier
-s, --simulate false Emit synthetic MP-70 C and 57-byte H packets on startup
--no-caspar false Skip CasparCG AMCP socket connection
--tray auto on double-click Hide console window and run in system tray mode
--no-tray false Disable Windows tray icon (headless servers)
--open / --no-open auto on double-click Force or suppress auto-opening http://127.0.0.1:<port>
-d, --debug false Verbose debug logging

Examples:

# Standalone single-EXE built-in simulator + auto browser:
.\slap.exe --no-caspar --simulate --open

# Replay embedded or local 57-byte capture fixture:
.\slap.exe --no-caspar --replay mp70_57byte_live.log

# Rink production over RS-232:
.\slap.exe --serial COM3 --baud 9600 --protocol auto --tray

Broadcast Overlay URLs (OBS / vMix)

Point transparent Browser Sources (1920x1080) at http://localhost:8080 (or import config/SLAP_OBS_SceneCollection.json in OBS via Scene Collection > Import):

Overlay URL Purpose
Main Scorebug /scorebug (or /overlay) Persistent clock, score, SOG, PP pill
Goal Splash /overlay/goal Team-colored particle burst, rays, scorer banner
Power Play /overlay/powerplay Team-colored man-advantage timer card
Penalty Box /overlay/penalty Active home and away penalty slots with player names
Shots on Goal /overlay/shots Compact side-by-side SOG counter
Player Card /overlay/player Player lower third with logo and stats
Goalie Card /overlay/goalie Goalie save percentage lower third
Game Intro /overlay/intro Pre-game matchup card
Period Summary /overlay/period Intermission and final score summary card
Three Stars /overlay/stars End-of-game three stars card
Replay Bug /overlay/replay Top-right instant replay pill
Ticker /overlay/ticker Bottom league/arena news crawl
Video Playtest /playtest Full-window Archive.org composite overlay player
Phone Remote /remote (or /m) Handheld mobile LAN remote switcher & score pad

Supported & Integratable Scoreboards (>= 70% Decode Accuracy Tracker)

SLAP includes an embedded controller database (config/scoreboard_catalog.json, served at GET /api/scoreboards) that prepopulates the Scoreboard Controller dropdown in Live Ops and Protocol Lab. Full compatibility details, wiring specs, and status live in docs/SUPPORTED_SCOREBOARDS.md.

Status Controllers Est. Accuracy SLAP Integration
VERIFIED Fair-Play MP-70 (57B Ver. 3.08e+, 55B Ver. 3.08d, Legacy >=80B) 95% - 100% Native CI-verified decoders
BETA DECODER Stramatel 54B Hockey (19200 8N1), Daktronics All Sport 5000 / CG / 3000 RTD (19200/9600 8N1) 85% - 90% Built-in Rust frame decoders (stramatel_hockey_54, daktronics_rtd)
PROTOCOL READY Sportzcast ScoreLink/ScoreBOT, Fair-Play MP-80 / MP-75 / MP-73 / MP-50 92% - 95% Standard UART/MP-70 stream mode
CAPTURE NEEDED OES ISC9000/855 (Std), Swiss Timing OSM6, Bodet Scorepad, Colorado Sys 6, Nevco VSBI, All American, Electro-Mech, Eversan, White Way, Favero / Nautronic 70% - 82% Ready for 30-60s .bin capture mapping
BRIDGE REQUIRED Nevco MPC-5/7 Direct BNC Coax (~260 kHz PWM) 85% w/ bridge Needs VSBI or MCU PWM->UART bridge (xyk2/nevco-mpc5-signal-decoder)

Request Support & Submit Other Scoreboard Captures

Need SLAP to support a different scoreboard controller (Daktronics All Sport, OES ISC, Nevco, another Fair-Play firmware variant, White Way, Electro-Mech, Varsity, etc.)?

  1. In SLAP Desktop Control Room: Open Protocol Lab -> Request Support & Submit Other Scoreboard Captures, click Start Raw .bin Capture, run 30 to 60 seconds of activity on your console (clock start/stop, Home +1, Away +1, Period change, SOG, Penalty # & time, Horn), click Stop Recording, fill out the manufacturer/model + timeline notes, and click Analyze & Submit Capture. SLAP computes instant wire byte forensics (SOH/STX/ETX/EOT/CR/LF counts, frame cadence hints, hex preview), archives the capture locally, and creates or pre-fills a GitHub scoreboard-support issue.
  2. Directly on GitHub: Open the Submit Scoreboard Capture / Request Controller Support form to request support or drag-and-drop your .bin, .log, .txt, or .zip capture file.

Running Tests

cargo test

tests/mp70_integration.rs verifies:

  • Real 57-byte live capture decoding (tests/fixtures/mp70_57byte_live.log: Home 27 vs Visitor 13, uncompacted Slot 2 penalties #24 and #54, auto-detect lock).
  • Verified 55-byte Ver. 3.08d PDF / Feb fixture decoding (tests/fixtures/mp70_55byte_live.log: 3-5, Period 3, Shot Clock 60).
  • Full 9,227-frame Thursday capture verification (6,591 C, 2,636 H, 0 invalid), tenths clock formatting, nested-STX stream recovery, and .bin action seeking.
  • SQLite Database game lifecycle and reusable saved_teams / saved_players CRUD.
  • Historic Archive.org Video Playtest MP-70 packet sync (DET 4 - STL 3 at Tim Higgins 2090.0s + tenths clock at 2290.5s).
  • Standalone embedded-asset serving with an empty root_dir (/ through /docs/file/PROTOCOL_NOTES.md and embedded fixture replay).

Troubleshooting

No frames arriving from serial port

  • Confirm a null-modem RS-232 adapter is between the MP-70 DB-9 port and your USB-serial cable.
  • Check baud rate is 9600 (8N1, no flow control).
  • Open Protocol Lab and watch Latest Raw Hex Packet to confirm bytes are arriving and verify packet length.

Windows SmartScreen prompts on slap.exe

  • slap.exe includes full file version metadata and its icon resource, though it is not Authenticode/VeriSign signed. Click More info > Run anyway once, or run SLAP-Setup.bat to compile locally from source.

CASPAR: OFF stays gray

  • SLAP works standalone with OBS Browser Sources when CasparCG is not running. Start with --no-caspar to skip startup AMCP connection attempts.

License

GNU General Public License v3.0. See LICENSE.

About

Fair-Play MP-70 hockey scoreboard automation, Phone Remote PWA, and Liquid Glass OBS/CasparCG broadcast graphics in Rust (Windows + Debian).

Topics

Resources

Stars

5 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages