- Notifications
You must be signed in to change notification settings - Fork2
Reverse engineering the 1997 game "Carmageddon"
License
GPF/dethrace
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Dethrace is an attempt to learn how the 1997 driving/mayhem gameCarmageddon works behind the scenes and rebuild it to run natively on modern systems.
(Follow us on Discord or Twitter to get notified of updates!)
- 92% of functions implemented
- Latest screenshot:
20250125-2319-33.4984172.mp4
Watcom debug symbols for an earlier internal buildwere discovered namedDETHRSC.SYM on theCarmageddon Splat Pack expansion CD release. The symbols unfortunately did not match any known released executable, meaning they were interesting but not immediately usable to reverse engineer the game.
This is what it looked like from the Watcom debugger - the names of all the methods were present but the code location they were pointing to was junk:
CrayzKirk from the Carmageddon community picked it up and did a lot of painstaking work manually matching up many functions and data structures in the DOS executable to the debugging symbols.
We are slowly replacing the original assembly code with equivalent C code, function by function.
No, well, I don't think so at least. The original files according to the symbol dump were stored inc:\DETHRACE, and the symbol file is calledDETHSRC.SYM. Maybe they removed the "a" to be compatible with8.3 filenames?
Dethrace does not ship with any content. You'll need access to the data from the original game. If you don't have an original CD then you canbuy Carmageddon from GoG.com.
dethrace also supports the various freeware demos:
Dethrace has a dependency on SDL2. The easiest way to install SDL is via your favorite package manager.
OSX:
brew install SDL2
Linux:
apt-get install libsdl2-dev
Point Dethrace at the Carmageddon install directory:
export DETHRACE_ROOT_DIR=/path/to/carmageddonDethrace usesgit submodules, so we must pull them after the inital clone:
git clone https://github.com/Memorix101/dethrace-dccd dethracegit submodule update --init --recursiveDethrace usescmake for generating build files.
To generate the build files (generally only required once):
mkdir buildcd buildcmake ..Once cmake has generated the build files for your platform, run the build. For example:
make
Firstly, you need a copy of theCarmageddon game content. Extract the zip file if necessary.
Dethrace expects to be placed into the top level Carmageddon folder. You know you have the right folder when you see the originalCARMA.EXE there. If you are on Windows, you must also placeSDL2.dll in the same folder.

Dethrace supports the GOG cd audio convention. If there is aMUSIC folder in the Carmageddon folder containing filesTrack02.ogg,Track03.ogg etc, then Dethrace will use those files in place of the original CD audio functions.

From the beginning until release
- CrayzKirk (manually matching up functions and data structures in the executable to the debugging symbols)
- The developer at Stainless Software who left an old debugging .SYM file on the Splat Pack CD ;)
Dethrace is released to the Public Domain. The documentation and function provided by Dethrace may only be utilized with assets provided by ownership of Carmageddon.
The source code in this repository is for non-commerical use only. If you use the source code you may not charge others for access to it or any derivative work thereof.
Dethrace and any of its' maintainers are in no way associated with or endorsed by SCi, Stainless Software or THQ Nordic.
DREAMCAST build, requires dreamcast SDL2 fromhttps://github.com/GPF/SDL2, KOS built withmake -j8 CFLAGS+=" -DTHD_KERNEL_STACK_SIZE=128000 -DTHD_STACK_SIZE=128000" all (use gpf-environ.sh included to build dethrace)
cmake -DCMAKE_TOOLCHAIN_FILE="$KOS_CMAKE_TOOLCHAIN" -D__DREAMCAST__=1 -DSDL2_DIR="/opt/toolchains/dc/kos/addons/lib/dreamcast/cmake/SDL2" -DSDL2_INCLUDE_DIRS="/opt/toolchains/dc/kos/addons/include/SDL2" -DSDL2_LIBRARIES="/opt/toolchains/dc/kos/addons/lib/dreamcast/libSDL2.a;/opt/toolchains/dc/kos/addons/lib/dreamcast/libSDL2main.a" -Bbuild
rebuild kos with bigger stack size
make -j$(nprocs) CFLAGS+=" -DTHD_KERNEL_STACK_SIZE=128000 -DTHD_STACK_SIZE=128000" all
dethraceDreamcast.mp4
About
Reverse engineering the 1997 game "Carmageddon"
Resources
License
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Languages
- C96.3%
- CMake1.3%
- Other2.4%
