This project recreates the source of Wing Commander II as shipped in Wing
Commander: The Kilrathi Saga (1996). The reconstructed game core is C, the
ix audio library is C++, and the reference build uses Microsoft Visual C++
4.1 under wibo to reproduce the
original Win32 WC2.EXE.
A native SDL2 port is available for Windows, Linux, and macOS. It supports Kilrathi Saga data and has partial support for the original DOS game data.
No retail game data files are included.
The reconstruction is incomplete: the source compiles and links as WC2.EXE,
but significant implementation, mapping, and runtime work remains. make report compares 1,501 functions against the retail executable and averages
98.02% machine-code similarity, which measures reconstruction fidelity, not
gameplay completeness.
The SDL2 port runs the title sequence, campaign intro, pilot database, save/load menus, cutscenes, and spaceflight, including firing, targeting, cockpit displays, and music. A DOS install plays its own AdLib music and synthesized OriginFX sound effects instead of the Kilrathi Saga streams and waves. The optional OpenGL renderer redraws space objects at output resolution while retaining the original indexed cockpit, HUD, and palette effects.
Captured through DREAMM at the game's original 320x200 resolution.
Download the archive for your platform from GitHub Releases. Extract its contents into an installed Kilrathi Saga or DOS Wing Commander II directory and keep the bundled runtime libraries beside the executable. Start it with that directory as the working directory:
# macOS or Linux
cd /path/to/WC2
./wc2-modern
# Windows PowerShell
cd C:\path\to\WC2
.\wc2-modern.exe
The native port includes these fixes and optional features:
| Fix or feature | Enable with |
|---|---|
| Kilrathi Saga or DOS game data, detected automatically | always on |
| Original orchestral startup and logo sequence, when its data is present | always on |
| Original cinematic captions alongside Speech Pack dialogue, with either data set | always on |
| Resizable window, fullscreen toggle, and mouse capture | always on |
| Aspect-correct 4:3 presentation and pointer mapping | always on |
| Mouse-wheel throttle control during spaceflight | always on |
Esc pauses during spaceflight when communications are closed | always on |
| Pointer confined only during unpaused, focused spaceflight | always on |
| Automatic SDL gamepad mappings and hot-plug support | always on |
| Background planets drawn with their own sprite and scale (WCDX fix) | always on |
| Static on knocked-out cockpit displays | always on |
| Neutral adaptive difficulty and half-size asteroid collision radii | --balanced-difficulty |
| OpenGL space objects rendered at output resolution | --enhanced |
| Heavy-weapon, damage, collision, and afterburner rumble | --joystick-rumble |
| WCAT-style four-button joystick layouts | --joystick-mode=4button-2axis or 4button-4axis |
| Twin-stick, HOTAS, throttle, and rudder layouts | --joystick-axes=<layout> |
| Joystick diagnostics on stderr | --joystick-debug |
| Frame-rate counter | -f |
| Cockpitless view | -c |
Options can be combined:
./wc2-modern --enhanced --joystick-rumble \
--joystick-mode=4button-4axis
The optional OpenGL renderer keeps the original indexed artwork, palettes, cockpit, HUD, and text while redrawing the ordered space-object layer at output resolution. The original software renderer remains the default; objects that cannot use the enhanced path fall back to it automatically. See the SDL2 port documentation for implementation details.
| Shortcut | Action |
|---|---|
Cmd+Enter (macOS) | Toggle fullscreen |
Alt+Enter (Windows and Linux) | Toggle fullscreen |
Cmd+Q (macOS) | Quit the game |
| Mouse wheel (spaceflight) | Increase or decrease speed |
Esc (spaceflight) | Close communications, or pause |
| Gamepad Start (spaceflight) | Pause or resume |
| Gamepad Back | Escape/back |
Gamepad Y (Y/N prompts) | Confirm Yes |
The default joystick mode retains the original two-axis, two-button controls. The optional four-button modes add dedicated afterburner, target, weapon, navigation, autopilot, communications, and speed controls. See the SDL2 port documentation for the full gamepad, twin-stick, and HOTAS layouts.
Clone the submodules first:
git submodule update --init --recursive
Install a C/C++ compiler plus the SDL2 and LZO2 development packages, then run:
make -j modern
The executable is written to out-modern/wc2-modern (or
out-modern/wc2-modern.exe on Windows). make run-modern launches it with
Kilrathi Saga data in data/wc2-full; make run-modern-dos uses DOS data in
data/dos.
The default target downloads and checksum-verifies the MSVC 4.1 package, then
builds WC2.EXE, WC2.map, and compiler-generated assembly under out/. The
original executable is not required to compile it:
make -j
To run it, provide a Kilrathi Saga disc image. The Makefile substitutes the reconstructed executable and launches it under DREAMM:
make run ISO=/path/to/kilrathi-saga.iso
Use make run-original for the retail executable in the same environment, and
make debug to start DREAMM's debugger.
binary-comp is required only for
comparison and verification commands:
python3 -m pip install "binary-comp[all] @ git+https://github.com/gg-sl-oss/binary-comp.git"
make compare-func FUNC=WinMain
make verify
These look for the retail executable at ../releases/win32/WC2.EXE; set
ORIGINAL_SRC to point elsewhere.
Contributor references:
Special thanks to:
See LICENSE. OpenAI Codex and Anthropic Claude were used during the reconstruction.
508 commits
23 commits
C
83.4%
C++
8.2%
Assembly
4.4%
Python
2.2%
Makefile
1.6%
This project recreates the source of Wing Commander II as shipped in Wing
Commander: The Kilrathi Saga (1996). The reconstructed game core is C, the
ix audio library is C++, and the reference build uses Microsoft Visual C++
4.1 under wibo to reproduce the
original Win32 WC2.EXE.
A native SDL2 port is available for Windows, Linux, and macOS. It supports Kilrathi Saga data and has partial support for the original DOS game data.
No retail game data files are included.
The reconstruction is incomplete: the source compiles and links as WC2.EXE,
but significant implementation, mapping, and runtime work remains. make report compares 1,501 functions against the retail executable and averages
98.02% machine-code similarity, which measures reconstruction fidelity, not
gameplay completeness.
The SDL2 port runs the title sequence, campaign intro, pilot database, save/load menus, cutscenes, and spaceflight, including firing, targeting, cockpit displays, and music. A DOS install plays its own AdLib music and synthesized OriginFX sound effects instead of the Kilrathi Saga streams and waves. The optional OpenGL renderer redraws space objects at output resolution while retaining the original indexed cockpit, HUD, and palette effects.
Captured through DREAMM at the game's original 320x200 resolution.
Download the archive for your platform from GitHub Releases. Extract its contents into an installed Kilrathi Saga or DOS Wing Commander II directory and keep the bundled runtime libraries beside the executable. Start it with that directory as the working directory:
# macOS or Linux
cd /path/to/WC2
./wc2-modern
# Windows PowerShell
cd C:\path\to\WC2
.\wc2-modern.exe
The native port includes these fixes and optional features:
| Fix or feature | Enable with |
|---|---|
| Kilrathi Saga or DOS game data, detected automatically | always on |
| Original orchestral startup and logo sequence, when its data is present | always on |
| Original cinematic captions alongside Speech Pack dialogue, with either data set | always on |
| Resizable window, fullscreen toggle, and mouse capture | always on |
| Aspect-correct 4:3 presentation and pointer mapping | always on |
| Mouse-wheel throttle control during spaceflight | always on |
Esc pauses during spaceflight when communications are closed | always on |
| Pointer confined only during unpaused, focused spaceflight | always on |
| Automatic SDL gamepad mappings and hot-plug support | always on |
| Background planets drawn with their own sprite and scale (WCDX fix) | always on |
| Static on knocked-out cockpit displays | always on |
| Neutral adaptive difficulty and half-size asteroid collision radii | --balanced-difficulty |
| OpenGL space objects rendered at output resolution | --enhanced |
| Heavy-weapon, damage, collision, and afterburner rumble | --joystick-rumble |
| WCAT-style four-button joystick layouts | --joystick-mode=4button-2axis or 4button-4axis |
| Twin-stick, HOTAS, throttle, and rudder layouts | --joystick-axes=<layout> |
| Joystick diagnostics on stderr | --joystick-debug |
| Frame-rate counter | -f |
| Cockpitless view | -c |
Options can be combined:
./wc2-modern --enhanced --joystick-rumble \
--joystick-mode=4button-4axis
The optional OpenGL renderer keeps the original indexed artwork, palettes, cockpit, HUD, and text while redrawing the ordered space-object layer at output resolution. The original software renderer remains the default; objects that cannot use the enhanced path fall back to it automatically. See the SDL2 port documentation for implementation details.
| Shortcut | Action |
|---|---|
Cmd+Enter (macOS) | Toggle fullscreen |
Alt+Enter (Windows and Linux) | Toggle fullscreen |
Cmd+Q (macOS) | Quit the game |
| Mouse wheel (spaceflight) | Increase or decrease speed |
Esc (spaceflight) | Close communications, or pause |
| Gamepad Start (spaceflight) | Pause or resume |
| Gamepad Back | Escape/back |
Gamepad Y (Y/N prompts) | Confirm Yes |
The default joystick mode retains the original two-axis, two-button controls. The optional four-button modes add dedicated afterburner, target, weapon, navigation, autopilot, communications, and speed controls. See the SDL2 port documentation for the full gamepad, twin-stick, and HOTAS layouts.
Clone the submodules first:
git submodule update --init --recursive
Install a C/C++ compiler plus the SDL2 and LZO2 development packages, then run:
make -j modern
The executable is written to out-modern/wc2-modern (or
out-modern/wc2-modern.exe on Windows). make run-modern launches it with
Kilrathi Saga data in data/wc2-full; make run-modern-dos uses DOS data in
data/dos.
The default target downloads and checksum-verifies the MSVC 4.1 package, then
builds WC2.EXE, WC2.map, and compiler-generated assembly under out/. The
original executable is not required to compile it:
make -j
To run it, provide a Kilrathi Saga disc image. The Makefile substitutes the reconstructed executable and launches it under DREAMM:
make run ISO=/path/to/kilrathi-saga.iso
Use make run-original for the retail executable in the same environment, and
make debug to start DREAMM's debugger.
binary-comp is required only for
comparison and verification commands:
python3 -m pip install "binary-comp[all] @ git+https://github.com/gg-sl-oss/binary-comp.git"
make compare-func FUNC=WinMain
make verify
These look for the retail executable at ../releases/win32/WC2.EXE; set
ORIGINAL_SRC to point elsewhere.
Contributor references:
Special thanks to:
See LICENSE. OpenAI Codex and Anthropic Claude were used during the reconstruction.
508 commits
23 commits
C
83.4%
C++
8.2%
Assembly
4.4%
Python
2.2%
Makefile
1.6%