Dethrace is an attempt to learn how the 1997 driving/mayhem game Carmageddon 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:
![Screenshot 2024-05-27 at 8 44 10 AM](https://private-user-images.githubusercontent.com/1063652/340173212-10b3b579-1eb1-4242-8b56-ff062cfff810.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3MDQ0MTksIm5iZiI6MTcyNDcwNDExOSwicGF0aCI6Ii8xMDYzNjUyLzM0MDE3MzIxMi0xMGIzYjU3OS0xZWIxLTQyNDItOGI1Ni1mZjA2MmNmZmY4MTAucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgyNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MjZUMjAyODM5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YjM3OWViMGY2OTY1NzQ1MWFmZjUwNzE0NWUyODdiYjQ5MTU1MDE1MmM3YTBkYWMxMzVkYzM2ZjMyZjkyMDZlOCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.xajqWAhgA9hrv4mgEevfPHKoGjIzA4hdbqS_Z1ZL0LI)
Watcom debug symbols for an earlier internal build were discovered named DETHRSC.SYM
on the Carmageddon 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 in c:\DETHRACE
, and the symbol file is called DETHSRC.SYM
. Maybe they removed the "a" to be compatible with 8.3 filenames?
Dethrace does not ship with any game content. You'll need access to the data from the original game. If you don't have an original CD then you can buy Carmageddon from GoG.com.
dethrace
also supports the various freeware demos:
Lots of other fun things are available from the Road Reaction site
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/carmageddon
Dethrace uses git submodules, so we must pull them after the inital clone:
git clone https://github.com/dethrace-labs/dethrace
cd dethrace
git submodule update --init --recursive
Dethrace uses cmake for generating build files.
To generate the build files (generally only required once):
mkdir build
cd build
cmake ..
Once cmake has generated the build files for your platform, run the build. For example:
make
After building, build/dethrace
is created
./dethrace [args]
A subset of tests do not require DETHRACE_ROOT_DIR
. They run via Github actions when code is committed to this repo. This allows us to keep nice and clean and avoid storing any potentially legally problematic resouces in our repo.
The majority of tests do require DETHRACE_ROOT_DIR
.
To run the full test suite, you must have a copy of the original Splat Pack data.
export DETHRACE_ROOT_DIR=/path/to/carmageddon_splat_pack
To run
./dethrace_test
To run a single test
DETHRACE_TEST_ARGS="-n test_name" make test
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.