Subversion Repositories Games.Carmageddon

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 pmbaty 1
# Dethrace  
2
 
3
[![Workflow](https://github.com/jeff-1amstudios/dethrace/actions/workflows/workflow.yml/badge.svg)](https://github.com/jeff-1amstudios/dethrace/actions/workflows/workflow.yml)
4
[![Twitter](https://badgen.net/badge/icon/twitter?icon=twitter&label)](https://twitter.com/dethrace_labs)
5
[![Discord Carmageddon server](https://badgen.net/badge/icon/discord?icon=discord&label)](https://discord.gg/f5StsuP)
6
 
7
 Want to chat? We are in the `#dethrace` channel on the Carmageddon discord server.
8
 
9
Dethrace is an attempt to learn how the 1997 driving/mayhem game [Carmageddon](https://en.wikipedia.org/wiki/Carmageddon) works behind the scenes and rebuild it to run natively on modern systems.
10
 
11
## Progress
12
(Follow us on Twitter to get notified of updates!)
13
 
14
#### Last updated April 18 2023
15
- 80% of functions implemented
16
- Latest screenshot:
17
 
18
 
19
<img width="752" alt="Screenshot 2023-03-31 at 8 51 05 pm" src="https://user-images.githubusercontent.com/78985374/232941148-165792a2-faf0-49bf-aa95-08e34de8ca33.png">
20
 
21
 
22
 
23
 
24
## Background
25
Watcom debug symbols for an earlier internal build [were discovered](http://1amstudios.com/2014/12/02/carma1-symbols-dumped) named `DETHRSC.SYM` on the [Carmageddon Splat Pack](http://carmageddon.wikia.com/wiki/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.
26
 
27
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:
28
 
29
![watcom-debugger](http://1amstudios.com/img/watcom-debugger.jpg)
30
 
31
_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.
32
 
33
We are slowly replacing the original assembly code with equivalent C code, function by function.
34
 
35
### Is "dethrace" a typo?
36
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](https://en.wikipedia.org/wiki/8.3_filename)?
37
 
38
## Game content
39
 
40
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](https://www.gog.com/game/carmageddon_max_pack).
41
 
42
`dethrace` also supports the various freeware demos:
43
- [Original Carmageddon demo](https://rr2000.cwaboard.co.uk/R4/PC/carmdemo.zip)
44
- [Splat Pack demo](https://rr2000.cwaboard.co.uk/R4/PC/splatdem.zip)
45
- [Splat Pack Xmas demo](https://rr2000.cwaboard.co.uk/R4/PC/Splatpack_christmas_demo.zip)
46
 
47
Lots of other fun things are available from the [Road Reaction site](https://rr2000.cwaboard.co.uk/pc-files#c1)
48
 
49
 
50
## Dependencies
51
 
52
### SDL2
53
 
54
The easiest way to install SDL is via your favorite package manager.
55
 
56
OSX:
57
```sh
58
brew install SDL2
59
```
60
 
61
Linux:
62
```sh
63
apt-get install libsdl2-dev
64
```
65
 
66
 
67
 
68
Point Dethrace at the Carmageddon install directory:
69
```sh
70
export DETHRACE_ROOT_DIR=/path/to/carmageddon
71
```
72
 
73
## Build
74
 
75
Dethrace uses [cmake](https://cmake.org/) for generating build files.
76
 
77
To generate the build files (generally only required once):
78
```sh
79
mkdir build
80
cd build
81
cmake ..
82
```
83
 
84
On cmake has generated the build files for your platform, run the build. For example:
85
```sh
86
make
87
```
88
 
89
### Run
90
 
91
After building, `build/dethrace` is created
92
 
93
```sh
94
./dethrace [args]
95
```
96
 
97
 
98
## Run tests
99
 
100
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.
101
 
102
The majority of tests _do_ require `DETHRACE_ROOT_DIR`. 
103
 
104
To run the full test suite, you must have a copy of the original *Splat Pack* data.
105
 
106
```sh
107
export DETHRACE_ROOT_DIR=/path/to/carmageddon_splat_pack
108
```
109
 
110
To run 
111
 
112
```sh
113
./dethrace_test
114
```
115
 
116
To run a single test
117
```sh
118
DETHRACE_TEST_ARGS="-n test_name" make test
119
```
120
 
121
## Changelog
122
[From the beginning until release](docs/CHANGELOG.md)
123
 
124
## Credits
125
- CrayzKirk (manually matching up functions and data structures in the executable to the debugging symbols)
126
- The developer at Stainless Software who left an old debugging .SYM file on the Splat Pack CD ;)
127
 
128
## Legal
129
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.
130
 
131
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.
132
 
133
Dethrace and any of its' maintainers are in no way associated with or endorsed by SCi, Stainless Software or THQ Nordic.