macrosoft3dpinball/CLAUDE.md
type-two b671975742 Vendor SpaceCadetPinball, build for Apple Silicon
Reverse-engineered reimplementation of 3D Pinball for Windows - Space Cadet
from k4zmu2a/SpaceCadetPinball (MIT), upstream cb9b7b8, vendored rather than
submoduled so local patches are just edits.

- CMakeLists: stop hard-setting CMAKE_OSX_ARCHITECTURES so the documented -D
  override works; brew's SDL2 is arm64-only and universal linking failed.
- gitignore original .DAT/.MID assets, which are not ours to redistribute.
- CLAUDE.md: build line, upstream deviation, and where game data goes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 19:05:12 +10:00

1.9 KiB
Raw Blame History

macrosoft3dpinball

3D Pinball for Windows Space Cadet on macOS. Vendored copy of k4zmu2a/SpaceCadetPinball (MIT) at upstream commit cb9b7b8, not a submodule — patch it in place, pull upstream by re-vendoring.

Build (Apple Silicon)

cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=arm64 \
  -DCMAKE_PREFIX_PATH="$(brew --prefix sdl2);$(brew --prefix sdl2_mixer)"
cmake --build build -j8

Binary lands in bin/SpaceCadetPinball. Needs brew install sdl2 sdl2_mixer.

Do not use upstream build-mac-app.sh — it downloads SDL2 .framework DMGs and builds a signed universal .app+.dmg. Unnecessary here; brew SDL2 is already installed.

Gotchas

  • CMakeLists.txt line ~27 upstream hard-set CMAKE_OSX_ARCHITECTURES "arm64;x86_64", which silently overrode the -D flag the README tells you to pass. Universal linking then fails because brew SDL2 is arm64-only. Patched to only set the default when not given on the command line. Re-apply this when re-vendoring upstream.
  • Homebrew resolves sdl2 to sdl2-compat (SDL2 API on top of SDL3). Links and runs fine.
  • Deployment target is 10.11, so the link emits "built for newer version 26.0" warnings against the brew dylibs. Harmless.

Game data (not in this repo)

The engine ships no assets. It needs the original data files, which are Microsoft's and are not redistributable — supply them from your own media (Windows XP or earlier install disc for PINBALL.DAT; the retail Full Tilt! Pinball CD for CADET.DAT). .DAT/.MID are gitignored so they never land in a commit.

Drop them in any of these; first match wins in the order CADET.DAT, PINBALL.DAT, DEMO.DAT:

  • the working directory, or bin/ next to the binary
  • ~/Library/Application Support/SpaceCadetPinball/ ← preferred, keeps the repo clean

Without them the binary exits with "Could not load game data" and lists these paths.