A native PC port of Crash Team Racing (PS1, 1999), built on top of the CTR-ModSDK decompilation project.
- No byte budget. Game source lives in
game/as our own copies. Edit freely. - No PSX toolchain. Targets Windows and Linux with SDL3. No MIPS compiler needed.
- Clean platform layer.
main.cowns process startup; host details stay inplatform/native_*. - No build system nonsense. Just
build.bat/build.sh. - Fully static build. Single executable, zero dependencies. SDL3 is compiled from vendored source and linked statically.
ctr_native/
main.c Entrypoint and unity include manifest
platform.h Platform API the game calls through
platform/ Native-owned audio, input, memcard, CD, and PSX facade glue
game_includes.h Ordered include chain for all game source files
build.bat Windows build (MinGW32)
build.sh Linux build
README.md This file
game/ Our copies of all decompiled game source (943 files)
include/ Project headers (structs, globals, declarations)
externals/
SDL/ SDL3 source (static build)
- Install MSYS2
- In an MSYS2 terminal:
pacman -S mingw-w64-i686-gcc mingw-w64-i686-tools-git - Add
C:\msys64\mingw32\binto your system PATH
That's it. SDL3 is compiled from vendored source -- no separate install needed.
sudo apt install gcc-multilib
sudo apt install libx11-dev libxext-dev libgl1-mesa-dev libasound2-dev libudev-dev libdbus-1-dev
build.bat # Windows
chmod +x build.sh
./build.sh # Linux
First build compiles SDL3 from source. This is cached as a static library in build/ -- subsequent builds only recompile touched native sources.
Output: build/ctr_native.exe (Windows) or build/ctr_native (Linux)
rm -rf build/ # Delete cached libraries
build.bat # Rebuild everything
- Create an
assets/directory next to the executable for packaged builds, or next to the source files for development builds run frombuild/ - Extract the following from a CTR NTSC-U retail disc image:
BIGFILE.BIGSOUNDS/KART.HWLTEST.STRXA/ENG.XNFXA/ENG/EXTRA/S00.XAthroughS05.XAXA/ENG/GAME/S00.XAthroughS20.XAXA/MUSIC/S00.XAthroughS01.XA
- Run
build/ctr_native.exe
Packaged directory structure:
CTR-Native/
ctr_native.exe
assets/
BIGFILE.BIG
SOUNDS/KART.HWL
TEST.STR
XA/
ENG.XNF
ENG/EXTRA/S00.XA ... S05.XA
ENG/GAME/S00.XA ... S20.XA
MUSIC/S00.XA ... S01.XA
Development directory structure:
ctr_native/
build/
ctr_native.exe
assets/
BIGFILE.BIG
SOUNDS/KART.HWL
TEST.STR
XA/
ENG.XNF
ENG/EXTRA/S00.XA ... S05.XA
ENG/GAME/S00.XA ... S20.XA
MUSIC/S00.XA ... S01.XA
Internal builds can record a small bug report folder. See docs/REPLAYS.md.
main.c (entrypoint)
|
+-- platform/native_* (platform shell, audio, input, memcard, CD, renderer, PSX facade glue)
|
+-- game_includes.h
|
+-- game/ (all decompiled game source)
|
+-- include/ (headers: structs, globals, declarations)
CTR_NATIVEis defined for native host/platform-specific code- The build currently uses 32-bit mode because some native paths still pack host pointers into retail-shaped 24-bit GPU primitive links. See
docs/MEMORY_MODEL.mdfor the roadmap to replace that with an explicit native GPU link bridge.
- Clean up
game/copies strip byte budget hacks and route platform-specific code throughCTR_NATIVE - Replace low-address primitive-link assumptions with an explicit native GPU link bridge, remove the 32-bit constraint, and keep pruning inherited compatibility code now owned in
include/andplatform/.
- CTR-ModSDK — the decompilation project this is built on
- PsyCross — original PS1 compatibility code from which parts of CTR Native's owned platform layer and PsyQ facade headers are derived
- SDL3 — cross-platform multimedia
- Crash Team Racing is a trademark of Sony Computer Entertainment / Naughty Dog