Prime Target compatibility port on Aleph One, with extracted scenario data and headless regressions.
  • C++ 58.9%
  • C 35.9%
  • HTML 2.6%
  • Python 0.6%
  • Makefile 0.4%
  • Other 1.3%
Find a file
Quinn Ebert 6eb453a77e
All checks were successful
Windows Release / windows-release (push) Successful in 12m15s
Handle SDL screenshot sharing locks in relocated startup checks
2026-10-16 14:15:44 -04:00
.forgejo/workflows Build PT static releases on the shared Windows 11 UCRT64 runner 2026-10-16 13:35:19 -04:00
AlephOne Handle SDL screenshot sharing locks in relocated startup checks 2026-10-16 14:15:44 -04:00
PrimeTargetData Import Prime Target engine port, scenario data, tools, and project README 2026-10-10 18:02:43 -04:00
.gitattributes Import Prime Target engine port, scenario data, tools, and project README 2026-10-10 18:02:43 -04:00
.gitignore Build PT static releases on the shared Windows 11 UCRT64 runner 2026-10-16 13:35:19 -04:00
README.md Port PT cheat modifiers and SDL capture-state checks to Windows 2026-10-16 13:50:21 -04:00
WINDOWS_RUNNER.md Build PT static releases on the shared Windows 11 UCRT64 runner 2026-10-16 13:35:19 -04:00

Prime Target

A Prime Target compatibility port built on Aleph One. The modified engine runs the extracted Macintosh game resources directly; it does not launch the original Prime Target executable.

The current development target is native macOS on Apple Silicon. The source includes Prime Target resource loading, movement and collision, weapons and projectiles, actor behavior, scenery and doors, evidence and access controls, interlevel transfers, saves, interface artwork, sound, and movie playback. These implemented systems do not establish a complete campaign playthrough or verified multiplayer compatibility.

Repository layout

Path Contents
AlephOne/ Modified Aleph One engine and its preserved upstream history
PrimeTargetData/ Extracted scenario, resource-fork sidecars, UI assets, and movies
AlephOne/tools/pt_reverse/ Headless regressions, packaging, movie conversion, and Ghidra helpers
AlephOne/data/PrimeTargetUI/ Engine-side Prime Target interface assets

Local .app bundles, generated build files, and test executables are ignored. The repository root owns both the engine and scenario; AlephOne is a source subdirectory, not a separate repository or submodule. The inherited Aleph One README remains in AlephOne/README.md.

Clone and run

git clone https://forgejo.synchresis.net/quinn/PT.git
cd PT

The Forgejo repository is public and can be cloned without signing in. No Marathon scenario submodules are needed. After building the engine:

./AlephOne/Source_Files/alephone ./PrimeTargetData

Keep the scenario together. Map.rsrc contains level resources and Images.rsrc contains interface artwork; the other .rsrc files preserve classic Macintosh resource forks as ordinary Git files. Copying only the data forks breaks startup or removes game resources. Do not discard zero-byte Images: its payload lives in the adjacent sidecar.

The engine detects Prime Target from Data Model or the scenario path. Keep the PrimeTargetData directory name when copying the scenario. New profiles use WASD, Space to jump, C to crouch, Tab to interact, M for the map, Ctrl to run, and Shift to strafe. Both mouse axes default to 7864/65536 (11.99951171875%). Explicit retail presets retain their original bindings; custom profiles retain their saved mappings. Controls can be changed in preferences. See the scenario notes for more detail.

Build on macOS / Apple Silicon

Use the Xcode command-line tools, a C++17 compiler, and Homebrew. The Autotools build is the development path for this port. The inherited Xcode project remains an upstream reference. The Windows Release build uses native MSYS2 UCRT64 Autotools.

Install the build tools and libraries:

xcode-select --install  # Only if command-line tools are not installed.
brew install autoconf automake autoconf-archive libtool pkgconf \
  boost asio sdl2 sdl2_image sdl2_ttf libsndfile openal-soft

Generate the build system and compile from the engine directory:

cd AlephOne
autoreconf -fi
pt_brew_prefix="$(brew --prefix)"
pt_openal_prefix="$(brew --prefix openal-soft)"
PKG_CONFIG_PATH="$pt_openal_prefix/lib/pkgconfig:$pt_brew_prefix/lib/pkgconfig" \
  ./configure --enable-opengl --without-catch2 \
  CPPFLAGS="-I$pt_brew_prefix/include -I$pt_openal_prefix/include" \
  LDFLAGS="-L$pt_brew_prefix/lib -L$pt_openal_prefix/lib" \
  CXX=clang++ CXXFLAGS=-std=c++17
make -j"$(sysctl -n hw.logicalcpu)"
./Source_Files/alephone ../PrimeTargetData

Catch2 is optional and supports the inherited replay-test executable; it is not required by the Python Prime Target regressions. Optional upstream libraries enable additional export/network features; see the inherited README and ./configure --help. The engine includes a pl_mpeg decoder for the converted Prime Target movies, so those .mpg files do not require ffmpeg at runtime.

Linux builds of this port are not verified. The current Autotools source list includes macOS Objective-C++ platform helpers; use the native Visual Studio path below for Windows.

Windows 11 AMD64 Release

Windows Release CI runs through Forgejo Actions on pushes to main, windows-v* tags, and manual dispatch. Toriel is an instance-wide Windows 11 AMD64 host runner with one build slot. It offers windows-11-amd64, windows-11, windows-amd64, windows-x64, and windows; windows-2022 is retained as a compatibility label for older jobs. All repositories on this Forgejo instance may use these labels.

CI prepares native MSYS2 UCRT64 and builds static libraries plus the MinGW C++ runtime into the executable. The initial release uses software rendering; OpenGL, film export, HTTP downloads, UPnP, native file dialogs, and ZIP-scenario loading are disabled. Prime Target's built-in MPEG playback remains available.

To run the same build in a UCRT64 shell with the workflow's packages installed:

bash AlephOne/tools/pt_reverse/build_windows_release.sh

Or use ./AlephOne/tools/pt_reverse/build_windows_release.ps1 in PowerShell with MSYS2 at C:\msys64. The output is dist/Prime-Target-Windows-x64-Release.zip, plus its SHA-256 checksum. Unpack the entire archive and double-click Prime Target/Prime Target.exe. Retail cheat sequences use Ctrl+Shift on Windows (Command+Shift on macOS). The archive includes all scenario files, .rsrc sidecars, UI assets, fonts, movies, and library license notices. Windows system DLLs remain OS dependencies; third-party runtime DLLs are rejected by packaging.

Before upload, CI inspects standard and delay-loaded PE imports, hashes every file after ZIP extraction, launches all forty levels with no data argument and an unrelated working directory, and runs movement/save/load/transfer, control-profile, and non-silent audio checks. The game processes receive only Windows system directories on PATH, excluding the development toolchain. dist/validation/ contains the import report, file manifest, logs and frames. Passing windows-v* tag builds publish a Forgejo Release only after the runtime checks succeed and all assets upload. These headless checks do not certify physical speaker output, interactive GPU behavior, or a complete campaign playthrough on Windows.

See Windows runner maintenance for the host setup.

Headless regressions

Run these from the repository root with Python 3 and a built engine. The runners use SDL dummy drivers and isolated preferences/save directories, so they do not open a desktop game window. Their Python imports use the standard library.

pt_checks="$(mktemp -d /tmp/prime-target-checks.XXXXXX)"
python3 AlephOne/tools/pt_reverse/test_prime_target.py \
  --binary AlephOne/Source_Files/alephone --data PrimeTargetData \
  --output "$pt_checks/gameplay"
python3 AlephOne/tools/pt_reverse/test_prime_target_audio.py \
  --binary AlephOne/Source_Files/alephone --data PrimeTargetData \
  --output "$pt_checks/audio"
python3 AlephOne/tools/pt_reverse/test_prime_target_scenery.py \
  --binary AlephOne/Source_Files/alephone --data PrimeTargetData \
  --output "$pt_checks/scenery"
python3 AlephOne/tools/pt_reverse/test_prime_target_corpses.py \
  --binary AlephOne/Source_Files/alephone --data PrimeTargetData \
  --output "$pt_checks/corpses"

Each output directory must be new. The gameplay runner checks all forty map starts, movement, named saves and loads, access-controlled transfers and entrance markers, evidence/inventory persistence, destination saves, and the finale transition. The other runners check pause/resume and captured mixer audio, retail scenery descriptors and ceiling anchors, and corpse/death-state persistence. They write logs and JSON results; gameplay/scenery/corpse checks also capture frames. Use --help for targeted options such as scenery --levels 0 and corpse --short-only.

Headless results do not certify physical speaker output, interactive controls, desktop rendering performance, movie playback, multiplayer sessions, or a full campaign playthrough. The inherited Marathon replay fixtures are separate from Prime Target acceptance.

Package a macOS application

The packaging script assembles an arm64 app, copies scenario resources and their sidecars, bundles dynamic libraries, and applies an ad-hoc signature. It requires the built engine, dylibbundler, SDL3, and the original disc image:

brew install dylibbundler sdl3
zsh AlephOne/tools/pt_reverse/package_prime_target_app.zsh \
  "$PWD/Prime Target.app"

The output must end in .app and must not already exist. The script currently expects your original PrimeTarget.bin and PrimeTarget.cue at:

AlephOne/PrimeTarget-AlephOne.app/Contents/Resources/PrimeTarget Disc/

That existing local bundle and its full disc image are excluded from Git, so packaging from a fresh clone requires restoring these files from your own media. Direct engine execution and headless checks use PrimeTargetData and do not require this packaging input. The script currently uses /opt/homebrew library paths and targets Apple Silicon. Ad-hoc signing is not notarization.

Converted movies are already present in the scenario. To regenerate them from retail originals with their native Macintosh resource forks intact, install ffmpeg and run:

python3 AlephOne/tools/pt_reverse/convert_pt_movies.py PrimeTargetData/Movies --force

Some original movies split QuickTime metadata into a native resource fork; Git does not preserve those extended attributes. Regeneration therefore requires the original fork-bearing files, even though the committed .mpg copies play without them.

History and licenses

The engine history is preserved from Aleph One commit 4cd8346e, followed by a commit placing the upstream tree under AlephOne/ and the Prime Target import. origin points to Forgejo; upstream points to https://github.com/Aleph-One-Marathon/alephone.git. Future upstream integration must account for the AlephOne/ prefix and review Prime Target-specific changes.

Aleph One is GPL-3.0; see COPYING, AUTHORS, and the bundled library license notices. Original Prime Target data, artwork, audio, and movies retain their original rights; the engine license does not relicense the retail assets. This repository contains the locally supplied extracted game data.